Home Forums Theme Support Dokan How to add more field in registration form

This topic is: not resolved

Tagged: 

This topic contains 8 replies, has 4 voices, and was last updated by  Simon 5 years ago.

Viewing 9 posts - 1 through 9 (of 9 total)
  • Author
    Posts
  • #17636

    Mohd Ghufran
    Member
    Post count: 25

    Hi Support,

    I need to add one or two more field for Seller during registration. How to do that?

    Thanks

    #17646

    Sk
    Moderator
    Post count: 371

    Hello Mohd Ghufran,

    You could manually add your fields in the function function dokan_seller_reg_form_fields() in dokan/includes/template-tags.php on line 367.

    Please be aware on next update if you edit the function. You may lose your custom code.

    Thank you.

    #17816

    Anders
    Participant
    Post count: 58

    Hi!

    How do I make parts of the registration forms for sellers not required?
    For example I want the phone number not to be required ๐Ÿ˜‰

    Anders

    #17831

    Sk
    Moderator
    Post count: 371

    Hi Anders,

    You could change required fields in the function function dokan_seller_reg_form_fields() in dokan/includes/template-tags.php on line 367.

    erase <span class="required">*</span> from field label and required="required" from field.

    The field will not be required any more.

    Thank you.

    #17835

    Anders
    Participant
    Post count: 58

    Hi!

    Thank you for your quick reply!

    I have already done that, but it seems like there is some kind of woocommerce problem when I have deleted that ๐Ÿ˜› Your form is no longer requiring it, but woocommerce do.

    How do I disable this for woocommerce as well?

    #17871

    Anders
    Participant
    Post count: 58

    Any tips?

    #17978

    Anders
    Participant
    Post count: 58

    I guess that there is here I have to change something ๐Ÿ˜‰
    Dokan – E-commerce with WordPress made easy: wc-functions.php (includes/wc-functions.php)

    #18289

    Anders
    Participant
    Post count: 58

    I found out of it although Wedevs does not answer ๐Ÿ˜‰ When you have finnished the steps over deleting required="required" and <span class="required">*</span> in dokan/includes/template-tags.php on line 367, you have to do one more thing.

    Go to the dokan/includes/wc-function.php: find

     if ( $role == 'seller' ) {
    
            $first_name = trim( $_POST['fname'] );
            if ( empty( $first_name ) ) {
                return new WP_Error( 'fname-error', __( 'Please enter your first name.', 'dokan' ) );
            }

    In stead of “seller” add some thing else here: for exemple subscriber ๐Ÿ˜‰

    Then the fields will no longer be required ๐Ÿ˜‰

    #18365

    Simon
    Member
    Post count: 8

    Hi,

    So how to do also change the fields in the seller's profile in the dashboard (front end) and the admin (backend WP) ?

    thanks

    Simon

Viewing 9 posts - 1 through 9 (of 9 total)

The topic ‘How to add more field in registration form’ is closed to new replies.