How to add HTML5 ‘required’ attribute to wp_dropdown_categories() without JavaScripts?

I’m using wp_dropdown_categories() for populating <select> field with custom taxonomy terms. If the code is like below: <?php $args = array( ‘show_option_none’ => __( ‘Select one’, ‘text-domain’ ), ‘taxonomy’ => ‘my_tax’, ‘id’ => ‘tax-type’, ‘echo’ => 1, ); wp_dropdown_categories( $args ); It’s working just fine. I can make the field mandatory with jQuery: $(‘#tax-type option:first’).val(null); … Read more

Admin menu bar dropdown opens when I click on a form element (Chrome) [closed]

This question is unlikely to help any future visitors; it is only relevant to a small geographic area, a specific moment in time, or an extraordinarily narrow situation that is not generally applicable to the worldwide audience of the internet. For help making this question more broadly applicable, visit the help center. Closed 9 years … Read more