Sunday, March 28, 2010

Dynamic submit to url in submit button

Hi,

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.

Dynamic submit to url in submit button

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

Dynamic submit to url in submit button

Thanks Hodmi,

Your suggestion solved the problem.

No comments:

Post a Comment