Hi there,
I have a field group named ‘account_services’, which I am using to create a list of my client’s services. It is a flexible content field which has several layouts including domain, hosting, backups, etc… The sub-fields of these are mostly the same (domain name, renewal date, type).
In my code, I am able to loop through my clients, and loop through their services. At this stage I add 1 year to their renewal date. The problem though, is how to update this ‘renewal_date’ subfield with the new date?
ok, this is solved. I was able to update the field within the loop with:
update_field(‘repeatername_’ . $i . ‘_subfieldName’ , $new_value , get_the_id());