Home › Forums › Add-ons › Repeater Field › add subfield via frontend › Reply To: add subfield via frontend
Hi @littledevil
You can use the unset() function to delete the row from the returned repeater data. After that, you can use the array_values() to fix the key index. This answer should give you more idea about it: http://stackoverflow.com/questions/369602/delete-an-element-from-an-array#answer-369761.
So, when you update the repeater using this code: update_field( $field_key, $value, $post_id );
, it will use the new data without the deleted rows.
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.