Apps Ballance Chat Click Code Cog_Wheels Compose_email Conference Contacts Earth Edit_File_1_ Email Email_2 File Folder_2 Gift Group Group_2 Help ID ID_2 Key Keys Laptop_Store Link Lock Log_Out Map Marketing Mobile_UI Navigation Partnership Profile Safe_2 Search_User Secure_Files Settings Share Shield Shield_2 Shopping_Cart Support_Male Trash Type_pin User_female User_male logo copy

User Field Type

Iain Poulson avatar
Iain Poulson Last updated on April 26, 2021

The user field is a new field type available in WP User Manager’s Custom Fields addon. This field type allows your users to select other users of the site when registering for a new one. 

The User Field type helps to define the relationships between users in your site.

How To Create a User Field Type

Adding User Field is just as simple as adding any other custom fields in your registration form.

  1. Navigate to Users > Custom Fields

  1. You can click the ‘Add New Field Group’ to add another field group or click ‘Customize Fields’ if you want to customize an existing field group.

  1. Click ‘Add new custom field’ on the upper left side of your field editor page.

  1. Go to ‘Advanced Fields’ then type in your desired ‘Field name’. 
  2. Select the ‘User’ field, then click ‘Create custom field’ to open the settings and options for the User Field type.

General

In the ‘General’ options you can define the basic settings of your user field.

  1. You can edit the ‘Field title’ of your user field.
  2. You have the option to add ‘Field description’ if needed.
  3. It also shows an auto-generated ‘Unique meta key’ that will be used to store information about your users in your website database.
  4. You can also put a ‘Placeholder’ for your User Field if needed. 

  1. You can also choose to ‘Filter by role’ your User Field and select different roles from Administrator, Editor, Customer, and more.

  1. You can ‘Allow multiple selection’ and‘Show users with hidden profiles’. 
  2. You can also put a ‘Type label’ for your users.

Validation

You can make your User Field a mandatory field to fill before the form can be processed by enabling the ‘Set as required’ option in the ‘Validation’ settings.

Privacy

You can choose to make your User Field ‘Publicly visible’ or ‘Hidden’ on user’s profiles.

Permissions

Under ‘Permissions’ you can set who can edit the User Field. YOu can choose to make it ‘Publicly editable’ or ‘Hidden’ within the front-end of your account page. 

You can also prevent users from editing the User Field by enabling the ‘Set as read only’ option.

For conditional logic, please see our detailed documentation on the conditional field type. <insert interlinks>

Once you’re done with the settings, click “Save changes”to create the User Field.

Adding User Field to The Registration Form

Now that you have created a User Field the next step is to add the User Field to the Registration Form.

  1. Navigate to Users > Registration Forms

  1. You can create a new Registration Form by clicking the ‘Add New Form’ or you can edit an existing Registration Form by clicking the ‘Customize Form’.

  1. Drag and drop the User Field you created from the list of ‘Available Fields’ to the list of ‘Form Fields’.

  1. The changes you made will be saved automatically.

Preview

Once you’ve added the User Field to the registration form you can now preview by logging out and going to the Registration Form on your site. 

The Profile and Account Page

The appearance of the User Field depends on the ‘Privacy’ and ‘ Permissions’ settings that you set for the User Field.

Editing the User Field from the Profile Page

Once the user has successfully registered, the user can now view the profile page. 

If the ‘Privacy’ and ‘Permissions’ settings that you set for the user field allows the user to update and edit the information from their account or profile page, the user can click the ‘Edit account’ beside the Username to go to the Account page and edit the fields. 

Need more help?

If you still didn't find an answer you can always contact us

Submit a ticket