Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to Programatically Add an Entry to a Gravity Form

When a user submits a Gravity Form on my website, I would automatically like to add this user to a second Gravity form that I've created. Looking at the developer docs, I see that I am able to hook into a form entry using the code at this link. http://www.gravityhelp.com/documentation/page/Gform_after_submission. I'm not able to find anywhere that would then allow me to create an entry however. I could always use $wpdb to update the database directly, but figured there would be a built in hook to do this.

like image 861
MMMTroy Avatar asked Mar 07 '26 14:03

MMMTroy


1 Answers

There is an API in Gravity Forms that you can use to create manual entries : http://www.gravityhelp.com/documentation/page/API_Functions#add_entries

You can use the gform_after_submission[_formID] hook to trigger API calls to create new entries to other gravity form

like image 171
Pushpak Patel Avatar answered Mar 09 '26 12:03

Pushpak Patel



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!