How to prefill fields

User experience is critical to your form conversions. With Kali Forms you can improve the submission process by requesting the minimum number of fields from your users. This is done by prefilling form fields with information that is already available.

You can prefill fields using URL parameters, the syntax is:

https://domain-name.com/form-page/?field-name=prefill-value

For example if you are using the basic contact form available in the plugin at the following page:

https://domain-name.com/contact/

… and you want to prefill the name field you only need to add ?name=John%20Doe to the URL:

https://domain-name.com/contact/?name=John%20Doe

If you are wondering what the %20 represents, this is the encoded version of an empty space. Since you cannot add spaces or other special characters in your URL, you must encode these characters using a percent sign and the hexadecimal value assigned to the character in the ISO-Latin character set. A space is assigned number 32, which is 20 in hexadecimal.

This can also be applied for dropdowns, radio and checkbox fields, the only difference is when you want to select multiple options in a checkbox field. In this case the syntax is a little different:

https://domain-name.com/form-page/?checkbox-group[]=first-value&checkbox-group[]=second-value

The first parameter that you add to your URL needs to use ? while the rest of your parameters will use &.

Was this article helpful to you? Yes No

Still stuck? We’re here to help.

Send us a message and we’ll get back to you as soon as we can.

Copy link
Powered by Social Snap