Tagged: Registration form
June 24, 2015 at 2:41 pm #52969
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
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?
ThanksJune 24, 2015 at 11:48 pm #53036
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
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.
ThanksJune 25, 2015 at 1:08 pm #53123
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.
ThanksJune 25, 2015 at 3:33 pm #53144
Actually I want to show the data at WordPress user panel not in seller dashboard.June 25, 2015 at 3:55 pm #53154
Did you understand my problem?June 25, 2015 at 4:08 pm #53160
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
You did not understand the reply clearly.
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.
ThanksJune 25, 2015 at 4:23 pm #53163
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
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?
ThanksJune 26, 2015 at 4:08 pm #53262
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
RumonJune 27, 2015 at 12:35 pm #53345
Please open this file
This is the file is responsible for show Seller Listing page.
The topic ‘Add new field in registration form.’ is closed to new replies.