We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 33114
    • 518 Posts
    I’m trying to pass some TVs to this snippet to send them with form values. I still can not manage this.

    Example.

    I have a TV [*price*]. Before I use eForm snippet, I call my [[get_price]] snippet where I set the placeholder for the TV ([+price+]). When I try to use the placeholder in the chunk of my order form  and in the order report chunk  - the pice won’t appear.
    Now... I can use a direct call to my [[get_price]] snippet (where now it returns the TV value, not placeholder) in the "order form" chunk. That worked of course...but the email I get contains no value of my snippet just the "[[get_price]]" text.

    Well...the question is:  can I somehow easily pass TVs along with form values into the sent mail?

    [Solved] Oh my... I forgot about the hidden fields!!! smiley
      http://modx.ru - российская поддержка MODx
      http://newscup.ru - экспериментальный проект
      http://yentsun.com - персональный сайт
      • 32241
      • 1,495 Posts
      Glad you got it to work.
        Wendy Novianto
        [font=Verdana]PT DJAMOER Technology Media
        [font=Verdana]Xituz Media
        • 28042 ☆ A M B ☆
        • 24,524 Posts
        The cc option does not work (&cc=`[email protected]`). The $cc variable is available and correct when setting up the arguments for the phpmailer class. I haven’t done any digging in the phpmailer class itself.
          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
          • 7455
          • 2,204 Posts
          Quote from: sottwell at Apr 29, 2006, 12:45 AM

          The cc option does not work (&cc=`[email protected]`). The $cc variable is available and correct when setting up the arguments for the phpmailer class. I haven’t done any digging in the phpmailer class itself.

          did you update the phpmailer.class?

          I had some problems with the included version until I updated it to the latest funktion.
          But if you did and you will dive in the script could you see if its posible to use the filled in email adres to be set as &from adres.

          greets Dimmy
            follow me on twitter: @dimmy01
            • 28042 ☆ A M B ☆
            • 24,524 Posts
            I’ll update the mailer class. Thanks.
              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
              Can someone track that it needs to be updated so we’ll do it in the main distribution as well?
                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 updated it, but cc still doesn’t do anything.
                  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
                  • 28042 ☆ A M B ☆
                  • 24,524 Posts
                  Here is a patched version of eform to use langage files. All output has been modified to use $_eform[’...’] sytnax; a language file with the name "eform.lang.php" is stored in the eform folder with the eform.inc.php file. The "lang" part of the filename takes the two-letter form, such as en. Use the parameter &lang=`en`to assign the desired language file. Defaults to "en".

                  If you are using a mulitlanguage system, and wanted to dynamically assign the language, you could name your language file using whatever value you use, such as a document ID, for identifying the user’s current language, such as lang.1.php; then use whatever snippet or TV you use to identify the current language in the eform snippet call: &lang=`[*language*]`.

                  Changes:
                  Added the $lang variable to the array of eform params in eform.snippet.php. Included the language file in eform.inc.php and replaced all output strings with $_eform[’...’] syntax. Created the default eform.en.php file to contain the $_eform array.

                  Updated: Added the spam blocker by Zap. Thanks, Zap!
                    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
                    • 727
                    • 502 Posts
                    How is the vericode feature supposed to be used? I see it generates a random string. Is this supposed to be fed into another program or snippet to generate a graphic?

                    Andy
                      • 16892
                      • 107 Posts
                      It was working perfectly!

                      I was submitting the form, it was sending the email and i was receiving the thank you page.

                      I am using the code from the tutorial for my contact form. This is my snippet call:

                      [!eForm? 
                      &vericode=`1` &formid=`ContactForm` &to=`[email protected]`
                      &subject=`title: [+subject+]` &gotoid=`93` &tpl=`ContactForm` 
                      &report=`ContactReport` &from=`[email protected]` !]
                      
                      


                      Now, all of a sudden, i’m getting the following error:
                      « MODx Parse Error »
                      MODx encountered the following error while attempting to parse the requested resource:
                      « `1 ` is not numeric and may not be passed to makeUrl() »
                       
                      Parser timing
                        MySQL: 	0.0122 s s	(2 Requests)
                        PHP: 	0.0468 s s	 
                        Total: 	0.0590 s s
                      


                      I haven’t touched a thing since yesterday and today. What could be the problem?

                      The server is running PHP 4.4.0, 4.11-STABLE FreeBSD, MySQL 4.0.21

                      Thanks.

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