We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 17058
    • 80 Posts
    Oups. You’re right. I did forget the &subject=`contact request`. Thanks.

    le block
      le_block is Member of FUTY | Medienagentur aus Leipzig mit Schwerpunkt Marketing, Branding, Print und Webdesign
      • 32963
      • 1,732 Posts
      Hi,

      Just to let you know that as of version 2.0 eForm will support a new field tag format as shown below:

      in form:
      <input type="text" name="firstname" value="#:firstname#" />
      <input type="text" name="lastname" value="#:lastname#" />

      in report:
      Dear #:firstname# #:lastname#, ...

      This tag will replace the [+placeholder+] format but will still be able to parserand render previous forms that makes use of [++].

      eFom 2.0 will be compatible with forms designed for version 1.0.


        xWisdom
        www.xwisdomhtml.com
        The fear of the Lord is the beginning of wisdom:
        MODx Co-Founder - Create and do more with less.
        • 25663 MODX Staff
        • 12,272 Posts
        And here’s my collected patch as committed into subversion. Note also that it includes a sample tell a friend form chunk and an improved email validator.
          Ryan Thrash, MODX Co-Founder
          Follow me on Twitter at @rthrash or catch my occasional unofficial thoughts at thrash.me
          • 30223
          • 1,010 Posts
          Ehm,... did you really mean to zip up all the svn info as well? Not much use to me besides finding out the svn repository details smiley

          Anyway, great patch, thanks!
            • 25663 MODX Staff
            • 12,272 Posts
            I wondered how it got so darned big! LOL

            I’ll fix it later... tongue (maybe)
              Ryan Thrash, MODX Co-Founder
              Follow me on Twitter at @rthrash or catch my occasional unofficial thoughts at thrash.me
              • 33372
              • 1,611 Posts
              This feature doesn’t quite work the way I expected:
              &mailselector (Optional)
              Sets the name of the form field to use as a selector to select
              a single email from the comma (,) delimited emails assigned
              the &to parameter. This selector field will act like a numeric
              index to select an email. It will start at 1 for the first email
              and ends at N for the last email in the list.

              For example:
              &to =`[email protected],[email protected],[email protected]`
              &mailselector=`topic`

              on the web form the topic fields is actually a dropdown menu.
              when the selects a topic from the list the value 1,2 or 3 will
              be sent to eForm which will then be used to select one of the
              three emails assigned to the &to parameter. This email address
              will be the address used to send the email to.

              I have a form asking people what they’re contacting us about. If they’re interested in placing an order, I want their message to go to one email address, but if they’re interested in anything else it goes to a different one. However I want to know what their interest was and display it in the email sent.

              I thought that this feature would allow me to do this, but only after a lot of banging my head against the wall did I realize that I had to use numerical values in the drop-down list instead of the interest values. Silly me: I was expecting it was using the index value of the menu.

              Since others may be as thick as I am (and may even prefer the behavior I describe), I thought I’d mention it here.
                "Things are not what they appear to be; nor are they otherwise." - Buddha

                "Well, gee, Buddha - that wasn&#39;t very helpful..." - ZAP

                Useful MODx links: documentation | wiki | forum guidelines | bugs & requests | info you should include with your post | commercial support options
                • 28042 ☆ A M B ☆
                • 24,524 Posts
                Line 307 in eform.inc.php:
                ... <a href=\"[*id*]\">submit another form</a></p></div>";
                

                gave me grief because I don’t have friendly URLs turned on. Should be:
                ... <a href=\"[~[*id*]~]\">submit another form</a></p></div>";
                
                  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
                  • 25663 MODX Staff
                  • 12,272 Posts
                  Thanks for that catch Susan. I’ve updated it and will commit it into the SVN repository.
                    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
                    Ok, using Ryan’s fully patched version. Still can’t figure out how to maintain select options selected on reload for errors. My test template (taken from the original eFormParse announcement post, http://modxcms.com/forums/index.php/topic,2122.msg35514/topicseen.html#msg35514):
                    <p><span style="color:#900;">[+validationmessage+]</span></p>
                    <form method="post" action="[~[*id*]~]" name="testForm">
                    <input type="hidden" name="formid" value="testForm" />
                    <table>
                    <tr valign="top">
                    	<td>Name</td>
                    	<td><input type="text" name="fullName" maxlength="60" eform="Your Name:text:1" value="[+fullName+]" /></td>
                    </tr>
                    <tr valign="top">
                    	<td>Email</td>
                    	<td><input type="text" name="email" size="40" maxlength="40" eform="Email Address:email:1" /></td>
                    </tr>
                    <tr valign="top">
                    	<td>Any Ideas?</td>
                    	<td>
                    		<input type="radio" name="frmIdea" value="Yes" eform="Any Idea:radio:1" /> Yes 
                    		<input type="radio" name="frmIdea" value="No" /> No 
                    		<input type="radio" name="frmIdea" value="Maybe" /> Maybe 
                    		<input type="radio" name="frmIdea" value="Dont Know" /> Don't Know
                    	</td>
                    </tr>
                    <tr valign="top">
                    	<td>Language</td>
                    	<td><select name="frmLanguage">
                    		<option value="en-au">AU English</option>
                    		<option value="en-gb">UK English</option>
                    		<option value="en-us" selected="selected">US English</option>
                    </select></td>
                    </tr>
                    <tr valign="top">
                    	<td><input type="submit" name="submit" value="Submit" /></td>
                    	<td></td>
                    </tr>
                    </table>
                    </form>

                    [later...] got it figured out. Added eform="Language:select:1" to the <select> tag:
                    <select name="frmLanguage" eform="Language:select:1">
                    and now it works just fine!
                      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
                      • 30223
                      • 1,010 Posts
                      [later...] got it figured out. Added eform="Language:select:1" to the <select> tag:

                      I understand from what you’re saying that it doesn’t remember the value if you don’t make it required? That’s a bit of a bug(ger).. smiley I’ll look into improving that.

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