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!!!
-
☆ 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.
-
☆ A M B ☆
- 24,524 Posts
I’ll update the mailer class. Thanks.
-
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
-
☆ A M B ☆
- 24,524 Posts
I updated it, but cc still doesn’t do anything.
-
☆ 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!
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