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

    I have a formit form like this:

    [[!FormIt?
       &hooks=`email`
       &emailTpl=`email.pro.tpl`
       &emailTo=`[email protected]`
       &emailSubject=`new message`
       &validate=`name:required,
       email:email:required,
       subject:required,
       text:required:stripTags,`
    ]]


    It is working as it should, only two thinks are not clear:

    1 How can I get the form to use ajax to get the message submitted instead of doing a reload of the page?

    edit solved: just added "action="[[~[[*id]]]]#myid">

    2 A "message submit" form should be loaded into a div - if the message successfully got submitted. (no need for server check)

    thank you!

    AD [ed. note: ad2003 last edited this post 11 years, 1 month ago.]
    • You have an extra , at the end of your validate string, it should be
      &validate=`name:required,
         email:email:required,
         subject:required,
         text:required:stripTags`
        Studying MODX in the desert - http://sottwell.com
        Tips and Tricks from the MODX Forums and Slack Channels - http://modxcookbook.com
        Join the Slack Community - http://modx.org
        • 42101
        • 125 Posts
        Quote from: sottwell at Mar 23, 2013, 05:11 AM
        You have an extra , at the end of your validate string, it should be
        &validate=`name:required,
           email:email:required,
           subject:required,
           text:required:stripTags`

        hi! thanks for the hint, just changed it.