Formidable Forms

The Most Advanced WordPress Forms Plugin and Form Builder

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

Automatically Populate Fields

Last Updated: February 14, 2021

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 into fields that have a text input:
    Pass Value URL field
    If the field does not have a text input, insert the shortcode in the 'Dynamic Default Value' box in the field options:
    Pass Values Dynamic Box URL
    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.If you're populating a file upload field, add show=id sep="," to the frm-field-value shortcode.
  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.

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]. Replace x with the ID of the field that you would like to get the value from.

  • If you're populating a field with a text input, insert the shortcode directly into the field:
    Pass Values User ID
  • If the field does not have a text input, insert the shortcode into the 'Dynamic Default Value' box in the field options.
    Pass Values User ID Dynamic

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 a text field or the 'Dynamic Default Value' box of a non-text field:
      • [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. Put [frm-field-value field_id=x entry=pass_entry] directly in a field if it is a text field.
        Pass Values Text Dynamic
        Otherwise, put it in the Dynamic Default Values box in 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]. Replace x with the ID of the field that you would like to get the value from.

      • If you're populating a field with a text input, insert the shortcode directly into the field.
        Pass Values IP Address
      • If the field does not have a text input, insert the shortcode into the 'Dynamic Default Value' box in the field options.
        Pass Values IP Address Dynamic

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.

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]. 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.

    • If you're populating a field with a text input, insert the shortcode directly into the field.
      Pass Values Entry ID
    • If the field does not have a text input, insert the shortcode into the 'Dynamic Default Value' box in the field options.
      Pass Values Entry ID Dynamic

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
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
  • Free Online Form Builder

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 See User Reviews