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?

  • Yep

    So you can use the gform_after_submission as is or you can be more specific with the form ID:

    Applies to all forms.
    add_action( 'gform_after_submission', 'after_submission', 10, 2 );

    Applies to a specific form. In this case, form id 5.
    add_action( 'gform_after_submission_5', 'after_submission', 10, 2 );

    Change the 1 in the below to your Gravity Form field ID:
    $number_of_posts = rgar( $entry, '1' );

    Then switch the field key IDs:

    #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
    	

    Without knowing the full ins and outs of your setup, that should help get you underway!

    You may need to tweak accordingly but fingers crossed!