Support

Account

Home Forums Add-ons Repeater Field Updating a text field within a repeater field (within a flexible content field)

Helping

Updating a text field within a repeater field (within a flexible content field)

  • 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());

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

The topic ‘Updating a text field within a repeater field (within a flexible content field)’ is closed to new replies.