How to add Reset/Clear button for a Select Field only, in a CRED form?
1. Add this JS code in your CRED form >> JS editor section:
jQuery(document).ready(function( $ ){
jQuery('#reset_select').on('click',function(e){
jQuery(this).parent('.form-group').find("option:selected").removeAttr("selected");
});
});
2. Then use the below code in your CRED form, Reset button for the field, please replace field=’status’ with your field name and post=’book’ with your Custom Post Type:
<div class="form-group">
<label>Field Name</label>
[cred_field field='status' post='book' value='' urlparam='' class='form-control' output='bootstrap']
<button type="button" id="reset_select" value="Reset">Reset</button>
</div>