Adding and Editing Form Fields

Follow

Note

We recommend that you do not use Unbounce to collect sensitive information such as credit card numbers or personal health data.

Note

Only one form is allowed per landing page.

Forms are a foundational element for lead generation landing pages. How you design your forms has a huge impact on your conversion rates, and dictates the information that will come your way once a lead has converted. There are several more advanced uses of forms including pre-filling form fields, UTM tracking, and multi-step forms. This article will get you on your way.

This article will help you out with:



Adding and Editing Form Fields

  1. Double click on the form fields to edit an existing form

OR

  1. Drag and drop the Form Widget from the Widget Panel on the left to add a new form
  2. Select fields from the custom and pre-defined fields on the left of the Form Designer
  3. Click fields to edit
    • Field-specific options will appear on the right of the Form Designer
    • Move fields up and down using the directional buttons below the field in the Form Designer
    • Delete fields with the red button below the field in the Form Designer
  4. Click Done once you're happy with the Form

Name and email are set as required fields and email will automatically validate email addresses to ensure that an actual email is used. If you add a phone number field you can set it to validate for different regions.

Note:

Australian validation will allow 8-10 digits.
UK validation will allow 10-13 digits, beginning with +, 44, or 0.
Generic validation will allow 6-12 digits, and special characters.

Custom Field Names

You also have the option of entering different values for 'Field Name and ID' and 'Form Label'. This is useful if you will be downloading a CSV of your leads, and you’d like the value name to be simpler or shorter. This also allows multiple fields to have the same label, so you can specify uppercase characters for their form field labels. 

By default, the field 'Field Name and ID' will be the same as your 'Field Label'. If you want to customize it, simply uncheck “Auto-generate from Field Label” in the 'Name and ID' section.

You can also add text fields that you name yourself, checkboxes, radio buttons, custom and pre-made dropdown menus, or hidden fields - which can be useful with some of our advanced features and integrations. Please note that hidden fields will only have an input option for 'Field Name and ID', not 'Field Label'.

When you switch between fields, the "Auto-generate from Field Label" will only be re-checked if the value of the 'Field Name and ID' exactly matches the auto-generated version of the 'Field Label'. 


Form Properties

Single click the form fields and you'll see the Form Properties on the right on the Page Builder.

Geometry

Manually adjust size and position.

Form Confirmation

See our next section

Label Attributes

Adjust alignment, and font face, colour, and size.

Field Attributes

Adjust field height, spacing between, and internal font size. You can also select the field border, - including corner radius - background and text colours as well as turning on or off an inner shadow.

Checkbox & Radio Button Attributes

If you've added checkboxes or radio buttons you can adjust font face, colour, and size.


Toggling Between Horizontal/Vertical Form Fields

Switching up your form field's horizontal/vertical attributes offers you another way to display your information within dimension-restricted forms, so that you may avoid covering vital content and create an overall better user experience. Cool, huh?

Pro-tip:

For landing pages and overlays only:

If you used a custom script
as a workaround for extending the horizontal/vertical functionality of a form prior to this feature being released, your form might be adversely affected if you decide to republish the page or overlay (sticky bar forms will not be affected).

If you do need to republish an existing page or overlay that contains a custom script for extending the horizontal/vertical functionality, we recommend that you do a quick check by duplicating your page/overlay and republishing the duplicate version. If the script in your duplicate does break after you do this, you’ll want to make sure that before you next republish the live version, you remove the custom script.

Feel free to check out the chatter in the Community on this new feature for more insight! 

This section will help you out with:

  • Toggling between Horizontal/Vertical Form Fields in Landing Pages
  • Toggling between Horizontal/Vertical Form Fields in Overlays
  • Toggling between Horizontal/Vertical Form Fields in Sticky Bars

Toggling between Horizontal/Vertical Form Fields in Landing Pages

Your new landing page form fields will be set to vertical display (stacked on top of each other) by default when you create your form. Follow these steps to switch your form field to horizontal display (stacked side-by-side) instead:

  1. Select your form fields and scroll down to "Field Attributes" in the Properties panel.
    Scroll_down_to_Field_Attributes__LPs_.png
  2. Drag the "Columns" slider control button to the right to horizontally shift your form fields.
    Enabling_Horizontal_Form_Field__Landing_Pages_.gif
  3. To revert back to vertical form fields, drag the "Columns" slider control button back to the left.

Toggling Between Horizontal/Vertical Form Fields in Overlays

