How do I validate a field from one form against the responses that were collected in a second form?

  • Profile Image
    pcdctcsf
    Asked on February 28, 2021 at 07:49 AM

    I am creating two forms: a registration form for an event and a confirmation form which would be completed by the users several weeks after they register.

    Both forms request the user to enter their email address. How can I ensure that when the user enters their email address on the confirmation form, that it is the same one that was used on the registration form?

    Is there a way for me to validate the email address entered on the confirmation form against the responses that are compiled in the Jotform table from the registration form? 

    II don’t want to use the Spreadsheet to Form widget because that requires an additional two manual steps: downloading the Jotform table from the registration form to an Excel spreadsheet, and then uploading that spreadsheet back to the confirmation form.

    Plus, it’s possible that as it gets closer to the timing of the event, as I am asking existing users who have already registered to confirm their attendance using the confirmation form, some last minute new users may sign up on the registration form. This would require me to go through the download/upload sequence with Spreadsheet to Form widget multiple times to make sure that I capture all the users who registered before I disable the registration form.

    I would like to avoid doing that.

    I would think that because the data from the registration form resides on the Jotform server as a table, there should be some way to reference that data to validate an email field on my confirmation form. 

    The registrant’s email is dynamically added to the Jotform table after the registration form is submitted. When that registrant is asked to confirm their attendance at some later time, the confirmation form should be able to validate the email entered against what the registrant entered on the registration form anytime from several weeks to minutes earlier without any manual intervention on my part.

    What’s the best way to set this up, if it can be done?

  • Profile Image
    Patrick_R
    Answered on February 28, 2021 at 10:50 AM

    Hello! Kindly note that we don't have any such widget or functionality that allows users to query (run SQL like queries) the form's submissions.

    As you already know, Spreadsheet to form widget is one way of achieving this.

    Another way would be to email users custom links with email specified in it. As an example, please check this form: https://form.jotform.com/210584480312045?email=test@example.com

    You can prepare and supply your users with such custom links via their autoresponders using unique name identifiers and pre-population techniques. Your users can click these links, visit your second form and complete it. This way you can be sure that the submission is coming from the same user.

    As an additional step, you can hide/disable this email address field on your form so that users can't enter data in it manually.

    It is also possible to use conditions to hide the other form fields and the Submit button, if the form URL doesn't have an email value supplied; so anyone directly visiting the form (without the email specified in the URL) won't be able to fill/complete the form.

    Guide: prepopulating-fields-to-your-jotform-via-url-parameters

    I hope this helps. If you have any questions, let us know.

    Thank you!