jeudi 10 octobre 2019

Advanced Custom Fields - last checkbox is always checked, how to uncheck it?

Problem is about Advanced Custom Fields and Wordpress. I'm using code from this website: https://www.advancedcustomfields.com/resources/creating-wp-archive-custom-field-filter/

And everything is working fine, but the created checkboxes have last child always checked. So when i want to check first, I will have selected first and last option. What I can do? I've tried to find some help in Google or find something what is checking it, but no results. I've tried to uncheck it default by JavaScript, but it's not the solution.

The function which is creating checkboxes:

<?php create_field( $field ); ?>

Checked checkbox:

<input type="checkbox" id="acf-field_5d9d111193121-ponad_60_minut" name="acf[field_5d9d111193121][]" value="ponad_60_minut" checked="checked"> 

The full code I'm using is there: https://support.advancedcustomfields.com/forums/topic/creating-a-wp-archive-with-custom-field-filter-and-array-to-string-error/




Aucun commentaire:

Enregistrer un commentaire