Your new overlay form fields will be set to vertical display (stacked on top of each other) by default when you create your form. Follow these steps to switch your form field to horizontal display (stacked side-by-side) instead:

  1. Select your form fields and scroll down to "Field Attributes" in the Properties panel.
    Scroll_down_to_Field_Attributes__Overlays___Original_.png
  2. Drag the "Columns" slider control button to the left to vertically shift your form fields.
    Enabling_Horizontal_Form_Field__Overlays_.gif
  3. To revert back to vertical form fields, drag the "Columns" slider control button back to the left.

Toggling Between Horizontal/Vertical Form Fields in Sticky Bars

Your new sticky bar form fields will be set to horizontal display (stacked side-by-side) by default when you create your form. Follow these steps to switch your form field to vertical display (stacked on top of each other) instead:

  1. Select your form fields and scroll down to "Field Attributes" in the Properties panel.
    Scroll_down_to_Field_Attributes.png
  2. Drag the "Columns" slider control button to the left to vertically shift your form fields.
    Enabling_Vertical_Form_Field__Sticky_Bars_.gif
  3. To revert back to horizontal form fields, drag the "Columns" slider control button back to the right.

Loading a Form into a Lightbox

To load a form into your lightbox:

    1. If you haven't already, add a new lightbox button by dragging and dropping the widget from the panel on the left.
      Enabling_Vertical_Form_Field__Sticky_Bars_.gif
    2. Click "Lightbox" in the upper left corner of the Page Builder and drag and drop the Form button from the panel on the left into the Lightbox content field.

      Remember that only one form is allowed per landing page, so if your Form button is greyed out you will need to remove the existing form before you can add a new one.

    3. Design your form and click "Done" when you're finished.

      You can now modify the form on your Lightbox just as you would in any other page in the Builder.

Related articles:

Loading Content into a Lightbox
Adding an Image Preview in a Lightbox


Passing URL Parameters Through a Form

Note

If you are concerned about GDPR compliance or Google Analytics privacy policy please refrain from appending personal identifiable information to the the URL on form submissions.

When using a form (rather than a button) URL parameters can't automatically be passed along to another page (or the form confirmation).

Unbounce forms pass along form data, but not URL parameters. To pass your incoming URL parameters you'll need to set up hidden fields to receive any incoming parameters:

  1. Add hidden field(s) to your form by double clicking your existing form and clicking the Hidden Field button on the left of the Form Designer
  2. Name the fields the same as your incoming parameters:parameter.png
  3. If you're sending traffic to another page (not your Form Configuration), check "Append form data to URL" from the Properties Pane on the right:Screen_Shot_2012-05-01_at_9.16.12_PM.png

All form data is passed through upon submission, so your incoming URL parameters will now be passed along to the next destination (whether Form Confirmation, or another page).


Pre-filling a Form with URL Parameters

Note

If you are concerned about GDPR compliance or Google Analytics privacy policy please refrain from appending personal identifiable information to the the URL on form submissions.

With Unbounce, you can easily pre-fill your form fields with URL parameters (also known as query parameters).

What's a URL parameter you ask?

Well, among other things, a URL parameter is a way to pass data in a link to a web page. You can use URL parameters  to track different metrics in services like Google Analytics or in this case, to pre-fill your form.

A URL parameter has two parts. A variable name and a value. In example below, "coupon" is the variable name and "50_2013" is the value:

http://unbouncepages.com/puravida?coupon=50_2013

Let's say you want to pre-fill a coupon code on your form. Great.

Using the example above, you'd just need to add a "coupon" field to your form and it would automatically pre-fill with the matching query parameter. Like this:

 Screen_Shot_2013-09-13_at_4.14.01_PM.png

A popular use-case for this is when you're using Google's UTM tracking...

Google has a popular URL building tool for tagging your links with useful data (which also happens automatically if your Google ADwords and Google Analytics accounts are linked). This will result in some paramaters being tacked onto the end of your Unbounce page URL which might look like this:

http://try.myproduct.com/landing-page?utm_source=google&utm_medium=ppc

To capture this data in your form, just create a hidden field for each tag and give them the same name as the tag, so for this example you'd create the following hidden fields:

Picture_1.png


Multi-step Forms

Note

If you are concerned about GDPR compliance or Google Analytics privacy policy please refrain from appending personal identifiable information to the the URL on form submissions.

You can use the form settings to create multi-step forms in Unbounce.

