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!
Welcome to the Advanced Custom Fields community forum.
Browse through ideas, snippets of code, questions and answers between fellow ACF users
Helping others is a great way to earn karma, gain badges and help ACF development!
We use cookies to offer you a better browsing experience, analyze site traffic and personalize content. Read about how we use cookies and how you can control them in our Privacy Policy. If you continue to use this site, you consent to our use of cookies.