Formidable Forms

Formidable Forms

  • Features
  • Pricing
  • Resources
    • Docs & Support
    • Blog
    • Community
  • Solutions
    • Web Applications
    • Calculators
    • Surveys
    • Directories
    • Payments
    • Contact forms
  • Login
  • Get Formidable Forms

Address

Last Updated: July 19, 2022

Knowledge Base → Forms → Form Building → Field Types → Address
— Premium Feature —

Address fields provides the necessary inputs for entering an address. This means you can add all the inputs for an address with a single click instead of adding, renaming, and formatting multiple fields.
Address fields

Formidable Forms is the best WordPress Form Builder plugin. Get it for free!

Standard field options

An address field has the following field options:
Address Field OptionsAddress Field Options

  • Required
  • Read Only
  • CSS Layout Classes
  • Visibility
  • Label position
  • Field Key
  • Conditional logic

Field-specific options

— Premium Feature —

Address Type

If you would like to remove the Country dropdown or only show US States, go into your Address field's options and scroll down to Address Type.
Address Type
There are three address types that can be used.

  • International will include the Country dropdown. This will be selected by default.
  • United States will not include the Country dropdown. The State field becomes a dropdown field with only US states.
  • Other - exclude country field will not include the Country dropdown.

Insert placeholders

If you would like to add placeholders to the address inputs, follow the steps below.

  1. Go to your form Build page.
  2. Select the address field where you would like to insert a placeholder. In the field options, go to the Advanced section and insert your desired placeholder text in the address fields.
    Address fields Placeholder
  3. Save the form and click Preview. Now when the user opens the form, the address fields will show the placeholder text. When they start typing in the address fields, the placeholder text will be cleared.
    Address fields Placeholder Gif
  4. For more information on placeholder text, visit the Placeholders page.

Insert default values

If you would like to add default values to the address inputs, follow the steps below.

  1. Go to your form Build page.
  2. Select the address field where you would like to insert default values. In the field options, go to the Advanced section and click the menu icon. This will automatically open the Smart Default Values settings where you could search for default values.
    Address fields Default Values
  3. Save the form and click Preview. Now when the user opens the form, the address field would be dynamically populated with the default value.
  4. For more information on default values, visit the Default Values page.

Address autocomplete

Learn how to use Formidable Geolocation for address autocomplete for better accuracy and more consistent data.

Display address fields

If you would like to display specific data from an Address field, insert the following shortcodes into a View or email. In all the examples, replace x with the field ID/key of the address field.

  • Display the address field:

    [x]
  • Display the first line of the Street Address:

    [x show="line1"]
  • Display the second line of the Street Address:

    [x show="line2"]
  • Display the City:

    [x show="city"]
  • Display the State:

    [x show="state"]
  • Display the Zip Code:

    [x show="zip"]
  • Display the Country:

    [x show="country"]

Related customizations

Country dropdown list

If you would like to change the countries included in the Country dropdown, insert the following code in the WPCode plugin or a child theme’s functions.php file. Replace Ireland and England with the countries you would like to include.

add_filter( 'frm_countries', 'change_countries');
function change_countries( $countries ){
    $countries = array('Ireland', 'England');
    return $countries;
}

If you would like to add to the existing country dropdown list instead of replacing it, or want the most used countries at the top of the list, insert the following code. Replace United Kingdom and United States with the countries you would like to include.

add_filter( 'frm_countries', 'add_countries');
function add_countries( $countries ){
    array_unshift($countries, 'United Kingdom', 'United States');
    return $countries;
}

State dropdown list

If you would like to add a state to the US States dropdown, insert the following code in the WPCode plugin or a child theme’s functions.php file. Replace Puerto Rico with the state you would like to include.

add_filter( 'frm_us_states', 'add_states');
function add_states( $states ){
    array_push($states, 'Puerto Rico');
    return $states;
}

State abbreviations

If you would like to show the states' abbreviations instead of their full names, insert the following code in the WPCode plugin or a child theme’s functions.php file.

add_filter( 'frm_us_states', 'frm_us_state_abbreviations');
function frm_us_state_abbreviations( $states ){
$states = array( 'AL', 'AK', 'AZ', 'AR', 'CA', 'CO', 'CT', 'DE', 'DC', 'FL', 'GA', 'HI', 'ID', 'IL', 'IN', 'IA', 'KS', 'KY', 'LA', 'ME', 'MD', 'MA', 'MI', 'MN', 'MS', 'MO', 'MT', 'NE', 'NV', 'NH', 'NJ', 'NM', 'NY', 'NC', 'ND', 'OH', 'OK', 'OR', 'PA', 'RI', 'SC', 'SD', 'TN', 'TX', 'UT', 'VT', 'VA', 'WA', 'WV', 'WI', 'WY' );
return $states;
}

Related developer hooks

  • Change the labels in an address field with the frm_combo_dropdown_label hook.
  • Remove the second line of the street address with the frm_address_sub_fields hook.
  • Standard field options
  • Field-specific options
    • Address Type
  • Insert placeholders
  • Insert default values
  • Address autocomplete
  • Display address fields
  • Related customizations
    • Country dropdown list
    • State dropdown list
    • State abbreviations
  • Related developer hooks
Categories
×

Categories

  • Installation & Getting Started
  • Account Management
  • Forms
  • Entries
  • Views
  • Styles
  • Importing & Exporting
  • Add-Ons
  • Extend Formidable Forms

Using WordPress and want to get Formidable Forms for free?

Get Formidable Forms Lite Now

You do not have permission to view this form. Maybe you need to log in?

This article may contain affiliate links. Once in a while, we earn commissions from those links. But we only recommend products we like, with or without commissions.

Take on bigger projects Right Now

Get the tools you need to revolutionize your workflow and architect a masterpiece. Build the most advanced WordPress forms and actually use the data you collect in meaningful ways.

Get the most advanced WordPress form plugin and the only form builder with integrated Views.

Get Formidable Forms Now

Resources

  • Community
  • Affiliates
  • Contact
  • Free Online Form Builder

Top Features

  • Application Builder
  • Calculator Forms
  • Surveys & Polls
  • Quiz Maker
  • Form Templates
  • Application Templates
  • Directories
  • Donation Plugin

Company

  • About Us
  • Giving Back
  • Careers
  • Newsletter
  • WP Tasty
  • Nutrifox

Copyright © 2023 Strategy11, LLC. Formidable Forms® is a registered trademark Strategy11, LLC.
Privacy Policy | Terms of Service | Sitemap

Join 300,000+ using Formidable Forms to create form-focused solutions fast. Get Started See User Reviews