• Resolved Mikel

    (@ogmic)


    I have removed the first and last name field from the registration form but I still get an error after clicking on the Register [as a vendor] button – to fill in my first name, and then my last name even though those fields have already been removed.

    How do I remove this validation of for these fields and some other fields [should incase there’s need to].

    Thanks

Viewing 3 replies - 1 through 3 (of 3 total)
  • Hello @ogmic ,

    You need to apply the filter to remove validation by unsetting those required fields. You will find the filter from the below-given file location.

    File path: wp-content/plugins/dokan-lite/includes/Registration.php
    Filter name: dokan_seller_registration_required_fields

    I hope this helps.

    Regards!

    Thread Starter Mikel

    (@ogmic)

    How do I set or apply this filter?

    Thread Starter Mikel

    (@ogmic)

    Thanks @yusuf13
    I have fixed it already following the wp codex filter guide.

    Here is my snippet;

    add_filter( 'dokan_seller_registration_required_fields' , 'dokan_regfield_off' ); 
    function dokan_regfield_off( $required_fields ) { 
    	unset ($required_fields['phone']);
    	unset ($required_fields['fname']);
    	unset ($required_fields['lname']);
    	unset ($required_fields['phone']);
    	unset ($required_fields['shopname']);
    return $required_fields; 
    }
Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Remove Validation of default field on registration form’ is closed to new replies.