Title: One form multisite
Last modified: March 24, 2017

---

# One form multisite

 *  Resolved [vespino](https://wordpress.org/support/users/vespino/)
 * (@vespino)
 * [9 years, 2 months ago](https://wordpress.org/support/topic/one-form-multisite/)
 * I’m hoping to use CF7 on my multisite installation in a way I can use one form
   on all my sites. Until now it’s working great, using the following code I have
   managed to show the form on all sites:
 *     ```
       function shortcode_wpse_87634() {
           // Main site, ID=1, that has the form
           switch_to_blog( 1 );
   
           // Do your stuff
           $my_stuff = do_shortcode('[contact-form-7 id="71" title="Contact"]');
   
           // Back to original site
           restore_current_blog();
   
           // Return shortcode content
           return $my_stuff;
       }
       add_shortcode( 'global_form', 'shortcode_wpse_87634' );
       ```
   
 * Validation of the form works on the main domain, but not on child domains and
   I can’t seem to find out why. Is this something that should work or am I looking
   to do the impossible?

Viewing 3 replies - 1 through 3 (of 3 total)

 *  [Colir](https://wordpress.org/support/users/colir/)
 * (@colir)
 * [9 years, 1 month ago](https://wordpress.org/support/topic/one-form-multisite/#post-9135827)
 * +1 exactly the same problem here.
 * thanks
 *  [andycochran](https://wordpress.org/support/users/andycochran/)
 * (@andycochran)
 * [8 years, 11 months ago](https://wordpress.org/support/topic/one-form-multisite/#post-9271375)
 * +1 Same.
 * So long as the plugin is active on both blogs, switch_to_blog & do_shortcode 
   will generate the form. But I can’t validate/submit the form.
 * Did you ever figure this out?
 *  Thread Starter [vespino](https://wordpress.org/support/users/vespino/)
 * (@vespino)
 * [8 years, 11 months ago](https://wordpress.org/support/topic/one-form-multisite/#post-9272379)
 * Nope. For now I’m using a simple HTML form with some AJAX validation which does
   the trick for me.

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘One form multisite’ is closed to new replies.

 * ![](https://ps.w.org/contact-form-7/assets/icon.svg?rev=2339255)
 * [Contact Form 7](https://wordpress.org/plugins/contact-form-7/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/contact-form-7/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/contact-form-7/)
 * [Active Topics](https://wordpress.org/support/plugin/contact-form-7/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/contact-form-7/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/contact-form-7/reviews/)

 * 3 replies
 * 3 participants
 * Last reply from: [vespino](https://wordpress.org/support/users/vespino/)
 * Last activity: [8 years, 11 months ago](https://wordpress.org/support/topic/one-form-multisite/#post-9272379)
 * Status: resolved