We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 25663 MODX Staff
    • 12,272 Posts
    TheBear,

    It would seem your template is not right.
      Ryan Thrash, MODX Co-Founder
      Follow me on Twitter at @rthrash or catch my occasional unofficial thoughts at thrash.me
      • 29655
      • 16 Posts
      Quote from: rthrash at Sep 02, 2006, 02:40 PM

      TheBear,

      It would seem your template is not right.
      D’oh. Having gone through the dozens of pages of this thread, I think I’m a little lost with how all of this is supposed to work, especially when it comes down to the eForm parser. This is (hopefully) a detailed list of what did and what I have going; can anybody check to see what I’m doing wrong?

      - I have installed the original eForm snippet as shown on the original post. I’ve replaced and included the eForm Parser.
      - I made a new chunk titled "contactform" and in it includes the following:
      <div style="margin-top: 20px;"><p>Fields mark with <span class="title">*</span> are required.</p>
      <p><span style="color: #900;">[+validationmessage+]</span></p>
      	<form method="post" enctype="multipart/form-data">
      		<input type="hidden" name="formID" value="contactform" />
      		<label style="float: left; width: 90px;"><span class="title">*</span> Your Name:</label>  
      			<input type="text" name="form_element0" size="40" eform="Your Name::1:" /></span><br /><br />
      		<label style="float: left; width: 90px;"><span class="title" eform="Email Address:email:1">*</span> Your e-mail:</label>  
      			<input type="text" name="form_element1" size="40" /><br /><br />
      		<label style="float: left; width: 90px;"><span class="title">*</span> Subject:</label> 
      			<select name="form_element2" eform="Subject::1:">
      				<option value="Sales Related">
      					Sales Related
      				</option>
      				<option value="Tech Support Related">
      					Tech Support Related
      				</option>
      				<option value="Other">
      					Other
      				</option>
      			</select><br /><br />
      		<label style="float: left; width: 90px;"><span class="title">*</span> Message:</label> 
      		<textarea name="form_element3" rows="8" cols="38" eform="Your Message::1:"></textarea><br /><br />
      		<input class="form-input-button" type="submit" name="submitButton" value="Submit" />
      		<input class="form-input-button" type="reset" name="resetButton" value="Reset" /> 
      	</form></div>


      - I then called the snippet eform with the following on my contact page:
      [!eform? &formid=`contactform`  &to=`[email protected]` &gotoid=`1` &tpl=`contactform`!]


      Perhaps I have to create a report template? Thank you in advance for your support.
        • 25663 MODX Staff
        • 12,272 Posts
        You do in fact need a report template.
          Ryan Thrash, MODX Co-Founder
          Follow me on Twitter at @rthrash or catch my occasional unofficial thoughts at thrash.me
          • 31654
          • 238 Posts
          I need to get the error messages for when someone doesn’t fill in a field to appear at the page.
          I have a form that appears at the bottom of a long page so when someone clicks the send button
          and an error appears because they haven’t filled in a field they don’t see the errors because the page refreshes

          Have a look:
          Click on the send button without filling in any fields... you’ll see you need to scroll down to see the error messages
          http://www.adrenalingames.com/booking_paintball_prices

            Web Development, Web Hosting & Search Engine Marketing by:

            Vitalized | UK
            w. www.vitalized.co.uk

            Website Design | Search Engine Marketing (SEM) | UK MODx web hosting, secure, fast & 100% MODx compatible

            Vitalized | Australia
            w. www.vitalized-australia.com.au

            Website Design | Search Engine Marketing (SEM) | Australian MODx web hosting, secure, fast & 100% MODx compatible
            • 28042 ☆ A M B ☆
            • 24,524 Posts
            It’s a placeholder. Put it wherever you want it.
              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
              • 31654
              • 238 Posts
              I’ve tried it but it dooesn’t work!
              This is the code I’m placing at the top of the page but it doesn’t show anything:

              <p><b><span style="color:#FF0000;">[+validationmessage+]</span></b></p>

                Web Development, Web Hosting & Search Engine Marketing by:

                Vitalized | UK
                w. www.vitalized.co.uk

                Website Design | Search Engine Marketing (SEM) | UK MODx web hosting, secure, fast & 100% MODx compatible

                Vitalized | Australia
                w. www.vitalized-australia.com.au

                Website Design | Search Engine Marketing (SEM) | Australian MODx web hosting, secure, fast & 100% MODx compatible
                • 30223
                • 1,010 Posts
                I’m not completely sure if this will work but try to make the document itself the template for eForm. So your document would look something like this:
                <h1>Adrenalin Games Paintball - Booking & Prices</h1>
                <p><strong>Promotions</strong></p>
                <form name="contact" action="booking_paintball_prices" method="post">
                <input name="formid" value="MyForm" type="hidden">
                <p class="whatever-error-class">[+validationmessage+]</p>
                
                ...more normal page content...
                
                <ol>
                    <li>
                      <label for="yourname">Your name:<em>*</em></label>
                      <input id="yourname" size="27" class="" name="yourname" value="" type="text">
                    </li>
                ...rest of form...
                </ol>
                </form>
                
                <!-- call snippet -->
                [!eForm tpl=`document_id` report=`etcetera` !]
                
                


                Where document_id is the id of the page. As I said, I’m not sure if this works but give it a try... I don’t know what eFormParse does with the rest of your content (meaning I can’t remember). When I’ve got a bit more time I’ll have a look into it.
                  • 31654
                  • 238 Posts
                  Just an idea...

                  Is it possible to edit the code to it goes to a URL on error (and shows the error messages)?
                  What I’m thinking is to use an anchor tag to go to the bottom of the page.

                  so on error the code goes to:
                  &gotourl=`[~[*id*]~]#error`

                  and the follow anchor can be placed at the top of the form chunk
                  <a name="error" id="error"></a>

                  If it is possible then can someone edit it for me as I have no PHP knowledge.... YET!
                    Web Development, Web Hosting & Search Engine Marketing by:

                    Vitalized | UK
                    w. www.vitalized.co.uk

                    Website Design | Search Engine Marketing (SEM) | UK MODx web hosting, secure, fast & 100% MODx compatible

                    Vitalized | Australia
                    w. www.vitalized-australia.com.au

                    Website Design | Search Engine Marketing (SEM) | Australian MODx web hosting, secure, fast & 100% MODx compatible
                    • 22815
                    • 1,097 Posts
                    Well, if you could specify a URL, then you’d be better off having a duplicate (hidden) page that didn’t have any of the top text.
                      No, I don&#39;t know what OpenGeek&#39;s saying half the time either.
                      MODx Documentation: The Wiki | My Wiki contributions | Main MODx Documentation
                      Forum: Where to post threads about add-ons | Forum Rules
                      Like MODx? donate (and/or share your resources)
                      Like me? See my Amazon wishlist
                      MODx "Most Promising CMS" - so appropriate!
                      • 31654
                      • 238 Posts
                      I agree with that but I thought it may be easier if the phaser stayed on the same page
                        Web Development, Web Hosting & Search Engine Marketing by:

                        Vitalized | UK
                        w. www.vitalized.co.uk

                        Website Design | Search Engine Marketing (SEM) | UK MODx web hosting, secure, fast & 100% MODx compatible

                        Vitalized | Australia
                        w. www.vitalized-australia.com.au

                        Website Design | Search Engine Marketing (SEM) | Australian MODx web hosting, secure, fast & 100% MODx compatible

                      This discussion is closed to further replies. Keep calm and carry on.