Add new field in registration form.

This topic contains 11 reply and 2 voices, and was last updated by towhid 9 years, 5 months ago
Viewing 11 Posts - 1 through 11 (of 11 total)
Author Posts
June 24, 2015 at 2:41 pm 52969
towhid 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.
June 24, 2015 at 3:10 pm 52973
towhid towhid

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

June 24, 2015 at 11:48 pm 53036
Azad Azad

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

June 25, 2015 at 1:08 pm 53123
towhid towhid

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

June 25, 2015 at 3:33 pm 53144
Azad Azad

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

June 25, 2015 at 3:55 pm 53154
Azad Azad

Did you understand my problem?

June 25, 2015 at 4:08 pm 53160
Azad Azad

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

June 25, 2015 at 4:20 pm 53162
towhid towhid

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

June 25, 2015 at 4:23 pm 53163
towhid towhid

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.

June 26, 2015 at 1:09 am 53227
Azad Azad

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

June 26, 2015 at 4:08 pm 53262
Azad Azad

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

June 27, 2015 at 12:35 pm 53345
towhid towhid

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 11 Posts - 1 through 11 (of 11 total)