Support

Account

Home Forums Add-ons Flexible Content Field Checkboxes with values from repeater field

Helping

Checkboxes with values from repeater field

  • Is there a way to reuse the content of a repeater “text” field in a checkbox later on?

    More detailed explanation:

    I have a flexbible content field with a layout where I need to define custom filter options for a “masonry” gallery with “isotope” filtering. In the same layout I have another repeater field and in those I need to select the custom filter options. Preferably through checkboxes (multiple selections).

    Any help would be really appreciated!

  • There are 2 ways to do this, and I don’t have all the details on doing either.

    The first would require the page to be saved after entering the repeater values. You could then use an acf/load_field filter https://www.advancedcustomfields.com/resources/acfload_field/ to load the values of the checkbox field, although I’m not sure how you’d make sure you were getting the values from the same layout, or even if this is possible since each layout would have it’s own set of choices and I think that this will make all the choices the same for all layouts.

    The second would be by adding custom JavaScript that would read the values and update the checkbox field. This is more likely to work, but ultimately a lot more difficult and you’ll find a lot less information on getting it done. I do have some examples of custom JS that updates fields based on other fields, but nothing that comes anywhere close to the solution your looking for, but it would be a starting place if you want to try it. https://github.com/Hube2/acf-dynamic-ajax-select-example

Viewing 2 posts - 1 through 2 (of 2 total)

The topic ‘Checkboxes with values from repeater field’ is closed to new replies.