Home Forums WC Vendors Pro Support required fields vendor sign-up

NOTICE: We've Moved to a Ticket System for Support

As of August 31, 2017 (12am EST) our support forums will be retired (read-only), and we will be moving to a support ticket system.  This will allow us to better organize and answer support requests, and provide a more personalized experience as we assist our customers.

For the time being, we will leave our forums open for reading and learning while we work on creating a more robust Knowledge Base for everyone to use.

If you are a WC Vendors Pro customer please open a support ticket here. 

If you are a WC Vendors user please open a support ticket on the Wordpress.org forums.

The information on this forum is outdated and in most instances no longer relevant. Please be sure to check our documentation for the most up to date information.

https://docs.wcvendors.com/

Thank you to all of our customers!

 

Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • #54464
    Bram
    Participant

    Hi developers,

    I want to make my custom field required on the vendor sign-up page. The field gets red and says it is required when it is not filled and you hit submit.

    When the field is filled, it is no longer red. BUT the submit button (apply to be vendor) does not work.. So the vendor can no longer submit the sign-up form. I think the required fields are somehow still blocking the form to be submitted..

    Code in my functions.php:

    // IBAN field on vendor pro settings page
    function store_bankc_details( ){ 
    	if ( class_exists( 'WCVendors_Pro' ) ){ 
    		$key = '_wcv_custom_settings_bankcname'; 
    		$value = get_user_meta( get_current_user_id(), $key, true ); 
    		// Bankc Name
    		WCVendors_Pro_Form_Helper::input( array(  
    			'id' 				=> $key, 
    			'label' 			=> __( 'IBAN <small>Required</small>', 'wcvendors-pro' ), 
    			'placeholder' 			=> __( 'IBAN 001 0934093', 'wcvendors-pro' ), 
    			'desc_tip' 			=> 'true', 
    			'description' 			=> __( 'Met het IBAN nummer wordt de gemaakte winst uitbetaald.', 'wcvendors-pro' ), 
    			'type' 				=> 'text', 
    			'value'				=> $value, 
    			'custom_attributes' => array(
    				'data-rules' 	=> 'required', 
    				'data-error'	=> 'Dit veld is verplicht' , 'wcvendors-pro' ,
    				),
    			)
    		);
    	} 
    }
    
    function wcv_custom_settings_bankcname_required( $args ) { 
        $args[ 'custom_attributes' ] = array( 
    	'data-rules' => 'required', // Change 'required' to '' to make it not required (just remove the word required but keep the single quotes)
    	'data-error' => __( 'This field is required.', 'wcvendors-pro' )
    	); 
        return $args; 
    } 
    add_filter( 'wcv_custom_settings_bankcname', 'wcv_custom_settings_bankcname_required' ); 
    

    System report is ok and it is not theme related. Looking for a much appreciated solution!

    #54488
    Anna
    Member

    Hello,
    You have the field required twice?
    The original function already has the required custom attribute…
    Or am I missing something?

    #54537
    Bram
    Participant

    Hi Anna,

    Thanks for your quick reply. I tried both ways to make the field required. When only use it in the original function it doesn’t work as mentioned in my first post. When I only use the required function it does not work at all.

    Looking forward to hearing from you,

    Bram

    #54626
    Anna
    Member

    @brummert
    I am sorry, but I have not been able to work out why this custom code is preventing the submit button form working properly on the vendor application form.

    #55297
    Bram
    Participant

    Anna,

    Thank you for looking into it! Too bad it can not be fixed. I am thinking if switching my theme (currently using Flatsome).
    I do like to ask the following question before doing so to you folks at WC vendors.

    After setting up the terms & conditions I tought everything worked fine, but I stumbled on a bug. See http://www.secondfavor.com to see it for yourself.

    After clicking the “Apply to become vendor” checkbox, the “I agree on the T&C” checkbox is ment to pop up. In my case it does, on any page, except the pro dashbaord page (on my site “Verkopen”), where the checkbox pops up and pops back again immediately. So when you are for example on the Home or Buy (“Kopen”) or explanation (“Uitleg”) page, and register using the light box register (right-top) form everything works fine. It just does not seem to work on the wc vendors pro dashboard page…

    I could not find any related topic on this. I know that the bug is not there when using storefront, so I think I will need to switch. I contacted the company behind the flatsome theme about it a while ago, they said there theme is coded to wordpress standards so it should work and they could not fix it.

    Before switching this awesome theme in I do like to hear your opinion on the bug, thanks in advance!

    #55319
    Anna
    Member

    Bram,
    Yeah _ I see that.

    they said there theme is coded to wordpress standards so it should work and they could not fix it.

    Yes- it may be. However, if they are using some js on that page- it interferes with that checkbox showing correctly (I think).
    If it doe snot happen with Storefront, then you know it is not one of your plugins- the theme is the culprit. Though that is a shame since you have clearly done some work with that theme.

    Let me take a look and see if we can have the checkbox show all of the time, and not just when the “Apply to Become a Vendor” check box is checked. that might help the issue.

    #55348
    Bram
    Participant

    Hi Anna,

    Great to hear you will be looking into it!
    Please note that there is no hurry to solve the problem. I will wait for any possible solutions.

    Thanks in advance!

    #58356
    Bram
    Participant

    Hi Anna,

    Wondering if you got any update on this yet, or if it is not possible to fix I do like to hear it aswell!

    Kind regards,

    Bram

Viewing 8 posts - 1 through 8 (of 8 total)
  • The forum ‘WC Vendors Pro Support’ is closed to new topics and replies.