Home › Forums › Add-ons › Repeater Field › Add repeater field data to only selected post › Reply To: Add repeater field data to only selected post
You need to somehow target the field to the post ID of the post being edited and then only update that post.
maybe something like this (only a quick example)
if (!empty($_POST['star_ratingg'][$post->ID])) {
$star_ratingg = $_POST['star_ratingg'][$post->ID];
$set_comments = $_POST['set_comments'][$post->ID];
// remainder of your update code here
}
<input type="text" name="star_ratingg [<?php echo $post->ID]">
<input type="text" name="set_comments[<?php echo $post->ID]">
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.