We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 27519
    • 275 Posts
    Hi,

    Totally new to Modx and I tried to figure out the workings of Formit but I’m rather stuck huh ...

    There’s an example here http://rtfm.modx.com/display/ADDON/FormIt.Example+1+-+Contact+Page however I’m struggling to see how it all ties together.

    For my site I want the following:

    - I have a template with 2 content columns
    - On one particular page a chunk is included in the right column which holds the HTML form code; just a simple email contact form.

    After the user entered the fields and presses Submit, the form should be checked and email sent with the form contents.

    How do I hook the chunk up to Formit? Or is using a chunk the wrong approach?

    Thanks!
      MODx Revolution / MAMP / OS X
      • 3749
      • 24,544 Posts
      Just put the FormIt snippet tag above the form code. See the FormIt example for how to name the fields in the form.
        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
        • 27519
        • 275 Posts
        Thanks, got it working, only no email showing up.

        Modx error log says: [2010-08-25 02:13:33] (ERROR @ /modx/index.php) You must provide an email address to send to.

        I entered the email in the snippet call:

        [[!FormIt?
        &hooks=`spam,email,redirect`
        &emailTpl=`MyEmailChunk`
        &emailTo=`[email protected]`
        &redirectTo=`1`
        ]]

        Another thing: where can I put the reCaptcha key values?
          MODx Revolution / MAMP / OS X
          • 27519
          • 275 Posts
          oops, ignore that last question, it’s actually documented embarrassed embarrassed embarrassed
            MODx Revolution / MAMP / OS X