Automatically fill email field from click in email.

  • alguacil
    Asked on September 2, 2024 at 6:21 AM

    Hello, is there anyway to fill automaquically the email field of a user in a Form if the user clicks in a link in a Newsletter if we put the email adress in the link?

  • Afzal JotForm Support
    Replied on September 2, 2024 at 7:20 AM

    Hi Alguacil,

    Thanks for reaching out to Jotform Support. Yes, it is possible to automatically fill the email field in a form when a user clicks on a link in a newsletter. You can achieve this by using our URL parameters feature. In your newsletter link, add the user's email address as a query string parameter. For example:

    https://www.jotform.com/your-form-id?email=user@example.com

    https://www.jotform.com/form/242413886589370?email=test@email.com

    When the user clicks on this link, their email address will be automatically filled in the email field in your form. Here's the result:

    Automatically fill email field from click in email Screenshot 20

    Let us know if there’s anything else we can help you with. 

  • alguacil
    Replied on September 2, 2024 at 7:50 AM

    would it be possible to hide the email field if it has been filled this way? the user wont have to click "Send" button for email field if it is filled

  • Afzal JotForm Support
    Replied on September 2, 2024 at 8:24 AM

    Hi Alguacil,

    Yes, it is possible to hide the email field and it will still fill the email field and it will be recorded in the submission tables or in the notification emails:

    Automatically fill email field from click in email Screenshot 20

    Let us know if there’s anything else we can help you with. 

  • alguacil
    Replied on September 2, 2024 at 8:45 AM

    we put the email as a condition for hiding or not other fields. is it also possible?

  • Sidharth JotForm Support
    Replied on September 2, 2024 at 9:22 AM

    Hi Alguacil,

    You can add conditions in the form to hide the email element if it is filled only via the URL parameter. Let me show you how:

    1. In Form Builder, click on the Add Form Element menu on the left side of the page.

    2. Click on the Widgets tab.

    3. Search for the Get Form Page URL and click on it to add to the form.

    Automatically fill email field from click in email Screenshot 40

    Now, let us add conditions to check if the email is populated via the URL parameter and then hide the email element.

    1. In Form Builder, click on the Settings tab from the orange navigation bar.

    2. Click Conditions on the left menu, and select the SHOW/HIDE FIELD condition.

    3. Add condition as shown below:

    1. In IF, select the Get Form Page URL
    2. In STATE, select Contains.
    3. In Value, type @
    4. Click on the + button and select In IF, select the Email element.
    5. In STATE, select Is Filled.
    6. Select All in the dropdown for If All OF THE “IF” RULES ARE MATCHED
    7. In DO, select Hide and select the Email element.

    Automatically fill email field from click in email Screenshot 51

    That's it. Now if the email element is filled via the URL parameter, it will be hidden. Check out the screenshot below to see the result:

    Automatically fill email field from click in email Screenshot 62

    Here is a cloned version of the form that you can clone and test.

    Give it a try and let us know how it goes.

Your Answer