Home › Forums › Add-ons › Repeater Field › Repeater update_field › Reply To: Repeater update_field
I am having a little bit of trouble getting this to work, I have similar issue but maybe I am missing something. I have frontend jquery repeater field with name arrays which I try to populate. The rows are formed in the ACF but no value is stored.
Below is the code.
// Work Experience
$job_title = $_POST['job_title'];
foreach($job_title as $i => $jt ):
// Job title
// $job_title = $_POST['job_title'];
// Reference
$reference = $_POST['reference'];
// Reference_contact
$reference_contact = $_POST['reference_contact'];
// Work Experience Textarea
$work_experience_textarea = $_POST['work_experience_textarea'];
echo $jt;
echo $reference[$i];
echo $reference_contact[$i];
echo $work_experience_textarea[$i];
$value_work_experience[$i] = array(
array(
"field_5ddda6cf10b45" => $jt,
"field_5ddda6db10b46" => $reference[$i],
"field_5ddda6f310b47" => $reference_contact[$i],
"field_5ddda70010b48" => $work_experience_textarea[$i]
),
);
endforeach;
update_field( $field_key_work_experience, $value_work_experience, $post_id ); // work experience
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.