I have a nested repeater with Days of the week followed by times
Times is a repeater with in the Days of the week
I am trying to update the subfield of locations (check box group)
Basically all i want to do is turn off 1 location if my code calls for it. I am processing a front end form, and if the user checks this location then it will update the back end of this post.
I use this to update a text field, but can not figure out how to get the check boxes unchecked using the same logic
update_sub_field( array('date_and_time', $updatebooking['dtrow'], 'time', $updatebooking['timerow'], 'email'), $bookingemail , $updatebooking['postid'] ); i ran a loop and can return the array of the locations
if ( have_rows( ‘date_and_time’, $updatebooking[‘postid’] ) ) :
while ( have_rows( ‘date_and_time’,$updatebooking[‘postid’] ) ) : the_row();
if ( have_rows( ‘time’ ) ) :
while ( have_rows( ‘time’ ) ) : the_row();
$location_form_array = get_sub_field( ‘field_5d38d29aeb712’ );
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!
📣 “ACF Chat Fridays”— Advanced Custom Fields (@wp_acf) January 31, 2023
The ACF team holds their first open office hours this Friday! Come and talk ACF, and ask questions about building sites with the plugin.
We’d love to see you there!
📆 Friday 3rd Feb - 3pm UTC
👉 Register here - https://t.co/3UtvQbE4CU pic.twitter.com/oTwW9K1XQ0
© 2023 Advanced Custom Fields.