Support

Account

Home Forums Add-ons Repeater Field How to map multiple Gravity Forms fields with ACF repeater oEmbed? Reply To: How to map multiple Gravity Forms fields with ACF repeater oEmbed?

  • I believe you need to look at the gform_after_submission hook.

    You then use Gravity Forms rgar value.

    Perhaps, you could use repeater field and add the oEmbed field into that?

    <?php
    add_action( 'gform_after_submission', 'set_post_content', 10, 2 );
    function set_post_content( $entry, $form ) {
     
        //getting post
        $post = get_post( $entry['post_id'] );
     
        //change the 4 to your gravity form field number
        $number_of_posts = rgar( $entry, '1' );
    	
    	#add the row to the repeater
    	$row = array(
    		'field_5d9470467aab9'	=> $number_of_posts #this is your repeater subfield key
    	);
    	$i = add_row('field_5d946796a4fd7', $row, $post_id->ID); #this is the main repeater key
    	
    }

    Just an idea. You may need to play around with the concept!