How to Preload Field Values in Gator Forms

In other tutorials, you can see how to load Gator Forms using a menu link and custom HTML.

In this guide, we’re going to dig deeper and show you how to preload field values into your Gator Forms. This makes it much easier for your users, because much of the relevant information is already filled into the form.

Guidelines for preloading field values

  • Separate each field with /
  • Separate field alias and values with =
  • Separate multiple values with ;
  • The alias has to be lower-case

Examples of preloading field values

This example below shows how you can open a pop-up contact form and fill in several fields:

#pwebcontact1:name=Tester/message=Testing/checkboxes=Option A;Option B

Here’s a breakdown of the 4 elements in that example.

  • #pwebcontact1 … this is the ID number of the form
  • name=Tester … fills in the name field
  • message=Testing … fills in the message field
  • checkboxes=Option A;Option B … selects 2 checkbox options

You can tweak this example in various ways. In this next situation, this URL below will preload fields values and also open the form on page load:
#pwebcontact1:open:name=Tester/message=Testing/checkboxes=Option A;Option B

This next example shows how to trigger a Gator Form with a link and preload fields values from the data attribute data-pwebcontact-fields
<a href="#" class="pwebcontact1_toggler" data-pwebcontact-fields="name=Tester/message=Testing">Click here</a>

Here’s how to open your Gator Form with a link and preload only once field values from the data attribute data-pwebcontact-fields-once
<a href="#" class="pwebcontact1_toggler" data-pwebcontact-fields-once="name=Tester/message=Testing">Click here</a>

Here’s how to pre-load fields values from JavaScript code
pwebContact1.preloadFields("name=Tester/message=Testing");

in Fields

Related Articles

Start today!

[i]
[i]