Support

Account

Forum Replies Created

  • I figured it out. Here is the solution if someone is interested:
    It was not so hard when I understood the process. I use a regular foreach to loop through the objects, and put the results in an array. Then I assign the array to the repeaterfield and the correct post. No need for super clunky $name_keys and separate update_sub_fields.

    $repeater  = 'field_61e1ea4738085'; // the field name of the repeater field
    		$repeaterObjects = $values['field_61e1ea4738085']; //getting the values from the $_POST['acf'] array
    
    		// loop through the rows
    		//size=f repeaterobject returns 2 which is fine
    		foreach($repeaterObjects as $obj) {
    			// building the field names of the repeater fields for the database
    				
    			$breeder_data [] =
    				[
    					'breeder_owner_name' => $obj['field_61e1ea5c38086'],
    					'breeder_owner_address' =>  $obj['field_61e1ea6738087'],
    					'breeder_owner_postal_address' => $obj['field_61e1ea7a38088'],
    					'breeder_owner_email' => $obj['field_61e1ea8e38089'],
    					'breeder_owner_phone' =>  $obj['field_61e1eaa13808a'],
    					];
    		
    		}
    		update_field( $repeater, $breeder_data, $id);
  • Yes, same procedure, except you need the setup of a plugin.

  • Ok. I don’t use code to retrieve the value, but Elementor. Usually, Elementor is able to grab the image, and it is for pages, categories and post, but not when it is connected to taxonomies.

    I tried to change the ID to an url in one of the fields in the db, but it didn’t make much of a difference.

Viewing 3 posts - 1 through 3 (of 3 total)