We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 39666
    • 29 Posts
    Next code work as expected (send the email sucessfully and do the redirection...but no email validation):
    [[!FormIt?
    &hooks=`math,email,redirect`
    &figrExcludedFields=`op1,op2,operator,math`
    &emailTpl=`FormitEmailChunk`
    &emailTo=`[email protected]`
    &emailFrom =`[[+full_name]]`
    &emailSubject=`New Message From [[++site_name]] [[*pagetitle]] .`
    &redirectTo=`27`
    &errTpl=`[[+error]] ` 
    &validate=`math:required,full_name:required,email:required,message:required`]] 


    Changing &validate to:
    &validate=`math:required,full_name:required,email:email,message:required`


    causes a crash (and my ears blowing smoke). No redirection and a blank page with any content at all. Even no errors in debuger.

    Some idea?

      www.abelmartinez.net
      • 28042 ☆ A M B ☆
      • 24,524 Posts
      Maybe email:email:required?
      &validate=`math:required,full_name:required,email:email:required,message:required`
        Studying MODX in the desert - http://sottwell.com
        Tips and Tricks from the MODX Forums and Slack Channels - http://modxcookbook.com
        Join the Slack Community - http://modx.org
        • 39666
        • 29 Posts
        But this work:

        &validate=`math:required,full_name:required,email:regexp=^/[.@]/^ ,message:required`


          www.abelmartinez.net
          • 39666
          • 29 Posts
          Quote from: sottwell at Feb 26, 2015, 02:33 AM
          Maybe email:email:required?
          &validate=`math:required,full_name:required,email:email:required,message:required`

          No, I tried
            www.abelmartinez.net
            • 28042 ☆ A M B ☆
            • 24,524 Posts
            What does your server PHP error log say? Not the MODX error log, the server's log.
              Studying MODX in the desert - http://sottwell.com
              Tips and Tricks from the MODX Forums and Slack Channels - http://modxcookbook.com
              Join the Slack Community - http://modx.org
              • 39666
              • 29 Posts
              Quote from: sottwell at Feb 26, 2015, 03:19 AM
              What does your server PHP error log say? Not the MODX error log, the server's log.
              I'm runing in a new shared host and have not access to server PHP error logs.

              I opened a ticket to ask for.

              Thanks.
                www.abelmartinez.net
                • 28042 ☆ A M B ☆
                • 24,524 Posts
                It could be a problem with the regular expression in the email validation code. If that's causing a PHP error, then it would explain the blank page. What version of MODX are you using? Is the FormIt the latest updated version?
                  Studying MODX in the desert - http://sottwell.com
                  Tips and Tricks from the MODX Forums and Slack Channels - http://modxcookbook.com
                  Join the Slack Community - http://modx.org
                  • 39666
                  • 29 Posts
                  Quote from: sottwell at Feb 26, 2015, 05:50 PM
                  It could be a problem with the regular expression in the email validation code. If that's causing a PHP error, then it would explain the blank page. What version of MODX are you using? Is the FormIt the latest updated version?

                  With the regular expresion validator works fine. The problem is with the built in :email validation.

                  I'm using MODx 2.3.3 and the updated Formit package.
                    www.abelmartinez.net
                    • 28042 ☆ A M B ☆
                    • 24,524 Posts
                    The built-in email validation code uses regular expressions.
                      Studying MODX in the desert - http://sottwell.com
                      Tips and Tricks from the MODX Forums and Slack Channels - http://modxcookbook.com
                      Join the Slack Community - http://modx.org
                      • 39666
                      • 29 Posts
                      Quote from: sottwell at Feb 26, 2015, 06:44 PM
                      The built-in email validation code uses regular expressions.
                      Yeah, I guess. I meant using
                      :regexp
                      I do not get crash, but with
                      :email
                      , yes.

                      Something must be wrong with the code of the package.

                      And I almost just got crazy until I realized what was happening with my form.;-)
                        www.abelmartinez.net