2 Replies Latest reply on Jul 20, 2009 2:08 PM by drcaesar

    Dynamic submit to url in submit button




      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.

        • 1. Re: Dynamic submit to url in submit button
          Hodmi Level 4

          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

          • 2. Re: Dynamic submit to url in submit button
            drcaesar Level 1

            Thanks Hodmi,


            Your suggestion solved the problem.