Formidable Forms

The Most Advanced WordPress Forms Plugin and Form Builder

  • Features
  • Pricing
  • Blog
  • Support
  • Login
  • Get Formidable Forms

Address

Last Updated: October 8, 2020

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

  • Field Type
  • Required
  • Field Key
  • CSS Layout Classes
  • Label position
  • Visibility
  • 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.

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 Code Snippets 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 Code Snippets 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;
}

Related developer hooks

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

Categories

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

Using WordPress and want to get Formidable Forms for free?

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

Top Features

  • Front End Editor
  • Repeating Fields
  • Views from Entries
  • Calculator Forms
  • Conditional Logic
  • Visual Form Styler
  • Form Templates
  • User Submitted Posts
  • File Upload Forms
  • Spam Protection
  • Multi Page Forms
  • Surveys & Polls
  • Form Graphs & Charts
  • Save and Continue
  • Mobile Forms
  • Stripe Forms
  • PayPal Forms
  • WooCommerce Forms
  • MailChimp Forms
  • User Registration
  • Signature Forms
  • Bootstrap Forms
  • Quiz Maker
  • Zapier Forms
  • Salesforce Forms
  • HubSpot Forms
  • API Webhooks
  • Multilingual Forms
  • Directories

Company

  • About Us
  • Giving Back
  • Careers
  • Newsletter
  • Blog

Copyright © 2021 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