Can I have a link elsewhere on on the page to set the value of a form field?

  • petruzzo
    Asked on January 6, 2017 at 1:04 AM

    I'm trying to find a way to use a link, say, in the header of the page, which when clicked, would set the value of one of the form fields on the same page.

    Is this something that's possible?

  • Helen
    Replied on January 6, 2017 at 2:30 AM

    Hi,

    Thank you for contacting us.

    As I understood you correctly, you want to have a link that should automatically fill in value to your form and you want your form to be prepopulated after being clicked via URL.

    You can prepopulating field your Jotform with URL parameters. Here is a guide helps to you: https://www.jotform.com/help/71-Prepopulating-Fields-to-Your-JotForm-via-URL-Parameters

    If you do not want to this link, please provide us more detail about a link that you want to use. We can provide you the workaround.

    Please let us know if you need any further assistance.

  • petruzzo
    Replied on January 6, 2017 at 12:48 PM

    I think this is what I'm looking for, except the link is to an anchor on the same page. The form will not be on a separate page. Will this method still work?

  • Jan
    Replied on January 6, 2017 at 2:56 PM

    You can use the Update/Calculate Field Conditions in your form. Here's a guide: https://www.jotform.com/help/286-How-to-Pass-Field-Value-to-Another-Field.

    In this way, once the condition is met, it will pre-populate the fields automatically.

    If you have any questions, let us know. Thank you.

  • petruzzo
    Replied on January 13, 2017 at 6:22 PM

    I'm acquainted with the form conditions, but that's not what I'm looking for. I'm trying to make it so that clicking a link outside the form, but on the same page, will update a field.

    I have three products on the page, each with an anchor link to elsewhere on the page. When a user clicks on of those links, I'd like a dropdown in the form to automatically be set to the product they clicked on.

    Can this be done with the above method?

  • Helen
    Replied on January 14, 2017 at 4:10 AM

    Hi,

    Thank you for contacting us.

    If I understood you correctly, you want to make link outside the form. Then you want to pass the value to form after clicking this link.

    You can not do this using any CSS or HTML codes. You can try the another way for solving this issue.

    I am not sure about doing this. However, you can try to refresh your page after clicking this link. Here is an example:

    1. You can use this tag for your product link: <a href="yourprepopilatedURL" onClick="window.location.reload();return false;">Reload</a>

    If you have any questions or issue, feel free contact us.