Home › Forums › Add-ons › Repeater Field › Programmatically updating repeater fields › Reply To: Programmatically updating repeater fields
Some progress to report – I tried moving your example completely out of our plugin and dropped it into a WordPress template, and that successfully updated the repeater!
So, we now know it’s something about calling that code from within the plugin that is causing repeater updates not to function (but allowing Text and Number fields to be updated without issue, for some reason).
I tried identifying the post ID manually from within the plugin, like so:
$repeater_key = 'field_6050d513a3996';
$value = array(
array(
'field_6050d550a3997' => '(123)456-7890',
'field_6050d596a3998' => 'description sent from plugin'
)
);
update_field($repeater_key, $value, 48058);
Sadly, this did not work either – but we’re making progress!
So the question now becomes: Is there anything that could possibly block repeater (or perhaps just nested?) updates from happening when done within a plugin?
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!
We use cookies to offer you a better browsing experience, analyze site traffic and personalize content. Read about how we use cookies and how you can control them in our Privacy Policy. If you continue to use this site, you consent to our use of cookies.