Support

Account

Home Forums General Issues add_row doesn't work the first time Reply To: add_row doesn't work the first time

  • Dear, John Huebner!

    Why does it work like this?

    Structure:

    1. repeater – repeater_test

    	$post_data = array(
    		'post_title'   => $data["main_info"]["company"],
    		'post_content' => "",
    		'post_status'  => 'publish',
    		'post_author'  => get_current_user_id(),
    		"post_type"    => "companies"
    	);
    
    	$the_record_id = wp_insert_post( $post_data );
    
    	add_row("repeater_test", ["test"=>"adding to the row should"], $the_record_id);

    But it doesn’t work like this

    Structure

    1. field group – (group_main_info)
    1.2 repeater – (phones)

    add_row("group_main_info_phones", ["name"=>"Jon","phone"=>"0897654007"], $the_record_id);

    I tried to write element keys and it doesn’t work the same way.