Home › Forums › General Issues › Creating a WP archive with custom field filter… and Array to string error › Reply To: Creating a WP archive with custom field filter… and Array to string error
I’ve fixed the problem, because I can’t use explode() and radio buttons. Now I’m using checkboxes, nevermind.
But I have an another problem, because the last checkbox (in the first and second checkboxes group) is always checked and label class is “selected”
<li>
<label class="selected">
<input type="checkbox" id="acf-field_5d9d111193121-ponad_60_minut" name="acf[field_5d9d111193121][]" value="ponad_60_minut" checked="checked"> ponad 1h
</label>
</li>
For example. I have a data-filter: colors, and three checkboxes:
– BLUE
– RED
– GREEN
and green is default checked, so when I check red I have two values checked.
What I can do to default disable those checkboxes?
The function which is creating the checkboxes is:
<?php create_field( $field ); ?>
Welcome to the Advanced Custom Fields community forum.
Browse through ideas, snippets of code, questions and answers between fellow ACF users
Helping others is a great way to earn karma, gain badges and help ACF development!
We use cookies to offer you a better browsing experience, analyze site traffic and personalize content. Read about how we use cookies and how you can control them in our Privacy Policy. If you continue to use this site, you consent to our use of cookies.