Closed khm-developer closed 4 years ago
@khm-developer
Could you specify where and how to reproduce it ?
Below are the code for the new product creation page. This category list contains a search cat option and also cat dropdown option and default it is having mandatory. But that mandatory is not a html validation.
<?php if ( dokan_get_option( 'product_category_style', 'dokan_selling', 'single' ) == 'single' ): ?>
<?php elseif ( dokan_get_option( 'product_category_style', 'dokan_selling', 'single' ) == 'multiple' ): ?>
<div class="dokan-form-group">
<?php
include_once DOKAN_LIB_DIR.'/class.taxonomy-walker.php';
$selected_cat = dokan_posted_input( 'product_cat', true );
$selected_cat = empty( $selected_cat ) ? array() : $selected_cat;
$drop_down_category = wp_dropdown_categories( apply_filters( 'dokan_product_cat_dropdown_args', array(
'show_option_none' => __( '', 'dokan-lite' ),
'hierarchical' => 1,
'hide_empty' => 0,
'name' => 'product_cat[]',
'id' => 'product_cat',
'taxonomy' => 'product_cat',
'title_li' => '',
'class' => 'product_cat dokan-form-control dokan-select2',
'exclude' => '',
'selected' => $selected_cat,
'echo' => 0,
'walker' => new DokanTaxonomyWalker()
) ) );
echo str_replace( '<select', '<select data-placeholder="'.__( 'Select product category', 'dokan-lite' ).'" multiple="multiple" ', $drop_down_category );
?>
</div>
<?php endif; ?>
Hi,
Currently, No Html5 validation for Product Category Select option. that why every time we received error message like this. "Error! Please select a category.".....
How to solve this