Support

Account

Home Forums General Issues Update User Repeater with Post Object Info? Reply To: Update User Repeater with Post Object Info?

  • Solved it!

    I found this post which lead me to an answer.

    Here’s my code:

    $course_id = $data['course']->ID; //280
    $coursePoint = get_field('field_56646f51fa48b', $course_id);
    
    //Get the ID of the Point that was was assign to the Course
    if( $coursePoint ): 
    	$post = $coursePoint;
    	setup_postdata( $post ); 
    	$selectedCourseID = $post->ID;
    	wp_reset_postdata();
    endif;
    
    $value = get_field('field_56644f11d62c3', $user_ID); 
    
    $value[] = array("field_566459158d2ab" => $selectedCourseID, "field_5664598f8d2ad" => "20151206");