Hidden fields in URL for Retool Forms

Does the new Retool Forms have "hidden fields", similar to Typeform's?

I want to be able to pass some information through the URL (name, email, etc.), that I want to use on the Form and save it along with the responses. Is that possible?

Hey there!

Absolutely, Retool Forms does offer a way to pass information through the URL and save it along with the responses. While we don't have a feature specifically called "hidden fields," you can create a hidden field by setting the value of Hidden to true for the input field you don't want to show up on the form.

Here's how it works:

1. Your hidden input fields can capture information from the URL parameters, such as name and email. To make a field hidden, simply adjust the value of hidden to true.

2. As users access your form via its unique URL, you can include those parameters in the URL, like https://yourformurl.com?name=John&email=john@example.com.

3. In your form, the hidden fields can read and store these parameters. When the form is submitted, the information provided via the URL will be saved along with the responses in your database.

Note that if you generate a form from a database, you will not be able to add any additional fields, but you can make any field hidden. Whereas, if you start from scratch you have the option to add whatever fields you need to although they will still need to match the destination table you are saving to.

Also note that you can use {{urlParams.hash}} to access the hash portion of a URL. In a URL, the hash portion is the part that comes after the "#" character.

For example, consider this URL: https://example.com/page#section-2.

  • urlParams is a common way to access URL parameters and fragments in Retool.
  • .hash refers to the hash fragment of the URL.

So, {{urlParams.hash}} in the context of the given URL would yield "section-2".

That's useful when you need to access and utilize the hash fragment as a variable in your Retool application, such as for navigation within a single-page application or for showing/hiding content based on the hash value.

Hey there!

Absolutely, Retool Forms does offer a way to pass information through the URL and save it along with the responses. While we don't have a feature specifically called "hidden fields," you can create a hidden field by setting the value of Hidden to true for the input field you don't want to show up on the form.

Here's how it works:

  1. Your hidden input fields can capture information from the URL parameters, such as name and email. To make a field hidden, simply adjust the value of hidden to true.
  2. As users access your form via its unique URL, you can include those parameters in the URL, like https://yourformurl.com?name=John&email=john@example.com.
  3. In your form, the hidden fields can read and store these parameters. When the form is submitted, the information provided via the URL will be saved along with the responses in your database.

Note that if you generate a form from a database, you will not be able to add any additional fields, but you can make any field hidden. Whereas, if you start from scratch you have the option to add whatever fields you need to although they will still need to match the destination table you are saving to.

Also note that you can use {{urlParams.hash}} to access the hash portion of a URL. In a URL, the hash portion is the part that comes after the "#" character.

For example, consider this URL: https://example.com/page#section-2.

  • urlParams is a common way to access URL parameters and fragments in Retool.
  • .hash refers to the hash fragment of the URL.

So, {{urlParams.hash}} in the context of the given URL would yield "section-2".

That's useful when you need to access and utilize the hash fragment as a variable in your Retool application, such as for navigation within a single-page application or for showing/hiding content based on the hash value.