Title: Disable hidden form
Last modified: August 31, 2016

---

# Disable hidden form

 *  [resting](https://wordpress.org/support/users/resting/)
 * (@resting)
 * [10 years ago](https://wordpress.org/support/topic/disable-hidden-form/)
 * I have 2 identical forms on a page, due to drastic design change in desktop and
   mobile.
 * Each time the form submits, I receive 2 emails. I believe its the hidden form
   causing this, as choosing another template without a duplicate form is fine.
 * Is there anyway to disable a hidden form from being processed? Validation and
   submission wise?
 * Thanks.
 * [https://wordpress.org/plugins/contact-form-7/](https://wordpress.org/plugins/contact-form-7/)

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

 *  [Aurovrata Venet](https://wordpress.org/support/users/aurovrata/)
 * (@aurovrata)
 * [10 years ago](https://wordpress.org/support/topic/disable-hidden-form/#post-7315911)
 * you can simply hook into `wpcf7_posted_data` this will show you the form data
   as it is posted, include a hidden field in your mobile form, or if you have an
   existing field which is different form the normal form use that instead
 *     ```
       add_filter( 'wpcf7_posted_data', 'filter_my_cf7_posted_data' );
       function filter_my_cf7_posted_data($posted_data){
         //check if this is a mobile device
         if(isset($posted_data['my-mobile-form-hidden-field']) && !wp_is_mobile()){ //this is the mobile form but the browser is not a mobile device
           $wpcf7 = WPCF7_ContactForm::get_current();
           $wpcf7->skip_mail = true; //skips the email being sent
         }
         return $posted_data;
       }
       ```
   
 *  Thread Starter [resting](https://wordpress.org/support/users/resting/)
 * (@resting)
 * [10 years ago](https://wordpress.org/support/topic/disable-hidden-form/#post-7315971)
 * That’s interesting.
    I guess there’s no documentation on hooks and filters? Will
   have to dig in the source for such things ya?
 *  [Aurovrata Venet](https://wordpress.org/support/users/aurovrata/)
 * (@aurovrata)
 * [10 years ago](https://wordpress.org/support/topic/disable-hidden-form/#post-7315997)
 * The best way is to look at other CF7 plugin extensions and see how they have 
   developed it using CF7 functions and hooks

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

The topic ‘Disable hidden form’ 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
 * 2 participants
 * Last reply from: [Aurovrata Venet](https://wordpress.org/support/users/aurovrata/)
 * Last activity: [10 years ago](https://wordpress.org/support/topic/disable-hidden-form/#post-7315997)
 * Status: not resolved