3

I have a PDF form that I created in LiveCycle Designer(LCD), which has the filename "testform.pdf". It has a HTTP Submit button which I named "submit". Within LCD, I can set the properties of the button, including the target URL. When I populate the PDF Form, I need to be able to pass in the target URL. Here is what I have so far:

<cfpdfform source="#path#testform.pdf" 
    destination="#path#testform#timeformat(now(),'hhmmss')#.pdf"
    action="populate" overwrite="yes">

    <cfpdfsubform name="topmostsubform">

        <cfpdfformparam name="TextField" value="testing" ></cfpdfformparam>
        <cfpdfformparam name="submit.URL" value="http://my.target.url.com"></cfpdfformparam>

    </cfpdfsubform>

</cfpdfform>

Any suggestions as to how I could accomplish this?

  • 1
    AFAIK, this cannot be done with cfpdfform alone. One alternative might be to add a 1) hidden field and 2) presubmit event for the button. The event would set the form target dynamically to the value of the hidden field. Simply use cfpdfform to populate the hidden field with the URL and you are good to go. – Leigh Oct 21 '15 at 13:41
  • How would I assign the value of the submit URL to the value of this hidden field? I guess via an onsubmit script? – RickInWestPalmBeach Oct 21 '15 at 14:12
  • 1
    (Edit) Essentially, yes. Use LCD to add a preSubmit function to the button. Inside the function use scripting (ie javascript) to set the target URL dynamically to whatever value is stored in the hidden field. That way you can change the target to whatever you wish by simply populating the hidden field. – Leigh Oct 21 '15 at 17:56
  • Thanks for the help. Now if I can only find a way to prevent LCD from doubling the size of my PDF every time I save it without having to send Adobe more money! – RickInWestPalmBeach Oct 24 '15 at 20:42
  • Heh, yeah bloated pdf's are always a challenge. Feel free to post the final code (or a screen shot of what you did in LCD) as an "answer". That way the solution is more visible and easier to find for the next guy. – Leigh Oct 24 '15 at 23:01

0 Answers0