Support

Account

Home Forums Add-ons Repeater Field Can you update a row in a repeater? Reply To: Can you update a row in a repeater?

  • I’m having the same issue…sorta. I have the following field defined:

    Repeater Field

    Through code, I am filling out the values of the repeater like so:

    	$emergency_contact = array('emergency_contact_full_name' => $EMERGENCY_CONTACT_FULL_NAME,
    								'emergency_contact_relationship_to_you' => $EMERGENCY_CONTACT_RELATIONSHIP,
    								'emergency_contact_phone' => $EMERGENCY_CONTACT_CONTACT_PHONE
    
    						);
    	update_field('volunteer_emergency_contact', $emergency_contact, $theId);

    No errors when that code runs.

    But when I try to load the CPT entry, WordPress just hangs and nothing happens. If I remove that line where the code gets updated, everything works just fine.

    Am I supposed to create something to update the row in the repeater beforehand? Am a bit confused.

    Thanks in advance!