We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 36760
    • 136 Posts
    I have a form built with FormIt version 1.6.0 in Modx Revolution version 2.1.1-pl (traditional). When I click on submit, it sends an email with the correct subject and email address in the headers, but with nothing in the body (so nothing from the form fields that were filled out). I have a feeling I’m missing something simple like a comma or an apostrophe, but I can’t find it for the life of me. I’ve even tried reverting the example email chunk, but with no luck.

    If it helps at all, the email address I’m currently trying to send it to is located on my server, and I’m able to manually send emails to it with no problem, from another email address.

    Here is my form as it appears on my page (with emails and things edited):

    [[!FormIt?
       &hooks=`spam,email`
       &emailSubject=`Contact Form`
       &emailTpl=`MyEmailChunk`
       &emailTo=`[email protected]`
       &validate=`name:required,
          email:email:required,
          subject:required,
          text:required:stripTags,`
    ]]
    
    [[!+fi.error_message:notempty=`<p>[[!+fi.error_message]]</p>`]]
     
    <form action="[[~[[*id]]]]" method="post" class="form">
    <input type="hidden" name="nospam:blank" value="" />
     
    <div class="form-text-input"><label for="name">Your Name</label><input class="float-right inline" type="text" name="name" id="name" value="[[!+fi.name]]" /></div>
    <span class="error">[[!+fi.error.name]]</span>
    <div class="clear"></div>
    <div class="form-text-input"><label for="email">Your Email</label><input class="float-right inline" type="text" name="email" id="email" value="[[!+fi.email]]" /></div>
    <span class="error">[[!+fi.error.email]]</span>
    <div class="clear"></div>
    <div class="form-text-input"><label for="text">Your Message</label><textarea name="text" id="text" cols="57" rows="7" value="[[!+fi.text]]">[[!+fi.text]]</textarea></div>
    <span class="error">[[!+fi.error.text]]</span>
     
    <p><input class="contact-submit" type="submit" value="Send" /></p>
    </form>
    


    And here is my chunk for sending the email, it is titled: MyEmailChunk

    This is the Formit Email Chunk.
     
    <br />[[+name]] ([[+email]]) Wrote: <br />
     
    [[+text]]
    
      • 10323
      • 35 Posts
      Not sure, but there shouldn’t be a comma after your last validator:
      text:required:stripTags`
        • 36760
        • 136 Posts
        I appreciate your help, and I think that may have fixed it. That or my problem was with using the Horde mail software that CPanel offers (it was actually including the form data, just as an attachment and not in the body of the email). I tried reading the mails using Squirrel Mail, and everything comes out fine.

        I’ll just have to test whatever the client ultimately uses.

        Thanks again!