Home › Forums › Add-ons › Repeater Field › Update/ Create new repeater block with foreach loop › Reply To: Update/ Create new repeater block with foreach loop
$academic_key = “field_616409d2c5515”;
$value = array();
foreach ($_POST as $feature_value) {
$value[] = array(
//acf name form
“name_of_high_school” => $feature_value[‘school_name’],
“city” => $feature_value[‘city_name’],
“country” => $feature_value[‘country_name’],
“graduation_year” => $feature_value[‘graduation_year’],
“starting_graduation_month” => $feature_value[‘academic_starting_month_year’],
“ending_graduation_month” => $feature_value[‘academic_ending_month_year’],
“curriculum” => $feature_value[‘academic_curriculum’],
“classes” => $feature_value[‘academic_classes’],
“standardized_test_scores” => $feature_value[‘academic_score’],
“awards” => $feature_value[‘academic_awards’],
“grades” => $feature_value[‘academic_grades’],
“others” => $feature_value[‘academic_other’]
);
}
update_field($academic_key, $value, $post_id);
If have the same issue
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.