Spreadsheet to form: How can I create a condition based on "Unknow access code"?

  • MoraesMarcelo
    Asked on June 30, 2022 at 4:11 PM

    Hello!

    Just recently started using Jotform, and first of all I need to mention what an awesome tool it is! Thank you!!!

    I am trying to create a kind of authentication filter for a form based on a spreadsheet data that contains a list of codes, and the URL parameter. So that, if the numeric code that comes from the URL is present on the spreadsheet, it will show a Pagebreak element. If not, the "Next" (pagebreak) button will be hidden.

    I got to a point where I can get an "Unknown access code" message in the Spreadsheet to form widget whenever the code is not present in the spreadsheet, and a "Fields have been autofilled." message in the widget whenever the code is present in the spreadsheet.

    But, I don't know how to create a show/hide condition based on the widget status to either show or hide the "Next" (pagebreak) button, as I need to.


    Is there some way of creating a condition based on this widget status, or any other suggestion on how can I work around this?

    Thank you very much!
    Marcelo

  • Mightor JotForm Support
    Replied on June 30, 2022 at 9:18 PM

    Hello Marcelo,

    Thanks for reaching out to Jotform Support. The Show/Hide field condition would look like the below:

    1656638120 62be4aa829cac stf Screenshot 10

    Can you provide the forms URL together with a screenshot of the error that you received so we can check it? Let us know if you have any other questions.


  • MoraesMarcelo
    Replied on July 1, 2022 at 7:05 AM

    Hello,

    Thanks for tying to help me out. In fact, the value "1" for filtering if the Spreadsheet to Form widget has a valid or not valid field value did not work.


    Is there any way of filtering based on the Spreadsheet to Form widget status/validation?

    Please find a sample form with what I am trying to implement here:

    https://www.jotform.com/221596560095057

    Some example that provides a valid result from the codes' spreadsheet would be:

    https://www.jotform.com/221596560095057&id=1001

    1656673650 62bed57207aa5  Screenshot 10


    Some example that provides an invalid result from the codes' spreadsheet would be:

    https://www.jotform.com/221596560095057&id=1008

    1656673614 62bed54e7ca31  Screenshot 21



    Thank you

  • Afzal JotForm Support
    Replied on July 1, 2022 at 8:05 AM

    Hi Marcelo,

    Kindly allow me a few moments to look into this and I'll get back to you with an update. 

    We appreciate your patience.

  • Afzal JotForm Support
    Replied on July 1, 2022 at 8:32 AM

    I appreciate your patience, Marcelo. I understand you want to hide the Page Break based on the result from the Spreadsheet to form. A workaround for this would be using an extra field based on which we can hide or show the Page Break. Doing that is easy. Let me show you how:

    • Add a Short Text field and Hide the field.

    1656677974 62bee6564d9f0  Screenshot 10

    1. Add the First condition to Hide the Page Break if the Short text field is empty.
    2. The second condition will copy the field's value to the Short text field if the field is filled.

    1656678119 62bee6e7ef6a6  Screenshot 21

    Since the settings in the widget are set to clear the widget if the validation code is incorrect. This will ensure that the Page break is only visible if the validation code is correct.

    Result:

    1656678550 62bee896c8fe9 nEW Screenshot 32

    Here's the cloned version of your form that you can test.

    Please give it a try and let us know how it goes. 

  • MoraesMarcelo
    Replied on July 1, 2022 at 9:32 AM

    Awesome!

    It worked, exactly as I need.


    Your kindness and help really appreciated, thank you so much!

    Marcelo