We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 27
    • 117 Posts
    hi all

    just a quick one: i want my subject to be the page url, anyone know how I do that please?

    sorry if this has been answered before, this is a super long thread!
      • 28042 ☆ A M B ☆
      • 24,524 Posts
      I don’t think the current document’s URL is part of the documentObject array. If it isn’t you’ll need a snippet
      // get current document's URL
      $url = $modx->makeURL($modx->documentIdentifier);
      return $url;
      

      then use that snippet as the value for the &subject parameter:
      [!eForm? ... &subject=`[[getPageURL]]` ... !]
        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
        • 27
        • 117 Posts
        thanks susan, that works perfectly =))
          • 27376
          • 576 Posts
          Quote from: 0ad at Feb 04, 2008, 05:22 PM

          just a quick one: i want my subject to be the page url, anyone know how I do that please?
          0ad, You may want to try using [tt][~[*id*]~][/tt] instead, saves the extra overhead of running a snippet. Keep in mind that this technique works best on un-cached snippet calls, but since eForm needs to be called un-cached anyway, this solution is cleaner.
          [!eForm? ... &subject=`[~[*id*]~]` ... !]
            • 10076
            • 1,024 Posts
            edit:

            Hi,

            I am trying to use Eform for a free pool manager (www.renzware.nl) for a football fan site.
            A form needs to be filled out by participents and is send by email.

            The mail send to the manager user is then copied/pasted into the "Pool Manager". Therefor I needs a certain format, see below.
            The manager will then generate an HTML page which I plan to paste in a chunk.

            First question, how to have "form action" handled by eform[/s] Found that simpel the standard syntax handles it well!

            Second how to maintain that format? :This one s still open, I simply want all data from the form in my email, can I use wildcards, or would I need to loop to get all values? Need mails to be like below:

            DATA WEBFORM:
            ---------------------------------------------------
            Name : Naam
            Value: Frank Los
            ---
            Name : Woonplaats
            Value: -
            ---
            Name : E-mail
            Value: [email protected]
            ---
            Name : StandOntvangen
            Value: 0
            ---
            Name : Wedstrijd0Thuis
            Value: 
            ---
            Name : Wedstrijd0Uit
            Value: 
            ---
            Name : Wedstrijd1Thuis
            Value: 
            ---
            Name : Wedstrijd1Uit
            Value: 
            ---
            Name : Wedstrijd2Thuis
            Value: 
            ---
            Name : Wedstrijd2Uit
            Value: 
            ---
            Name : Wedstrijd3Thuis
            Value: 
            ---
            Name : Wedstrijd3Uit
            etc.....
            
            


            Part ot the form tpl:
            </font></td><td><font size="3" face="Arial"><strong>Portugal</strong></font></td><td><font size="3" face="Arial"><strong>-</strong></font></td>
            <td><font size="3" face="Arial"><strong>Turkije</strong></font></td><td><font size="3" face="Arial"><strong><Input name="Wedstrijd0Thuis" size="2" />-<Input name="Wedstrijd0Uit" size="2" /></strong></font></td>
            </tr>
              • 6546
              • 2 Posts
              Has anyone had a problem with ’occasional’ eform stability?
              I’m not that familar with modx--I can keep our site updated and implement new features, etc... I’m glad that I didn’t design it though.
              Our site is maintained by someone else: I have no access to the server, just a modx admin login.

              However, occasionally, (more often than not, actually) we receive no emails from our ’online contest registration’ forms.

              Sometimes it works, sometimes it doesn’t. Site: wqme.com ...

              Any thoughts? What should I be checking on?

              I should also add that the response ALL the time is that the form has been successfully sent.
                • 29181
                • 480 Posts
                Hi there,

                I’m having a couple of issues with the &from parameter.
                My client would like the email to be sent from whoever fills out the form, so the &from parameter sounds like it should be just the trick.

                I have a field called email which is what the user fills out with their email...cunning huh?

                [!eForm? &formid=`ContactForm` &subject=`[+subject+]` &to=`[email protected]` &from=`[+email+]` &ccsender=`0` &tpl=`ContactForm` &report=`ContactFormReport` &vericode=`1` &cssStyle=`formStyles`  &eFormOnBeforeMailSent=`onBeforeMailSentFunction`!] 


                Unfortunately when I receive the email it has no sender. Replacing the [+email+] with something like [email protected] works fine.

                Also [+email+] works in my report.

                Does anybody have any idea what I am doing wrong? I duplicated the technique on different webspace and it worked. We have phpmailer smtp service set up (I have been told).

                Thanks for any offerings.
                Taff

                [EDIT]
                As stated at http://modxcms.com/forums/index.php/topic,7521.msg52944.html#msg52944 this is no longer possible for the reasons stated there.
                I am now using &replyto=`email` which will suffice hopefully.
                [/EDIT]

                Funny how you can look for an answer for over an hour and always find it 2 minutes after posting a question.
                  Adrian Lawley: www.adrianlawley.com
                  • 36549
                  • 572 Posts
                  SORTED - FOR SOME REASON HAD TO CHANGE THE PAGE NAME.
                  Hi,

                  i am having real problems getting a form to display.
                  I must be overlooking something as i’ve got the from to work before and i have literally just copied over the styles and code from the working site to a new one.
                  The form will not display at all, instead the snippet call displays on the page like this:
                  [!eForm? &formid=`feedbackForm` &to=`[email protected]` &tpl=`eFeedBackForm` &report=`eFeedbackReport` &thankyou=`eFeedbackThanks` &mailselector=`department’ &vericode=`1` &subject=`Web site feedback`!]

                  does anyone know why this could be happening?
                  I checked and cross checked the filenames and cannot figure out why this is happening.

                  Any help much appreciated.

                    www.9thwave.co.uk
                       WEB | DESIGN | PRINT
                    • 25663 MODX Staff
                    • 12,272 Posts
                     &mailselector=`department' 


                    I suspect that your mixed backtick and single-quote causes all sorts of oddities.
                      Ryan Thrash, MODX Co-Founder
                      Follow me on Twitter at @rthrash or catch my occasional unofficial thoughts at thrash.me
                      • 26016
                      • 561 Posts
                      Hi,
                      Eform is absolutely fantastic, without question.

                      Just wanted to mention this... I think I found something busticated in it... I don’t think it’s handling validation of radio buttons correctly, or at least as advertised - it claims that automagic radio button validation is built-in. I had a particular radio button field that I coded carefully and checked repeatedly.

                      To test my form, I would submit it without any data entry, and of course you get an error message for all required variables. Then I would fill those in, and choose something about halfway down the list of my radio button choices. It would error, saying that the last radio button had an Invalid Value in it. I did Debug, and saw that the Invalid Value is the one that I actually chose above it. No surprise there. smiley

                      It’s entirely possible that I made a mistake in my form coding, and I hope someone proves me wrong. Maybe a subscript is needed, as with Checkboxes. Or maybe some kind of session problem, or who knows. My Eform call was uncached as usual. I also tried explicitly coding datatype, despite documentation saying this is not needed for radio or checkboxes. But I suspect that one of those fancy IF statements in the code is just a little off.

                      As I have virtually no extra time, I simply changed my form to use a Select instead. Maybe I’ll examine the code further later on.

                      I hope this saves somebody some extra time.

                      Cheers, Samba
                        MODx and Wordpress development
                        Linux, PHP 5.2, MySQL 5.0, Evo 1.05, Revo 2.08-pl, Firefox 4

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