• Resolved timtimseo

    (@timtimseo)


    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”

    [email protected]
    —————————–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 3 years, 7 months ago by timtimseo.
Viewing 3 replies - 1 through 3 (of 3 total)
  • 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

    (@timtimseo)

    @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

    (@timtimseo)

    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 3 years, 6 months ago by timtimseo.
Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Required input error & empty variables’ is closed to new replies.