Multi Vendor Marketplace Plugin | WCFM Marketplace › Forums › WCFM – Marketplace (WooCommerce Multivendor Marketplace) › How to make the country and state mandatory field to be filled.
- This topic has 3 replies, 4 voices, and was last updated 4 years, 5 months ago by Sarmistha Chakraborty.
- AuthorPosts
- August 27, 2019 at 11:01 am #78512georgeannaParticipant
I want to make the field of state and country obligatory to be fulfilled.
As it looks in code it has the mandatory attribute:“state” => array(‘label’ => __(‘Store State/County’, ‘wc-multivendor-marketplace’), ‘name’ => ‘vendor_data[address][state]’, ‘type’ => ‘select’, ‘in_table’ => ‘yes’, ‘class’ => ‘wcfm-select wcfm_ele’, ‘label_class’ => ‘wcfm_title wcfm_ele’, ‘custom_attributes’ => array( ‘required’ => true ), ‘options’ => $state_options, ‘value’ => $state ).
On class-wcfmmp-store-setuo.php file.
But if you leave it blank and press “Continue” it goes to the next stage.
How can i fix it.
Thank you - August 30, 2019 at 5:04 am #79116WCFM ForumMember
Hi,
Well, there has many fields which are required, but we do not apply these rules at “Store Setup” widget.
But when vendor will be at his dashboard’s setting section then he has to filled up these fields.
Thank You
- June 4, 2020 at 10:35 am #138231mohsinkhan3687Participant
hi wcfm
i want to make store setup field mandatory how i will do thatAttachments:
You must be logged in to view attached files.- June 4, 2020 at 1:56 pm #138280Sarmistha ChakrabortyMember
Hello,
We have already replied in previously, we do not apply “required”rules at “Store Setup” widget.
You can make required field in vendor’s settings page (add this in your theme’s functions.php)-add_filter('wcfm_marketplace_settings_fields_address',function($fields, $user_id) { $fields['street_1']['custom_attributes'] = array( 'required' => 1 ); $fields['state']['custom_attributes'] = array( 'required' => 1 ); $fields['country']['custom_attributes'] = array( 'required' => 1 ); return $fields; },10,2);
Thanks.
- AuthorPosts
- You must be logged in to reply to this topic.