Skip to main content
ZenHub houses documentation to support you if you’re using Contensis Classic. Contensis Classic includes our WYSIWYG and templating features. If you’re working with a newer version of Contensis, is your go-to place to find anything Contensis-related when building with content types.

Pre-populate form fields

There are a number of scenarios where you may want to pre-populate form fields. For example you may be using a form to allow people to register for an event and want the event title to be filled in automatically for the user. To pre-populate form fields you will need to pass the value to the form via the URL. This can be done by targeting each of the form fields via its unique ID.

Find the unique ID

The easiest way to see the unique IDs for your form is to click through to the Form Settings area when editing your form and click on the How to pre-populate the form fields button. This will bring up a window with instructions and provide you with a list of all your form fields with their unique ID alongside it.

Populate the form field

For this example we'll assume you are trying to pre-populate the job title field, the ID of which is f01. Take a look at the URL below to see how we target each field.

As you can see, we are adding on a question mark, followed by the unique field ID, an equals sign and then the value for the form. If we want to add more fields we simply suffix an & (ampersand) sign after the job title and then follow the same process again with the & instead of the question mark. crime

The data inside the URL will be URL encoded. Click here for more information about encoding URL's.