How to Use Hidden Fields
Hidden fields allow you to store information on the form that isn't visible to the respondent. Information in the hidden field is visible to admins and can be included in emails.
What type of information can be passed
If your form is embedded on a dashboard you can use hidden fields to store information like the current user's ID, or their account subscription plan.
Hidden fields are excellent for tracking source and other such custom variables. For example, if your form is available at formcrafts.com/a/my-form you could share the link formcrafts.com/a/my-form?source=twitter. The hidden field can be configured to capture the source parameter from the URL.
FormCrafts has a conditional logic item that allows you to set the value of other fields, based on certain conditions. For example, you are creating an interest calculator form. You can configure the conditional logic to set the value of the hidden field to Your interest is too high! if the interest number exceeds 12.
You can then include this message in your thank you message, or email(s) by referencing the hidden field.
Learn more about using conditional logic.
How to add and configure hidden fields
Adding a hidden field
To add a hidden field, edit a form, and go to Add Field (top-right) → Other → Hidden.
Storing information using URLs
Go to Settings → Other and check the option Fetch Values from URL Attributes. This allows your form to fetch values from the URL. Now edit the hidden field and change the label to source.
This has configured a source hidden field on your form. If users visit your form with the URL attribute source, like formcrafts.com/a/my-form?source=twitter or you embed the form on a website page which the source attribute, like example.com/contact-us?source=twitter, it will store the value in the hidden field.
Storing math calculations and personalized messages
To learn how to store the results of math calculations in hidden fields, read our article on using math calculations in forms. To learn how to store personalized messages, read our article on using conditional logic.