Skip to main content

How to Add a Custom Field to the Profile Form

Collect information beyond the standard WordPress profile, such as a phone number or job title, and save it to the user's meta data.

Requirements

A page with a Profile Edit Form module already in place. See How to Build a Profile Edit Page.

1. Add a Custom field

Open the Profile Edit Form module settings. On the General tab, add a new field and set Field to Custom field.

2. Set the meta key

In the Meta Key field, enter the user meta key where the value should be stored, for example phone_number. If the key already holds a value for the user, the form shows it.

3. Label the field

Set the Label (and optionally a placeholder) that users see on the form.

4. Choose the field type

Set Custom Field Types to the input type for this field. Out of the box the type is Text. Additional types (date picker, time picker, select, radio, checkboxes) appear in this dropdown when a developer has enabled them via the bpb_custom_field_types filter; see the Developer Reference.

5. Save and test

Save the module, then load the page as a logged-in user, fill the field, and save the form.

Result

The value is stored in the user's meta under your key, and the form shows the saved value on the next visit. Other plugins and templates can read it with WordPress's standard get_user_meta().

tip

Fields that other plugins store in user meta, such as membership or LMS profile fields, can be edited the same way: point the meta key at the key that plugin uses.