Formidable Forms

Formidable Forms

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

Automatically Populate Fields

Last Updated: April 12, 2022

Knowledge Base → Forms → Form Building → Automatically Populate Fields

— Premium Feature —

There are several ways to automatically populate fields. You can autofill fields by pulling values from the current user's profile, for example. You can autofill fields by retrieving submitted values from the current user, IP address, or entry ID. If your users will be going directly from Form A to Form B, you can pass values from Form A to Form B via the entry key. You can also autofill fields by using Dynamic fields.

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

Pass values from Form A to Form B

If users are going directly from Form A to Form B, follow the instructions below to pass values from Form A to Form B.

  1. Go into Form A and click on Settings. Under On submit, select Redirect to URL. In the Redirect URL box, insert the URL of the page that contains Form B followed by a parameter that includes the entry key from Form A.
    Pass Values Redirect URL
    Leave [key] as is because this shortcode will get the entry key.
  2. Go into Form B. Insert the [frm-field-value field_id=x entry=pass_entry] shortcode in the Default Value box in the field options. Replace x with the ID or key of any field from Form A. This shortcode will pull the value from the specified field and entry.
    Pass Values Dynamic Box URL
    If you're populating a file upload field, insert the [frm-field-value field_id=x entry=pass_entry show=id sep=","] shortcode.
    Pass Values URL File Upload
  3. Now, when a user submits Form A, they will be taken to Form B. The entry key from Form A will be passed in the URL. The frm-field-value shortcode will use that entry key to fetch values from the specified fields in Form A.
    Pass Values URL

Populate fields for current user

If you would like to populate fields with values submitted by the current logged-in user, use this shortcode: [frm-field-value field_id=x user_id=current]. Insert the shortcode into the Default Value box in the field options.
Pass Values User ID Dynamic
Replace x with the ID of the field that you would like to get the value from.

If the current user has submitted multiple entries in that field, this shortcode will get the value from the user's most recent entry.

Get values from the user's profile

  1. Go into the form that you would like to autopopulate with values from the user's profile.
  2. Insert any of the following shortcodes into the Default Value box of the field options:
    • [first_name] - Retrieves the user's first name
    • [last_name] - Retrieves the user's last name
    • [display_name] - Retrieves the user's display name
    • [login] - Retrieves the user's username/login
    • [user_id] - Retrieves the user's ID number
    • [email] - Retrieves the user's email address
    • [user_role] - Retrieves the user's WordPress role
    • [user_meta key="address"] - Retrieves specific user meta from the user's profile. Replace "address" with the name of your user meta.

If you would like to be able to add custom user meta to the user's profile, you may use the User Registration add-on for this.

Get values from selected entry

If you would like to automatically populate fields based on a selected entry, follow the directions below.

  1. Publish the form that you want to autofill on a page. Copy the URL of this page.
  2. Create a new form called 'Select entry'. This form is where the user will make their entry selection.
    • Add a 'Dynamic Field' → 'Dropdown'
    • Set it to 'Load options from: Form Entries, -the form you want to pull values from-, any field'
      Dynamic Field Options
  3. Go into the 'Select entry' form's Settings. Select 'Redirect to URL' and insert the URL copied from Step 1. Add ?pass_entry=[x show=key] to the end of the URL. Replace x with the ID of the Dynamic Field.
    Pass Values Dynamic URL
  4. Go into the form that you want to autofill. Insert in the Default Values box of the field options.
    Pass Values Dynamic Box URL
    Replace x with the Key or ID of the field that you want to pull the value from.
  5. Now when the user submits the 'Select entry' form, it will populate fields with values from the selected entry.
    Pass Values Auto Fill Gif

Populate fields by IP address

If your users will not be logged-in and you would like to pull values from another form they submitted, use this shortcode: [frm-field-value field_id=x ip=1]. Insert the shortcode into the Default Value box in the field options.
Pass Values IP Address Dynamic
Replace x with the ID of the field that you would like to get the value from.

Please note, this method has inherent flaws. If the same person uses a different computer, for example, this shortcode will not pull a value from the specified field. If multiple entries have been submitted in Form A from the same IP address, this shortcode will get the value from the most recent entry.

💡 Tip: Google address autofill is another way to get more accurate location data.

Populate fields by entry ID/key

If you would like to pull values from a particular entry to populate your current form, use this shortcode: [frm-field-value field_id=x entry=1296]. Insert the shortcode into the Default Value box in the field options.
Pass Values Entry ID Dynamic
Replace x with the ID of the field that you would like to get the value from and replace 1296 with the entry ID or key that you want to pull values from.

Populating with fields that have separate values

You may want to populate using a field that has separate values. By default, [frm-field-value] will show the label. If you want to show the saved value instead, add the show="value" param. For example, [frm-field-value field_id=x show="value"].

  • Pass values from Form A to Form B
  • Populate fields for current user
  • Get values from the user's profile
  • Get values from selected entry
  • Populate fields by IP address
  • Populate fields by entry ID/key
  • Populating with fields that have separate values
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