Home › Forums › Add-ons › Repeater Field › problems saving file type repeater field › Reply To: problems saving file type repeater field
Could you please try to use the update_field() function instead? You should be able to do it like this:
// Please use field key instead of field name
$field_key = 'field_123456789abc';
// Get the field value first if it's available
$repeater_value = get_field('repeater_field_name');
// Add the row to the repeater
$repeater_value[] = array('memos_upload_file' => $attach_id);
// Update the repeater field
update_field($field_key, $repeater_value, $post_id );
I hope this helps 🙂
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.