Home Forums Theme Support Dokan Add new field in registration form.

This topic is: not resolved

This topic contains 11 replies, has 2 voices, and was last updated by  towhid 3 years, 11 months ago.

Viewing 12 posts - 1 through 12 (of 12 total)
  • Author
    Posts
  • #52969

    Azad
    Member
    Post count: 10

    I hardly can add new field at registration form. I have modified template-tags.php at dokan plugin. field is showing at form but data is not saving at admin panel properly. Please help me.

    #52973

    towhid
    Participant
    Post count: 4505

    Hello Azad,

    Can you please share me the code what you have added in the template-tags.php file. Can you confirm that field is saving data or not?

    Thanks

    #53036

    Azad
    Member
    Post count: 10

    Hi,
    I have added this code

    <p class="form-row form-group form-row-wide">
         <label for="shop-introducer"><?php _e( 'Introducer', 'dokan' ); ?><span class="required">*</span></label>
         <input type="text" class="input-text form-control" name="team_leader" id="shop-introducer" value="<?php if ( ! empty( $_POST['team_leader'] ) ) echo esc_attr($_POST['team_leader']); ?>" required="required" />

    As a result filed is created in the form
    http://www.bd24digitalmarket.com/my-account/

    I have also created a field named ‘Team Leader' at admin panel in user option . I want that data will be save in that field.

    Actually I will make a dropdown option in form where team leader's name will be show to select by the new seller who will register.

    Thanks

    #53123

    towhid
    Participant
    Post count: 4505

    Hello Azad,

    Please open this file plugins/dokan-plugin/classes/admin-user-profile.php. In this file, there is an action name do_action( 'dokan_seller_meta_fields', $user ); . You can extend the user profile through this action.

    Thanks

    #53144

    Azad
    Member
    Post count: 10

    Actually I want to show the data at WordPress user panel not in seller dashboard.

    #53154

    Azad
    Member
    Post count: 10

    Did you understand my problem?

    #53160

    Azad
    Member
    Post count: 10

    I have extended from there and got a field in wordpress user panel. but data is not being saved from registration form.

    #53162

    towhid
    Participant
    Post count: 4505

    Hello Azad,

    You did not understand the reply clearly.

    The function do_action( 'dokan_seller_meta_fields', $user ); is responsible for create a field in user table in the backend.

    Can you please try yourself and let me know the result.

    Thanks

    #53163

    towhid
    Participant
    Post count: 4505

    I will request you to please read and understand thoroughly the admin-user-profile.php file then you will understand how add_meta_fields and save_meta_fields works.

    #53227

    Azad
    Member
    Post count: 10

    Hi,
    Thanks your support. I have added a field called ‘TEAM LEADER' . Now it's working if I write data in that field data become saved from WordPress dashboard which I did before manually also. BUT I need to integrate this field with registration form. All the data like name,phone are being received but team leader/Introducer data is not being saved.

    Do you think I have to do anything else?
    Which code I added in template-tags.php is that enough or I have to do anything else?

    Thanks

    #53262

    Azad
    Member
    Post count: 10

    Hi,
    I have got the solution from another link .

    Now one more problem is to customize the “Seller Listing(Dokan->All Sellers)” . I want to add few filed here.

    Where from I could do that?

    Thanks a lot
    Rumon

    #53345

    towhid
    Participant
    Post count: 4505

    Hello Azad,

    Please open this file plugins/dokan-plugin/classes/template-shortcodes.php.

    This is the file is responsible for show Seller Listing page.

    Thanks

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

The topic ‘Add new field in registration form.’ is closed to new replies.