Making vendor setup wizard fields mandatory
-
Hey guys. I’ve heavily edited my setup wizard for my vendors (thanks to your various snippets) but now need to make all the fields that are left mandatory. Meaning that when a vendor follows the setup wizard, all the fields have to be filled in out in order to continue to the next step.
I tried implementing the following code (using logo image and store name as examples) to no success:
add_filter( 'wcfm_marketplace_settings_fields_general', function( $settings_fields_general ) { if( isset( $settings_fields_general['gravatar'] ) ) { $settings_fields_general['gravatar']['custom_attributes'] = array( 'required' => 1 ); } if( isset( $settings_fields_general['store_name'] ) ) { $settings_fields_general['store_name']['custom_attributes'] = array( 'required' => 1 ); } return $settings_fields_general; }, 50 );Meaning that, even though the red asterik was shown, the user could still bypass this step in the wizard.
Any help would be appreciated.
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
The topic ‘Making vendor setup wizard fields mandatory’ is closed to new replies.