We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 25357
    • 92 Posts
    1.5.1 with Revo 2.04-pl

    One of the problems I have with CMS’s is there is often no way to track down malfunctions, if it works, great, if it doesn’t . . . . then what? (after poring through the docs repetitively.)

    I have a seriously broken site using Formit, it just won’t email. The validation, responses, everything works fine. The modX log is empty, I intentionally wrote some bad snippets to cause an error and it’s indeed writing OK. Are there any flags I can turn on to output warnings, trace a path through the hooks, anything?
      • 28215
      • 4,149 Posts
      Update to FormIt 1.5.2-rc1. Then put this after your FormIt call:

      [[!+fi.error_message:notempty=`<p class="error">[[!+fi.error_message]]</p>`]]


      That will display more info about your email issues.
        shaun mccormick | bigcommerce mgr of software engineering, former modx co-architect | github | splittingred.com
        • 3749
        • 24,544 Posts
        Quote from: rocknbil at Dec 02, 2010, 01:36 PM

        1.5.1 with Revo 2.04-pl

        One of the problems I have with CMS’s is there is often no way to track down malfunctions, if it works, great, if it doesn’t . . . . then what? (after poring through the docs repetitively.)

        I have a seriously broken site using Formit, it just won’t email. The validation, responses, everything works fine. The modX log is empty, I intentionally wrote some bad snippets to cause an error and it’s indeed writing OK. Are there any flags I can turn on to output warnings, trace a path through the hooks, anything?


        You’ve probably done this, but just in case:

        Remove all hooks but the email hook
        Verify that the mail() function is working. Often it isn’t and no errors occur although the mail is not sent.
        Try using the MODx SMTP system settings to see if it makes a difference.


        BTW, I want to thank you for using the correct spelling of "poring." I haven’t seen that in a number of years on the internet and it made my day. I thought it was dead. wink
          Did I help you? Buy me a beer
          Get my Book: MODX:The Official Guide
          MODX info for everyone: http://bobsguides.com/modx.html
          My MODX Extras
          Bob's Guides is now hosted at A2 MODX Hosting
          • 36704
          • 131 Posts
          Hi,

          I have i problem with formit, before it was working and now it's totally not working.
          My Setup: MODX 2.1.4pl with formit ver. 2.03 using google SMTP

          My form:
          [[!FormIt?
          &hooks=`math,spam,email,redirect`
          &redirectTo=`2`
          &emailTpl=`email-chunk`
          &emailTo=`[email protected]`
          &emailSubject=`uploaded file`
          &validate=`name:required,
          email:required,contact:required,address:required,city:required,state:required,contact_attachment:required,message:required:stripTags`

          ]]

          <p>[[!+fi.error.error_message:notempty=`<p>[[!+fi.error.error_message]]</p>`]]

          <form id="form1" class="cmxform" method="post" action="[[~[[*id]]]]" enctype="multipart/form-data">

          <fieldset><legend>Contact form</legend>
          <input type="hidden" name="nospam:blank" value="" />

          <label for="name">
          Name:
          <span class="error">[[+fi.error.name]]</span>
          </label>
          <input type="text" name="name" id="name" value="[[+fi.name]]" />

          <label for="address">
          Address:
          <span class="error">[[+fi.error.address]]</span>
          </label>
          <input type="text" name="address" id="address" value="[[+fi.address]]" />

          <label for="city">
          City:
          <span class="error">[[+fi.error.city]]</span>
          </label>
          <input type="text" name="city" id="city" value="[[+fi.city]]" />

          <label for="state">
          Select State:
          <select name="state">
          [[!FormItStateOptions? &selected=`[[!+fi.state]]`]]
          </select>
          </label>

          <label for="zipcode">
          Zip Code:
          <span class="error">[[+fi.error.zipcode]]</span>
          </label>
          <input type="text" name="zipcode" class="small" value="[[+fi.zipcode]]" />

          <label for="contact">
          Contact No:
          <span class="error">[[+fi.error.contact]]</span>
          </label>
          <input type="text" name="contact" id="contact" value="[[+fi.contact]]" />

          <label for="email">
          Email:
          <span class="error">[[+fi.error.email]]</span>
          </label>
          <input type="text" name="email" id="email" value="[[+fi.email]]" />

          <label for="contact_attachment">Upload your own design with this format: PSD,AI,CDR,JPEG or PNG24</label><em>(max size 5MB)</em>

          <input type="file" name="contact_attachment" value="[[!+fi.contact_attachment]]" />

          <label for="message">
          Your Message:
          <span class="error">[[+fi.error.text]]</span>
          </label>
          <textarea name="message" id="text" cols="55" rows="20" value="[[+fi.text]]">[[+fi.text]]</textarea>
          <br class="clear" />


          <label>Please solve this math to avoid spam on our system.

          <h3>[[!+fi.op1]] [[!+fi.operator]] [[!+fi.op2]]?</h3></label>
          [[!+fi.error.math]]
          <input type="text" name="math:required" value="[[!+fi.math]]" />
          <input type="hidden" name="op1" value="[[!+fi.op1]]" />
          <input type="hidden" name="op2" value="[[!+fi.op2]]" />
          <input type="hidden" name="operator" value="[[!+fi.operator]]" />


          <br class="clear" />
          <div class="form-buttons"
          <p class="submit"><button type="submit"></button></p>
          </div>

          </form>

          Upon sending the standard form it's nothing happened, no redirect, no error validations & not sending any data.

          Please help me to solved this problem...

          Thanks

            • 3749
            • 24,544 Posts
            Try taking out the output modifier for now. You're telling MODX to print an empty paragraph if the error message is not empty. Try just:

            <p>[[!+fi.error.error_message]]</p>


            Or use the tag from splittingred's post above.


            ---------------------------------------------------------------------------------------------------------------
            PLEASE, PLEASE specify the version of MODX you are using . . . PLEASE!
            MODx info for everyone: http://bobsguides.com/modx.html
              Did I help you? Buy me a beer
              Get my Book: MODX:The Official Guide
              MODX info for everyone: http://bobsguides.com/modx.html
              My MODX Extras
              Bob's Guides is now hosted at A2 MODX Hosting
              • 36704
              • 131 Posts
              Hi bob,
              Thanks for having a time to reply.
              Here is my formit call:

               [[!FormIt?
                 &hooks=`math,spam,email,redirect`
                 &redirectTo=`2`
                 &emailTpl=`Sporttechx-email-chunk`
                 &emailTo=`[email protected]`
                 &emailSubject=`Client uploaded design`
                 &validate=`name:required,
               email:required,contact:required,address:required,city:required,state:required,contact_attachment:required,message:required:stripTags`      
              
              ]]
              
              <p>[[!+fi.error.error_message:notempty=`<p>[[!+fi.error.error_message]]</p>`]]</p>
              
              <form id="form1" class="cmxform" method="post" action="[[~[[*id]]]]" enctype="multipart/form-data">
              
              <fieldset><legend>Contact form</legend>
                  <input type="hidden" name="nospam:blank" value="" />
              
               <label for="name">  
                      Name:  
                      <span class="error">[[+fi.error.name]]</span>  
                  </label>  
                  <input type="text" name="name" id="name" value="[[+fi.name]]" />
                   
                  <label for="address">
                      Address:
                      <span class="error">[[+fi.error.address]]</span>
                  </label>  
                  <input type="text" name="address" id="address" value="[[+fi.address]]" />
              
                 <label for="city">
                      City:
                      <span class="error">[[+fi.error.city]]</span>
                  </label>  
                  <input type="text" name="city" id="city" value="[[+fi.city]]" />
              
                 <label for="state">
              	Select State:
                  <select name="state">
                    [[!FormItStateOptions? &selected=`[[!+fi.state]]`]]
                  </select>
                 </label>
              
                 <label for="zipcode">
                      Zip Code:
                      <span class="error">[[+fi.error.zipcode]]</span>
                  </label>  
                  <input type="text" name="zipcode" class="small" value="[[+fi.zipcode]]" />
              
                  <label for="contact">
                      Contact No:
                      <span class="error">[[+fi.error.contact]]</span>
                  </label>  
                  <input type="text" name="contact" id="contact" value="[[+fi.contact]]" />
              
                  <label for="email">
                      Email:
                      <span class="error">[[+fi.error.email]]</span>
                  </label>  
                  <input type="text" name="email" id="email" value="[[+fi.email]]" />
              
              	<label for="contact_attachment">Upload your own design with this format: PSD,AI,CDR,JPEG or PNG24</label><em>(max size 5MB)</em><br />
              	<input type="file" name="contact_attachment" value="[[!+fi.contact_attachment]]" />
                
                <label for="message">
                      Your Message:
                      <span class="error">[[+fi.error.text]]</span>
                  </label>
                  <textarea name="message" id="text" cols="55" rows="20" value="[[+fi.text]]">[[+fi.text]]</textarea>
                  <br class="clear" />
               
              
              <label>Please solve this math to avoid spam on our system.<br /><br /><h3>[[!+fi.op1]] [[!+fi.operator]] [[!+fi.op2]]?</h3></label>
              [[!+fi.error.math]]
              <input type="text" name="math:required" value="[[!+fi.math]]" />
              <input type="hidden" name="op1" value="[[!+fi.op1]]" />
              <input type="hidden" name="op2" value="[[!+fi.op2]]" />
              <input type="hidden" name="operator" value="[[!+fi.operator]]" />  
              
              
                  <br class="clear" />
                      <div class="form-buttons"
                  	<p class="submit"><button type="submit"></button></p> 
                     </div>       	
              
              </form>  


              i use the google smtp here..

              but When i tried to use your quickemail it sends successfully and working.
              On my manager error log was empty.

              Note: I am also using multiple context for multiple domains
                • 3749
                • 24,544 Posts
                Try it with just the email hook and see if that works.


                ---------------------------------------------------------------------------------------------------------------
                PLEASE, PLEASE specify the version of MODX you are using . . . PLEASE!
                MODx info for everyone: http://bobsguides.com/modx.html
                  Did I help you? Buy me a beer
                  Get my Book: MODX:The Official Guide
                  MODX info for everyone: http://bobsguides.com/modx.html
                  My MODX Extras
                  Bob's Guides is now hosted at A2 MODX Hosting
                  • 36704
                  • 131 Posts
                  One more thing that i observe here when using 2 context. (web) & (mywebsite)

                  Before all of my resources was on the (mywebsite) and configure all the system settings for this context. The formit was failed to work.

                  When i transfer all the resources on the (web context) and point the domain into default context in index.php the formit was working now.

                  Is there anyway to work this formit on a multiple context? Did you experience this problem before?

                  Thanks & best regards,
                    • 3749
                    • 24,544 Posts
                    I notice that others are having trouble with FormIt in multiple contexts, but I'm afraid I didn't find any solution.

                    Maybe someone else knows.


                    ---------------------------------------------------------------------------------------------------------------
                    PLEASE, PLEASE specify the version of MODX you are using . . . PLEASE!
                    MODx info for everyone: http://bobsguides.com/modx.html
                      Did I help you? Buy me a beer
                      Get my Book: MODX:The Official Guide
                      MODX info for everyone: http://bobsguides.com/modx.html
                      My MODX Extras
                      Bob's Guides is now hosted at A2 MODX Hosting
                      • 36704
                      • 131 Posts
                      Yes bob,
                      This problem must be address to splittingred's. Since the modx has capable to handle multiple websites(context) that is supposed to be can handle the other plugins like formit.

                      Anyway bob, thanks again for having a time for this. I admire your work and all the staff's who build this modx.
                      I am having a plan to conduct a free seminar or training here in the philippines to teach the IT students on how to use this modx. I wish to have a book of modx here in my country.