ACF Repeater Checkbox

Hi there!

I’ve added a repeater to a single Layout for a CPT like this:

add_filter( 'cs_looper_custom_my_acf_repeater', function( $result, $args ) {
    return get_field( $args['field'] );
}, 10, 2);

and then added the field to json as @alexander described in this post
https://theme.co/forum/t/new-looper-providers-acf-repeater-field/84558/8

Repeater output works like a charm.

Now what I’m trying to achieve is to set a class on a span if a checkbox within the repeater-row is checked. Tried a lot of things, but I can’t get it to work.

Here is are my sub_fields:

The choice I set within the checkbox is

tao-canceled : Abgesagt

So it should output tao-canceled if checkbox is checked.

Here is the dynamic content I use

<span class="{{dc:looper:field key="canceled"}}">{{dc:looper:field key="date"}} {{dc:looper:field key="time"}}</span> {{dc:looper:field key="comment"}}

This would work if “canceled” were another textfield but that is too risky since it will be edited by different people.

So how can I get this to work? Do I have to register the Checkbox in the function? Or is there any other way to achieve this?

Cheers!

Hi @BuzzStory,

Thanks for reaching out.
Can you please share the login credentials along with the following details so we can investigate it further and check what is happening at your end?
Please provide login credentials for your site on a secure note, including:

– WordPress Site URL & Login URL
– Specific Page URL where you have used it
– WordPress Admin username/password
– FTP/CPanel details

To create a secure note, click the key icon underneath any of your posts.

Thanks

Hi @tristup,

Thanks for your reply. Please find the login credentials in the secure note.

Hi @BuzzStory,

It might be an upcoming feature for the next few succeeding releases. I would request you wait for the next update or if you want this to be done with this version it required custom development, which is beyond the scope of theme support. I would suggest you hire a developer who can assist you to do the customization.

Thanks

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.