We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 28215
    • 4,149 Posts
    This is an auto-generated topic for FormIt 1.5.4-rc1 by splittingred.

    Brief Description:

    Automatically validate, parse and email forms. Redirect to thank you pages. Add your own hooks as Snippets to handle forms dynamically. Validate with custom Snippets. All is possible in FormIt, the new form processing Snippet for MODx Revolution 2.0.
    New in 1.5.4

    • [li][#51] Allow blank fields to be passed with :email validator
    • [#55] Allow all fields to be accessed in custom validators
    • [/li]

    New in 1.5.3

    • [#40] Add ability to display all error messages in bulk at top, added validationErrorBulkTpl for templating each one
    • [#52] Add a general validation error message property, validationErrorMessage, that shows when validation fails
    • [#53] Fix bug that prevented recaptcha options from working
    • Add a generic validation error placeholder in FormIt to allow for general messages
    • [#50] Trim each hook specification in hooks calls
    • [#49] Ensure reCaptcha service instance is unique for each FormIt instance
    • [#47] Ensure email validator checks for empty string
    • [#42] Can now include field names in error strings via `field` placeholder
    • [#39] Fix issue with FormItIsChecked/Selected to prevent output from occurring if not checked
    • [#37] Fix allowTags validator to work, and work with parameters encapsulated by ^

    See the Official Documentation here:
    http://rtfm.modx.com/display/ADDON/FormIt
      shaun mccormick | bigcommerce mgr of software engineering, former modx co-architect | github | splittingred.com
      • 30319
      • 406 Posts
      Thank you for creating the math captcha.
      It is nicer and easier to read than reCaptcha, which I really love but it IS indeed hard to read sometimes.

      Thank you, Tom
        • 3676
        • 11 Posts
        Using example "Contact" form from the FormIt examples in the official documentation, I get the following error:

        PHP Fatal error: Call to a member function set() on a non-object in /REDACTED/core/components/formit/model/formit/fihooks.class.php on line 294, referer: http://REDACTED/

        I copied the example line-for-line, removing only the recaptcha-related items. Any ideas? Running MODx 2.0.8-pl (traditional).
          • 3676
          • 11 Posts
          Any thoughts on this one? It’s still happening, even after 1.5.4-pl.
            • 28215
            • 4,149 Posts
            That’s this line:

            $this->modx->getService('mail', 'mail.modPHPMailer');
            $this->modx->mail->set(modMail::MAIL_BODY,$emailHtml ? nl2br($message) : $message);
            

            Which makes no sense, as that class should load with no problems. My guess is when you uploaded Revolution, a file got corrupted, or something didn’t install right.
              shaun mccormick | bigcommerce mgr of software engineering, former modx co-architect | github | splittingred.com
              • 3676
              • 11 Posts
              Okay. I tried reinstalling Revolution, and I’m still getting the same error. I also tried removing Formit completely and reinstalling—same result.
                • 30319
                • 406 Posts
                Try re-downloading Formit and re-installing?? Check your file permissions??
                  • 3676
                  • 11 Posts
                  Tried both. Here’s what I’ve got in the MODx Error Log:

                  [2011-03-16 16:03:48] (ERROR @ /index.php) Could not load class: modPHPMailer from mail.modphpmailer.
                  [2011-03-16 16:03:48] (ERROR @ /index.php) Problem getting service mail, instance of class mail.modPHPMailer, from path 


                  I’m guessing there’s supposed to be something after that... like a path telling me where it was expecting to find modPHPMailer, and didn’t?
                    • 3676
                    • 11 Posts
                    Ready for this? So, Transmit (Mac FTP client) has a default sync rule that excludes any files with "mailer" in their name. As such, modphpmailer.class.php and the entire phpmailer directory were both missing from my MODx installation. As soon as I turned that (bizarre) rule off, and did a sync, all the phpmailer files were uploaded and (unsurprisingly) Formit works like a charm.

                    Hear that? That’s the sound of my palm introducing itself to my face.
                      • 8385
                      • 11 Posts
                      After updating to 1.5.4-pl FormIt adds in all send E-Mails a
                      to every new line.

                      Template Chunk
                        <tr>
                          <td width="127"><strong>Vorname:</strong></td>
                          <td colspan="2" align="left">[[+Vorname]]</td>
                          <td width="101"><strong>Name:</strong></td>
                          <td width="229" align="left">[[+Name]]</td>
                        </tr>
                      


                      E-Mail Source Code
                        <tr><br />
                          <td width="68"><strong>Vorname:</strong></td><br />
                          <td width="230" align="left">foo</td><br />
                          <td width="48"><strong>Name:</strong></td><br />
                          <td width="230" align="left">bar</td><br />
                        </tr><br />
                      


                      In 1.5.4-rc1 this did not happen, bug ? or only me ?


                      MODX: Revolution 2.0.8-pl (traditional)