We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 23831
    • 23 Posts
    I had a few questions in regards to the "eForm" snippet... Im creating a form on my website to gather some basic information (First Name, Last Name, address..etc..) and then I want that information to be emailed to me as soon as the user clicks send... Im not an expert at using snippets and how to call them... I was wondering if someone could give me a basic layout of how I would set this up? Any help would be much appreciated.. Thanks!
      • 7231
      • 4,205 Posts
      Check out the eForm documentation. It is hidden in the assets/snippets/eform/docs/eform.htm There you will find some form examples along with complete documentation.
        [font=Verdana]Shane Sponagle | [wiki] Snippet Call Anatomy | MODx Developer Blog | [nettuts] Working With a Content Management Framework: MODx

        Something is happening here, but you don't know what it is.
        Do you, Mr. Jones? - [bob dylan]
        • 23831
        • 23 Posts
        Thanks for the response, however, Im still a little lost. I have the chunks made and my form made as the example states, yet I cant get the info to go to my email when i click the send button on the website... What am I doing wrong? The form action is <form method="post" action="[~[id]~]"> Dont i need to put a "mailto:" in the action spot? Im sorry if this is way below the questions you normally deal with but Im really quite stuck. Thanks for any help.
          • 21561
          • 16 Posts
          If you post your snippet call and template chunk I could probably help you.

          Dont i need to put a "mailto:" in the action spot?
          no the email address should be in the snippet call

          As per the documentation the &to parameter is where you put the email address you want the form to submit to
            • 36416
            • 589 Posts
            Quote from: prd689 at Apr 15, 2009, 04:32 PM

            ...yet I cant get the info to go to my email when i click the send button on the website... What am I doing wrong?
            The form action is <form method="post" action="[~[id]~]">

            What exactly happen when you click send?
            BTW, action landing target should be [~[*id*]~]
              • 2685
              • 44 Posts
              I’m a newbie to MODx.
              I’ve created my first website in MODx.
              And I’m using eform as a contact us form.
              And I need to include

              First name*
              Last name*
              email address*
              mobile number
              country*
              captcha*

              As shown above most of the fields are compulsory but some are not like "mobile number" .
              How can I manage to do it huh
                • 22427
                • 793 Posts
                Try the following:
                <label for="cfEmail">email adress*:</label>
                <input name="email" id="cfEmail" class="text" type="text" eform="Your email adress:email:1" />

                The eform attribute here contains the title, the datatype and the value 1 for "required", seperated by colons ( : ).