hey,
How to require a phone number when a new user is registering?
There’s no such option for regular users at the moment, but you can try using some plugin for adding a Phone field to user profiles in the WordPress/Users section and add a new field to the front-end registration form.
You can also add a required Phone attribute for vendors, then vendors will have to fill it in before adding the first listing.
1 Like
hi, hope you are doing good,
i added this code
add_filter(
'hivepress/v1/forms/user_register',
function($form) {
$form['fields']['subject'] = [
'label' => 'Subject',
'type' => 'number',
'_order' =>10,
'required' => true,
'attributes' => [
'autocomplete' => 'subject',
],
];
return $form;
}
);
its work but i dont know how to store the data on the backend
Please check this example with the first and last name fields Add first and last name fields to the user registration form #hivepress #users · GitHub
1 Like
This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.