We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 36718
    • 3 Posts
    I want to add to my site feedback form.

    this is some code from resource:
    [[!FormIt?  
        &hooks=`spam,email,redirect,recaptcha`  
        &emailTo=`[email protected]`  
        &emailSubject=`[[+subject]]`
        &emailFromName=`[[++name]]`
        &emailFrom=`[[++emailsender]]`
        &emailTpl=`ContactTpl`
        &redirectTo=`7`
        &recaptchaTheme=`blackglass`
    ]]


    And also there is a html-form at this page with recaptcha. recaptcha-code:
    <tr>
       <td colspan="2">
        <span class="error">[[!+fi.error.recaptcha]]</span>
       </td>
      </tr>
      <tr>
       <td colspan="2">[[+formit.recaptcha_html]]</td>
      </tr>
      <tr>


    Email is not send if the fields `subject` and `name` are empty (because i set for example 'name="subject:required"'), but send if `subject` and `name` are not empty although recaptcha field may be empty or the recaptcha-words are not correct. In the last case, I see my form with recapcha-error, but the mail is send anyway!

    what did I do wrong?

    sorry for my english

    This question has been answered by splittingred. See the first response.

    • discuss.answer
      • 28215
      • 4,149 Posts
      Hooks execute in order. Make sure your recaptcha hook is near the front of the order:

      &hooks=`spam,recaptcha,email,redirect` 
        shaun mccormick | bigcommerce mgr of software engineering, former modx co-architect | github | splittingred.com
        • 36718
        • 3 Posts
        thanks!