Let's say there are 3 different environments (e.g. DEV-TEST-PRODUCTION).
Each environment has a designated url for PDF form submission.
What I'd like to know is if there's a way to dynamically set the submit to url depending on where the PDF reside?
E.g., I'd like to be able to create a PDF in Dev and promote it to Test environment without touching the submit to url manually to the environment's url.
Thanks in adavnce.
If you add some additional complexity you should be able to do this with a combination of a Servlet and LiveCycle Forms.
Here's my idea:
- modify your web page where you normally put the form to call a servlet rather than just have a link to a form (using an HTTP Get will look the same to the user).
- when the servlet is called calculate the current server's location using the servlet's built in context root. Build a target URL based on that location
- add that target url to a LiveCycle URLSpec type variable usig the setTargetURL parameter
- call LC Forms to render the form
- send the returned form to the browser
LC Forms will set the target url in the submit button so it goes to the place you specified using the setTargetURL parameter
Your suggestion solved the problem.