Is there a way to change the form's recipient using URL parameters?

  • MetalSupport
    Asked on July 24, 2015 at 9:48 AM

    I would like to have one form that sends out the submissions to different e-mail addresses based on an URL parameter. I know about the Conditions feature, but this would require me to add an additional field to my form, such as "pick a recipient" which I would like to avoid. Is there a way to do this?

     

    Thanks in advance for your help!

  • Kiran Support Team Lead
    Replied on July 24, 2015 at 12:27 PM

    If the URL parameter is pulled from the JotForm URL, it can be possible by adding a hidden textbox field on the form.

    For instance, if the JotForm URL is having an additional parameter as below 

    http://form.jotformpro.com/form/51886342762968?urlp=one

    you can have the parameter value in the hidden textbox field which is placed on the form by placing a simple PHP command.

    Is there a way to change the forms recipient using URL parameters? Image 1 Screenshot 40

    While previewing the form with added parameter in the URL, the form should display the value as below :

    Is there a way to change the forms recipient using URL parameters? Image 2 Screenshot 51

    You may and a condition can be set based on this textbox field to send the email.

    Is there a way to change the forms recipient using URL parameters? Image 3 Screenshot 62

    Please see the demo form below. You may also clone it to your account to see how it works.

    http://form.jotformpro.com/form/51886342762968?urlp=one

    Hope this information helps. Let us know if you need any further assistance. Thanks!

  • MetalSupport
    Replied on July 27, 2015 at 1:02 PM

    Hello!

    Thanks for your assistance,

    I input the code as instructed but the form does not auto fill with the parameter? any idea why?

    http://form.jotformpro.com/form/52045634273957?city=test

     

    Is there a way to change the forms recipient using URL parameters? Image 1 Screenshot 20

  • Kiran Support Team Lead
    Replied on July 27, 2015 at 1:30 PM

    Generally, the field names are assigned automatically by label name of the field. However, this can be altered from the field properties. Since the label is set to test on your JotForm, the field ID was assigned as test.

    Is there a way to change the forms recipient using URL parameters? Image 1 Screenshot 30

    The URL should be working fine if the parameter is changed to test without making any changes to your JotForm now.

    http://form.jotformpro.com/form/52045634273957?test=New York

    But the field is assigned to call a different variable 'city' and in the URL parameter. Please replace the field name from test to city so that the URL should be working fine.

    Is there a way to change the forms recipient using URL parameters? Image 2 Screenshot 41

    Once this change is made on your JotForm, you should be able to access with the parameter city.

    http://form.jotformpro.com/form/52045634273957?city=New%20York

    Hope this information helps.