We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 4967
    • 14 Posts
    What is the easiest way to create a contact form?
      • 3749
      • 24,544 Posts
      http://bobsguides.com/spform-tutorial.html grin

      There’s a download link in the Installing SPForm section.

      If you’re using MODx Revolution, you can download and install it in Package Manager.
        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
        • 3177
        • 137 Posts
        I have 4 Chunks ready which make up a complete EForm set.

        1: The call the to Snippet: contact_Call

        [!eForm? &formid=`contactForm` &to=`[email protected]` &tpl=`xxx_Form` &report=`xxx_Report` &thankyou=`xxx_Thanks` &vericode=`0` &subject=`Somebody wants to contact us.`!]
        


        2: The form: contact_Form
        <h1>Contact me:</h1>
        [+validationmessage+]
        <form method="post" action="[~[*id*]~]"><input type="hidden" name="formid" value="contactForm" />
          <input class="inputbox" type="text" name="name" value="Name" maxlength="80"><br />
          <input class="inputbox" type="text" name="contact" value="E-mail or Telephone" maxlength="80"><br />
          <input type="submit" name="submit" class="submitbox" value="Send">
        </form>
        


        3: the ThankYou message: contact_Thanks
        <h1>Thank you</h1>
        <p>We'll call or email you.</p>
        


        4: The Report: contact_Report
        <h3>A contactform from the website</h3>
        <ul>
        <li>Name = [+naam+]</li>
        <li>Email address or telephone = [+contact+]</li>
        </ul>
        

        Change the ’xxx’ in the call to ’contact’,
        change the email address in the call to your email address
        and that’s it!!



          • 19257
          • 141 Posts
          sweet! thanks..

          How about creating an ajax type of contact form?
            • 3749
            • 24,544 Posts
            Quote from: miamisurf at Aug 15, 2009, 08:03 PM

            sweet! thanks..

            How about creating an ajax type of contact form?

            Both eForm and SPForm do JavaScript validation. What would Ajax add beyond that?
              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
              • 28494
              • 32 Posts

              Both eForm and SPForm do JavaScript validation. What would Ajax add beyond that?

              An example of a feature that would make SPForm be more friendly in an AJAX scenario would be to provide the option for spformproc::send() to return data (such as the thank you page), rather than doing a redirect. Redirects and AJAX don’t typically go well together. My 2c.