Title: Required input error &amp; empty variables
Last modified: April 22, 2021

---

# Required input error & empty variables

 *  Resolved [timtimseo](https://wordpress.org/support/users/timtimseo/)
 * (@timtimseo)
 * [5 years ago](https://wordpress.org/support/topic/required-input-error-empty-variables/)
 * Hi
 * We have been happily using CF7 happily for almost a year, and without an identified
   reason the plugin stopped working.
 * 1) Form validation pops an “input is required” error even though the required
   input is filled.
 * 2) When disabling input requirements, the form is sent successfully but the message
   received contains blanks instead of the inputs, and the files aren’t attached
   to the mail.
 * The AJAX request sent upon submitting the form looks as follows :
 *     ```
       POST 200 /wp-json/contact-form-7/v1/contact-forms/762/feedback?_locale=user
       ```
   
 * —————————–5665594835824645722021594893
    Content-Disposition: form-data; name=”
   _wpcf7″
 * 762
    —————————–5665594835824645722021594893 Content-Disposition: form-data; name
   =”_wpcf7_version”
 * 5.4
    —————————–5665594835824645722021594893 Content-Disposition: form-data; name
   =”_wpcf7_locale”
 * fr_FR
    —————————–5665594835824645722021594893 Content-Disposition: form-data;
   name=”_wpcf7_unit_tag”
 * wpcf7-f762-xxx-xx
    —————————–5665594835824645722021594893 Content-Disposition:
   form-data; name=”_wpcf7_container_post”
 * 763
    —————————–5665594835824645722021594893 Content-Disposition: form-data; name
   =”_wpcf7_posted_data_hash”
 * —————————–5665594835824645722021594893
    Content-Disposition: form-data; name=”
   your-name”
 * test
    —————————–5665594835824645722021594893 Content-Disposition: form-data; 
   name=”prenom”
 * test
    —————————–5665594835824645722021594893 Content-Disposition: form-data; 
   name=”tel-530″
 * test
    —————————–5665594835824645722021594893 Content-Disposition: form-data; 
   name=”your-email”
 * [test@gmail.com](https://wordpress.org/support/topic/required-input-error-empty-variables/test@gmail.com?output_format=md)
   —————————–
   5665594835824645722021594893 Content-Disposition: form-data; name=”num-commande”
 * test
    —————————–5665594835824645722021594893 Content-Disposition: form-data; 
   name=”your-message”
 * test
    —————————–5665594835824645722021594893 Content-Disposition: form-data; 
   name=”file”; filename=”tmep.png” Content-Type: image/png`
 * Response (when field requirement is activated) :
 *     ```
       {
          "into":"#",
          "status":"validation_failed",
          "message":"Un ou plusieurs champs contiennent une erreur. Veuillez v\u00e9rifier et essayer \u00e0 nouveau.",
          "posted_data_hash":"",
          "invalid_fields":[
             {
                "into":"span.wpcf7-form-control-wrap.your-email",
                "message":"Ce champ est obligatoire.",
                "idref":null,
                "error_id":"-ve-your-email"
             }
          ]
       }
       ```
   
 * I’ve noticed `_wpcf7_posted_data_hash` is empty, perhaps that might be part of
   the issue ?
    -  This topic was modified 5 years ago by [timtimseo](https://wordpress.org/support/users/timtimseo/).

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

 *  [blazmate](https://wordpress.org/support/users/blazmate/)
 * (@blazmate)
 * [5 years ago](https://wordpress.org/support/topic/required-input-error-empty-variables/#post-14351458)
 * I experienced a similar error. Never go a reply. Then I found if I change other
   elements on the page, it worked again. Almost like other text on the page affected
   the cf7 code.
 *  Thread Starter [timtimseo](https://wordpress.org/support/users/timtimseo/)
 * (@timtimseo)
 * [5 years ago](https://wordpress.org/support/topic/required-input-error-empty-variables/#post-14351579)
 * [@blazmate](https://wordpress.org/support/users/blazmate/) Thank you for stopping
   by, I tried to delete everything from the page leaving only the CF7 shortcode
   but it sadly didn’t change anything.
 *  Thread Starter [timtimseo](https://wordpress.org/support/users/timtimseo/)
 * (@timtimseo)
 * [5 years ago](https://wordpress.org/support/topic/required-input-error-empty-variables/#post-14410810)
 * After several tests, I noticed the validation / empty fields bug only appeared
   when +4 files were used on the form.
 * I installed a multi file upload plugin and used it instead, which allowed me 
   to get around the bug.
 * I marked this topic as resolved, even though obviously the bug is still there.
    -  This reply was modified 5 years ago by [timtimseo](https://wordpress.org/support/users/timtimseo/).

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

The topic ‘Required input error & empty variables’ 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: [timtimseo](https://wordpress.org/support/users/timtimseo/)
 * Last activity: [5 years ago](https://wordpress.org/support/topic/required-input-error-empty-variables/#post-14410810)
 * Status: resolved