Setting it Up

  1. Create a new page.
  2. Add a form to the page that collects some basic information (such as first name and email).Picture_6.png
  3. In the Properties Pane on the right (with your form selected), set the confirmation to "Go to another web page".
  4. Add the URL for the next page you're going to build. In this case I'll use the URL "http://promo.site.com/step2".
    Screen_Shot_2012-05-01_at_9.16.12_PM.png
  5. Check "Append form data to URL".
  6. Publish the page.
  7. Create the second page. You'll probably want to just duplicate this page so that your design is the same. My second page is called Multi-step Form #2.
  8. Give it the URL that we used in step #4 (in this case: http://promo.site.com/step2).
  9. Edit the form on your second page to ask for whatever other information you need:       Picture_8.png
  10. Add hidden fields for the information you asked for on the first form, matching the field names. In this case that's "First Name" and "Email". Leave the default values blank. Picture_9.png
  11. Publish your page.

Now when the visitor fills out the first form, they'll be redirected to the second form and when they fill that one out, it will contain the data from both forms in the lead information. If you want to have more than just 2 steps, simply repeat #7-#10 for each middle page. Please note that depending on how much data your fields are collecting, this method will break down after a while, as URLs do have a maximum length.

You can also pass incoming URL parameters through your form with hidden fields as shown later in this article.

How does this work?

Unbounce pages will automatically pre-populate a form field of the same name as a GET paramater - so since we added hidden fields named "first_name" and "email", those will be automatically populated with the values form the URL.

What's cool about this?

Aside from being able to spread out a form into multiple steps so as not to scare a visitor off on your first page, you also get the benefit of measuring each step along the way. You can test different variants of each page, and you can also set up integrations for each step as well. You'll probably want to set up your MailChimp/AWeber/Constant Contact integration on the last step, but you could set up an email notification on the first step if you want to be notified of users that may not get all the way through your form.

We know this is a bit complicated for something that should be very simple, and we are really looking forward to when we can tackle this as a built-in feature in Unbounce. Until then though, we'd love to hear about anyone who has this successfully set up!


Adding a Calendar Date Picker to Your Form

While we don't support this feature within the Unbounce app yet, check out "[How to] Add a Calendar Date Picker To Your Form" in the Community for a great workaround in the meantime.


Adding Placeholder Text to Form Fields

This feature allows you to add a greyed-out default value that will disappear as soon as your visitors start to type within the field.

Not only is this a helpful additional visual cue for your visitors, you can save space within your dimension-restricted Popup or Sticky Bar by including your form field cues within the form field instead of adjacent to it.

Follow these steps to add placeholder text to your form from within the Builder:

  1. Double-click your form field.
    Double_Click_your_Form_Field.png
  2. Select the form field you wish to add placeholder text to and type your desired placeholder text in the "Field Placeholder Text" field.
    Enter_Your_Placeholder_Text.png
    Placeholder text cannot currently be styled and will appear in sans-serif Arial typeface on your published Popup or Sticky Bar.
  3. By default, the Field Label will appear above the Field Placeholder Text on your published Popup or Sticky Bar (see below).
    Don_t_Hide_Label.png

    If you would rather the Field Label not appear above the Field Placeholder Text on your published Popup or Sticky Bar (see below), you can hide the field label.
    Hide_Label.png
    To hide a Field Label, click "Hide Label" under the Field Label text field. You'll see the Field Label disappear from the Form Design window when you enable this option.
    Click_Hide_Label.png
  4. Click "Done".
    Click_Done__1_.png
  5. Back in the Builder, you'll see your shiny, new placeholder text within your form field. Click "Save" to lock it in, and you're done!
    Click_Save.png

Modifying Form Validation Error Messages

This feature requires custom Javascript. If you aren't familiar with Javascript, please contact one of our support coaches for an alternative solution.

When a visitor fills out the form on your page but their form entry doesn't validate, they'll see some errors, which look like this by default:

errors1.png

If you like, you can customize these errors in a couple of ways:

Customize the wording

You can modify the wording by adding a snippet of Javascript to your landing page. Here's the script:

To add it to your page, click Javascripts in the bottom left of the Page Builder, and then paste the script in. Then, adjust the bottom script to add your custom messages.

errors3.png

For example, if you have a field with the ID of email_address, you can adjust its error messages with a line like this:

errors.changeField('email_address', 'Please enter an email address', 'This email address is invalid');

Here's the result:

errors2.png

Customize the visual style

If you're familiar with CSS, you can also change the styling of the error message. Paste the following into the Stylesheets section of your page, and adjust it to give the style you want.


Glossary

Form fields: Used to collect user information for lead generation


About_The_Author.png

Was this article helpful?
22 out of 30 found this helpful