PLEASE NOTE: These forums are no longer utilized and are provided as an archive for informational purposes only. All support issues will be handled via email using our support ticket system. For more detailed information on this change, please see this blog post.

Master form for multisite

  1. kurtdomm
    Member

    Hello, I am interested in creating a single master form in my primary site that can be loaded into other sites.

    I would like to be able to make an edit on my master form and have it propagate throughout the sub sites.

    I succeeded to a degree by using code like the following in a sub site template:

    global $blog_id;
    $current_blog_id = $blog_id;
    switch_to_blog(1);
    gravity_form(1, $display_title=true, $display_description=true, $display_inactive=false, $field_values=null, $ajax=false, 0);
    switch_to_blog($current_blog_id);

    The form displayed just fine, but did not function. Pressing submit redirected to a page that didn't exist and showed as just a colon (':') in the url address bar.

    I am currently aware that I can use the export and import functionality but that seems much more tedious than just modifying a master form and having the changes reflected throughout all sub sites.

    Hope that makes sense.

    Is there a way to do what I'm aiming to do?

    Thank you.

    Posted 13 years ago on Thursday March 8, 2012 | Permalink
  2. There is currently no way to do what you describe. Each site in a WordPress multi-site install is effectively it's own WordPress site. They each have their own Gravity Forms tables and setup. You can't share a single form on one site with another site the way you describe.

    The only way to do what you describe is to use iframes. Create a blank page template on your site, create a page that uses that template and embed the form on that page. Then on your other sites, use an iframe to display the form from the first site via the URL of the page the form is contained on.

    That is the only way to do what you are trying to accomplish. Using the switch_to_blog functionality will not work because it's only executing when the form is displayed and not when the form is being processed.

    Posted 13 years ago on Friday March 9, 2012 | Permalink

This topic has been resolved and has been closed to new replies.