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
    I just found an interesting problem/situation/observation with eform. Assume you’ve got a series of forms that all have a state or country select list menu. Like 5 or 6 of them; perfect application for a chunk, right?

    Not so fast.

    Unless those form elements are included directly in the form chunk, the selection-saving-on-error does not work. Just thought you might want to know in case you ran into this... and hopefully there’s a way around it.
      Ryan Thrash, MODX Co-Founder
      Follow me on Twitter at @rthrash or catch my occasional unofficial thoughts at thrash.me
      • 28042 ☆ A M B ☆
      • 24,524 Posts
      I don’t think that there is a current solution. The problem is that the eform snippet’s code is evaluated and its placeholder values are set before the chunks are evaluated, so the data in the chunks is not available for the snippet to load into its placeholders. I think the recursive parser will be able to solve it, though.

      I ran into this same problem earlier, the forms you mentioned had lovely snippets for generating the drop-downs, as well as month and a span of years dropdowns. These also would not work with eForm. Then I considered that in the end, the entire form with all of its options have to be in the final HTML document anyway, so it’s really not an issue. It may make the template chunk look big and awkward, but it all works out to the same thing, and maybe even actually saves a bit of time and processing in generating the form.
        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’m having trouble with the &replyto and &bcc they don’t work!
        I’ve updated the php.mailer (can’t remember it’s name right now) and I’ve updated the code with the replyto code from a previous post on this thread and I just can’t get ether of them to work.

        [!eForm? &formid=`MyForm` &tpl=`emailbooking` &to=`info@******.com` &bcc=`info@******.co.uk` &replyto=`youremail` &format=`yourname:Your name:string:1,yoursurname:Your surname:string:1,address:Address:string:1,postcode:Postcode:string:1,telephone:Telephone:string:1,mobile:Mobile:string:0,[color=red]youremail:Your email:email:1[/color],people:Number of people:string:1,date:Date you want to play:string:1,time:Time you want to play:string:1,activity:Which activity:listbox:1,hear:How did you hear about us:string:1` &report=`bookingemail` &subject=`Paintball Booking from website` &gotoid=`52`!]
        


        I have a client that is also getting a little frustrated with me about the email errors appearing at the bottom of the form page so it anyone has a cleaver idea for putting the error placeholder at the top of the page then please let me know!!!!
        I’ve tried the "using the form to create the whole page" but it didn’t work and it’s also not a very elegant solution, but thanks for the reply smiley
          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
          @web_designer
          Your problem stems from having a form at the bottom of a lot of text. Users submitting the form do not need to see the text again (if they need to, they can revisit the page).

          So..

          Duplicate your paintball booking form page, call it form-action or somesuch. Make sure the duplicate isn’t on the menu, and isn’t searchable.
          Remove the text from the duplicate page.
          Make sure your form action goes to the duplicate page:
          <form action="form-action.html"

          This will ensure that processing is done on a page that is dedicated to reporting problems / confirming etc.

          EDIT: Sorry, not confirming. That’s handled by &gotoid.
            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
            You genius!
            That sorted it perfectly thanks you very, very much for helping.

            grin
              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
              • 25392
              • 34 Posts
              i don’t understand how to make a select/check box?
              can you send me example?
              sorry for my bad english
                MODx Ukraine
                • 12844
                • 59 Posts
                Quote from: rogalsky at Sep 09, 2006, 12:21 PM

                i don’t understand how to make a select/check box?
                Hi, if you just need to know how to place a check box on a page see HTML input tag.
                  • 25392
                  • 34 Posts
                  no...
                  how to make a select/check box with eForm Snippet?
                    MODx Ukraine
                    • 32963
                    • 1,732 Posts
                    Hi,

                    You might want to have a look at this link:

                    http://modxcms.com/forums/index.php/topic,2122.msg19804.html#msg19804
                      xWisdom
                      www.xwisdomhtml.com
                      The fear of the Lord is the beginning of wisdom:
                      MODx Co-Founder - Create and do more with less.
                      • 31037
                      • 358 Posts
                      Hi, I’m trying to figure out how to create simplest working eForm configuration.

                      I’ve been reading this thread and testing eForm configurations for like 8 hours before getting everything to work. I finally succeded, and now I wonder what my problem was! Yes, I’m a newbie smiley

                      Ok, my question is: Is it possible to have all the stuff in just one document, without calling a report template?

                      This configuration works for me:

                      In my contact form document I have
                      <p><form method='post'>
                        <input type="hidden" name="formid" value="testform1" />
                        <input type="text" name="text1" />
                        <input type="submit" name="Submit" value="Submit" />
                      </form></p>
                      
                      [!eForm? &formid=`testform1` &to=`[email protected]` &subject=`Test` &gotoid=`1` &report=`testform312report` &format=`text1:Text1:string:1`!]

                      And in the "testform312report" report chunk I have
                      [+text1+]

                      So I at least made it work with the form in the same document as the call to eForm. But can I also format the eForm call so that I don’t need the "&report" template chunk?

                      If so I guess that I then have found the simpliest working configuration. smiley

                      I could have made this question shorter, but I wanted other newbies like me be able to follow. And as usual, sorry for my bad English! smiley

                      Oh, one more thing, could someone also explain the syntax for "text1:Text1:string:1", what does the three (four?) parts do? I understand some of it, but please explain.

                      Oh #2! Sorry, just one more question (for now): "<input type="text" name="text1" />" works for me, but in examples I’ve seen there is also value=[+text1+], like "<input type="text" name="text1" value="[+text1+]" />" What does that last part do?

                      Thanks!

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