We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 5653
    • 9 Posts
    Not sure if this is the right place for this question, but I don’t see an area dedicated to FormIt.

    I followed the instructions for FormIt at http://svn.modxcms.com/docs/display/ADDON/FormIt but it’s not working. The form looks fine on the page, I’ve got it sending it to my email address but the emailFrom portion is blank and the message is not getting sent either. Just a blank email. On the FormIt snippet, under properties, all I’ve done is added "Contact Form" as the value for email subject because it said if you have email set as a hook then you have to specify a subject. Any suggestions?

    This is my code:

    [[FormIt?
    &hooks=`email,redirect`
    &emailTpl=`myEmailChunk`
    &emailTo=`[email protected]`
    &redirectTo=`4`
    ]]

    <h2>Contact Form</h2>

    <p>[[+fi.error.message]]</p>

    <form action="[[~[[*id]]]]" method="post" class="form">
    <input type="hidden" name="nospam:blank" value="" />

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

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

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

    </p><label for="text">
    Message:
    <span class="error">[[+fi.error.text]]</span>
    </label>
    <textarea name="text:required:stripTags" id="text" cols="55" rows="7">[[+fi.text]]</textarea></p>

    <br class="clear" />

    <div class="form-buttons">
    <input type="submit" value="Send Contact Inquiry" />
    </div>
    </form>


    Please help! My client is wanting a contact form pronto.
      • 3749
      • 24,544 Posts
      I don’t see anything wrong with your code, but if you just want a simple contact form, you might try installing SPForm through Package Manager. You should have a working form as soon as the install is finished.
        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
        • 5653
        • 9 Posts
        Thanks for the quick reply! Believe it or not, I found SPForm just minutes before you sent this reply. I had it up and running in less than 10 minutes (including installation). I used the tutorial here: http://bobsguides.com/spform-tutorial.html. Are you the same Bob? I’ve found almost everything I’ve needed to know about ModX at BobsGuides. I’m thinking I’ll check there first from here on out. Thanks a ton! Modx Rocks!
          • 3749
          • 24,544 Posts
          Yup. I’m that Bob (did I mention that Bob’s Guides now accepts donations? wink ).

          Thanks for the kind words. I’m glad you got it working. smiley

          And MODx, does indeed Rock -- big time. grin
            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
            • 5653
            • 9 Posts
            And I should mention that Bob’s Guides deserves donations. I will visit there soon to pay my debt of gratitude. It amazes me that MODx is free and open source yet so darn powerful! You just gotta know where to look to put it all together sometimes. When are you guys gonna come out with the MODx tee? I’d proudly sport one! Thanks again, great job.
              • 3749
              • 24,544 Posts
              Quote from: colortheory at Nov 01, 2009, 06:20 PM

              And I should mention that Bob’s Guides deserves donations. I will visit there soon to pay my debt of gratitude. It amazes me that MODx is free and open source yet so darn powerful! You just gotta know where to look to put it all together sometimes. When are you guys gonna come out with the MODx tee? I’d proudly sport one! Thanks again, great job.

              I wanted to mention that MODx also accepts (and desperately needs) donations. In fact the first thing you’ll see on the Bob’s Guides "Support this Site" page is a link to the MODx donations page. smiley
                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