I’m using webhooks as documented here: https://docs.gravityforms.com/calendar-events-webhooks-addon-wp-restapi/ to add a new event to the Modern Tribe Events Calendar using Gravity Forms.
I have a radio field for the Venues which is auto populated using the Gravity Wiz ‘Populate Anything’ add on which works really well and saves to the newly created event but I want to add the option to add a new venue in the form too (and for this to be saved as a Venue Post and also be related to the newly created event).
I have access to another add on from Gravity Wiz called Nested Forms, which I can use to create the new Venue (also using the Advanced Post Creation add on from Gravity Forms) but I can’t work out the function I need to write to get this saved alongside the newly created Event.
3
Answers
function pre_submission_handler( $form ) { $venueId = rgpost( 'input_25' );
}
Solved by mapping one field to another in the end.
You may just need to add the following to your functions.php to run the API for your nested form:
add_filter( ‘gpnf_enable_feed_processing_setting’, ‘__return_true’ );
See more info here:
https://gravitywiz.com/documentation/gravity-forms-nested-forms/#feed-processing
This should work: