I’ve a WordPress multi-site network with 20+ sites. and i’m using gravity forms for Contact/Signup/Subscription forms. I would like to create global form for my wordpress multisite installation. Is it possible that gravity forms save the form entries only into the main/parent site? I’ve tried using switch_to_blog()
in children sites. but it is not working.any help would be appreciated 🙂
2 comments
Comments are closed.
If you duplicate the form into all sites, you can make them all send their data to the main site by including this on the ‘child’ sites:
Gravity forms stores data based on blog database table prefix,
in multisite all sites uses the same database but data are separated based on table prefix, the prefix are something like, wp_1_, wp_2_, wp_3_…..
if you have a site, like my.blog1.com with table prefix, wp_1_, gravity form store all the form entries of my.blog1.com to wp_1_rg_lead, wp_1_rg_lead_detail, wp_1_rg_lead_detail_long,
Now if you want to save those details on your parent install, you need to play around with the database and modify gravity form using hooks like
gform_pre_submission
orgform_after_submission
This post might help
http://www.endocreative.com/save-gravity-forms-data-custom-database-table/