Theme and Plugin Support
Tagged: Vendor registration
-
AuthorPosts
-
-
March 23, 2022 at 4:41 PM #135698t.sarsevanidzeParticipant
Hello, I want to add a custom field in registration form. added in templates/shortcode/vendor_registration.php . how to access to save this as a customer user meta as separeted?
-
March 23, 2022 at 4:51 PM #135699t.sarsevanidzeParticipant
is there any hook that I can save my own created field?
-
March 23, 2022 at 6:34 PM #135704MVX Support NinjaKeymaster
Hi,
To save registration user meta, use below code-add_action( 'user_register', 'set_user_custom_data', 10, 1 ); function set_user_custom_data( $user_id ) { if (isset($_POST['new_text'])) {// your input type name // Update the registration meta data update_user_meta ( $user_id, 'test', $_POST['new_text'] );// your input type name } }
CopyNOTE – Kindly change the name as per the added code.
Regards,
-
March 23, 2022 at 6:42 PM #135705t.sarsevanidzeParticipant
is it possible also it to edit in vendor dashboard and vendor admin panel?
in vendor registration I have added this https://prnt.sc/9-ylxq5jsLIe its in /shortcode/vendor_registration.php
and also in functions.php I have added that snipped but it doesn’t worked my edited code snippet is next https://prnt.sc/eQ9cylbLRWyR
-
March 23, 2022 at 9:00 PM #135708t.sarsevanidzeParticipant
its not saved https://prnt.sc/VyJYG2WSEaM2
In vendor registration I have added this https://prnt.sc/9-ylxq5jsLIe its in /shortcode/vendor_registration.php
and also in functions.php I have added that snipped but it doesn’t worked my edited code snippet is next https://prnt.sc/eQ9cylbLRWyR
-
-
March 23, 2022 at 9:00 PM #135706t.sarsevanidzeParticipant
in vendor registration I have added this https://prnt.sc/9-ylxq5jsLIe its in /shortcode/vendor_registration.php
and also in functions.php I have added that snipped but it doesn’t worked my edited code snippet is next https://prnt.sc/eQ9cylbLRWyR
-
March 23, 2022 at 9:00 PM #135707t.sarsevanidzeParticipant
In vendor registration I have added this https://prnt.sc/9-ylxq5jsLIe its in /shortcode/vendor_registration.php
and also in functions.php I have added that snipped but it doesn’t worked my edited code snippet is next https://prnt.sc/eQ9cylbLRWyR -
March 23, 2022 at 9:00 PM #135709t.sarsevanidzeParticipant
tried a lot of variations but
its not saved https://prnt.sc/VyJYG2WSEaM2
In vendor registration I have added this https://prnt.sc/9-ylxq5jsLIe its in /shortcode/vendor_registration.php
and also in functions.php I have added that snipped but it doesn’t worked my edited code snippet is next https://prnt.sc/eQ9cylbLRWyR -
March 23, 2022 at 9:00 PM #135713t.sarsevanidzeParticipant
// In vendor registration I have added this https://prnt.sc/9-ylxq5jsLIe its in /shortcode/vendor_registration.php
// and also in functions.php I have added that snipped but it doesn’t worked my edited code snippet is next https://prnt.sc/eQ9cylbLRWyR -
March 23, 2022 at 9:01 PM #135727MVX Support NinjaKeymaster
Can you please explain what are you referring to as “is it possible also it to edit in vendor dashboard and vendor admin panel?”, so we can assist you.
-
March 23, 2022 at 9:06 PM #135728t.sarsevanidzeParticipant
just that when user selects its own category. to allow also to change it in storefront settings.
user_register function that u sent me doesn’t worked. can u help
-
-
March 24, 2022 at 5:33 PM #135754MVX Support NinjaKeymaster
Hi,
I have added a custom text field and save the data into the data base using below code// kindly add below code to the function.php of your active theme folder add_action( 'user_register', 'set_user_custom_data', 10, 1 ); function set_user_custom_data( $user_id ) { // if (isset($_POST['new_text'])) {// your input type name // Update the registration meta data update_user_meta ( $user_id, 'test', $_POST['new_text'] );// your input type name } } add_action('wcmp_vendor_register_form', 'wcmp_custom_select_field'); function wcmp_custom_select_field() { ?> <div class="wcmp-regi-12"> <label for="test"><?php _e('test', 'dc-woocommerce-multi-vendor'); ?> <span class="required">*</span></label> <input type="text" required="required" name="new_text" id="new_text" /> </div> <?php }
CopyKindly checkout the video – https://gdskavr9sw.vmaker.com/record/1Mk5Xpavj1fd4BYy
Regards,
-
-
AuthorPosts
The topic ‘Add custom field in registration form’ is closed to new replies.