User Guide

 

Allow/Disallow Access to Your Forms Using Conditions

Allow/Disallow Access to Your Forms Using Conditions

Have you ever had the need to only allow certain people submitting a form? Like, password protecting it so only those who know the password would be able to fill out and submit it?

Although JotForm doesn't have an innate option/feature to sort of "password protect" your forms, there's still a way to allow/disallow access to your forms by using Conditions.

This form will be the focus of our guide: https://form.jotform.com/63632153405954 But before you proceed, a few words of caution:

1. Carefully read our Terms of Use.

Phishing. You agree that Company may terminate your JotForm Service immediately if a form's purpose is found to be deceptively obtaining: sensitive credit card information, social security numbers, user login credentials, or other sensitive personal information.

Collecting Sensitive Information. You may not use the JotForm to collect certain types of sensitive information, including but not limited to credit card information and any type of login credentials.

2. So as a gentle reminder, although you won't be using this to deceptively obtain info, DON'T use the word "password" on your form. It could trigger our automated anti-phishing system that may result to automatic account suspensionWhat you can do as an alternative is to rephrase it (e.g. label your field as Access Code, Passcode, Passphrase, etc.). Remember, don't use the following words as labels - password, username, login.

3. Using the "IS EQUAL TO" condition on a Textbox will reveal the actual condition on the form's source code. So anyone capable of viewing the source code can potentially know the exact value of the access code (this will be discussed in more detail below).

We'll use 2 different approaches on protecting your forms:

Using a Matrix Field - Will act as a PIN Code and the actual value needed to match will not be shown when viewed from the source code.

To sort of mask/hide the value, we'll be setting up the Matrix Field with an extra field (a Textbox) which will be hidden from your users.

We'll use this temporary hidden Textbox (PIN Temp) to fetch the value of the Matrix Field. Afterwards, it will be used with the Condition like so:

This results to the value being 1030507000 instead of 1357. Yes it may seem obvious (for you, since you're the one who set it up), but for everyone else, that value wouldn't make any sense.

Using a Textbox - Will act as an Access Code and the actual value will be shown as is on the source code. This is how your Condition will be setup:

Below is an example of how someone will be able to see the value of the Access Code from the form's source code:

Now that we have the Conditions setup, all that's left is to use the Form Collapse Tool to hide the section(s) of your form that you want to be accessible IF AND ONLY IF the user managed to key in the correct PIN Code / Access Code.

To wrap it up, your general workflow would be:

1. Choose your desired method (either using a Matrix Field or a Textbox).

2. Add the Form Collapse Tool to Hide/Show multiple fields at once.

Related guide: Show or Hide Multiple Fields at once using the Form Collapse Tool

3. And lastly, setup your Conditions to fit your needs.

Give it a spin and let us know down in the comments section if you have any questions.

Send Comment