Hello @arielesponda100491 and @bhavna28,
After overriding the template files, you will need to create a relation with the data for saving the data. On the user registration action hook, you have to save data to the usermeta table.
Here is a simple code to require verification phone_no field and save it to the database.
add_filter('tutor_student_registration_required_fields', 'required_phone_no_callback');
if ( ! function_exists('required_phone_no_callback')){
function required_phone_no_callback($atts){
$atts['phone_no'] = 'Phone Number field is required';
return $atts;
}
}
add_action('user_register', 'add_phone_after_user_register');
add_action('profile_update', 'add_phone_after_user_register');
if ( ! function_exists('add_phone_after_user_register')) {
function add_phone_after_user_register($user_id){
if ( ! empty($_POST['phone_no'])) {
$phone_number = sanitize_text_field($_POST['phone_no']);
update_user_meta($user_id, '_phone_number', $phone_number);
}
}
}
I hope it will help you. FYI, you need to replace phone_no
with your field name.
Regards,
Mehedi