Formidable Forms

The Most Advanced WordPress Forms Plugin and Form Builder

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

User ID

Last Updated: April 28, 2020

Knowledge Base → Forms → Form Building → Field Types → User ID

A User ID field stores a logged-in user's ID number when they fill out a form. It helps connect submitted entries to users on your site. The field is not visible in a front-end form.

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

Please note that a userID field saves the user's ID number, but it displays their username in your form's Entries tab, email notification, or View by default. If you would like to display another value from a user's profile, such as first or last name, in an email notification or View, please continue reading here.

Field options

A User ID field has the following options:

    Hidden User Field Options

  • Field type
  • Unique
  • Field key
  • CSS layout classes
  • Dynamic default value
  • Lookup value


Default values and field icons

At times it is useful to automatically populate a user ID field with a pre-defined ID number. If you would like to set a static user ID value to automatically connect entries to a specific user, you may insert a user's ID number in the field's Dynamic Default Value box. Learn more about how to set default values.

Field action icons allow you to duplicate, delete, and/or move a field on the form builder page. See field action icons for more information.

Display User ID fields

Even though a User ID field is hidden, you can still display data from the field in a form's confirmation message, email, or View.

  • Username: Display the username for the saved ID number.

    [x]

    Replace x with the ID or key of the User ID field.

  • User ID: Display the user's ID number.

    [x show="ID"]

    Replace x with the ID or key of the User ID field.

  • First name: Display the user's first name.

    [x show="first_name"]

    Replace x with the ID or key of the User ID field.

  • Last name: Display the user's last name.

    [x show="last_name"]

    Replace x with the ID or key of the User ID field.

  • Display name: Show the user's display name.

    [x show="display_name"]

    Replace x with the ID or key of the User ID field.

  • User login: Display the user's username/login.

    [x show="user_login"]

    Replace x with the ID or key of the User ID field.

  • Email: Show the user's email address.

    [x show="user_email"]

    Replace x with the ID or key of the User ID field.

  • Author Link: Show the user's author link. This is the link that will show all of the posts created by the user.

    [x show="author_link"]

    Replace x with the ID or key of the User ID field.

  • Avatar: Display the user's avatar, if they have one. If they don't have one, it will show the default WordPress profile picture. Use the size parameter to determine the width of the displayed image.

    [x show="avatar" size="250"]

    Replace x with the ID or key of the User ID field.

  • Website: Show the user's website from the WordPress profile page.

    [x show="user_url"]

    Replace x with the ID or key of the User ID field.

  • Role: Show the user's role on the site.

    [x show="roles"]

    Replace x with the ID or key of the User ID field.

  • Blank: By default, [x show="first_name"] or [x show="last_name"] will show the user's login if they do not have a first or last name attached to their profile. Use blank="1" to prevent the login from showing.

    [x show="first_name" blank="1"]

    Replace x with the ID or key of the User ID field.

  • User meta: Display any user meta you have added with the User Registration addon or with any other plugin.

    [x show="address"]

    Replace x with the ID or key of the User ID field. You must replace address with the name of your user meta.

The UserID shortcode options can also be found in the Advanced section of the Customization panel which is located in the right sidebar when you are in your form Settings or a View.

Create view for current user

If you would like to create a View that displays a logged-in user's entries, read how to create a View for the current user.

Related developer hooks

  • Make all userID fields appear as dropdowns on the front-end for administrators with the frm_setup_new_fields_vars hook.
  • Field options
  • Default values and field icons
  • Display User ID fields
  • Create view for current user
  • 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 See User Reviews