Thanks Eol, I tried your "adding eform validation control parameters to hidden field" suggestion and it worked first time!
hidden input now like:
<input type="hidden" name="title" id="title" value="[*haveYourSayTitle*]" eform="field_text::0:Id:0" />
&sessionVars (optional)]]>
Comma delimited list of $_SESSION variable names. These will be added to the list of field values before the form is displayed and can for instance be used to populate (hidden) fields. When using this parameter make sure you are not disclosing sensitive information from the session!! (a hidden field is not all that hidden afterall)
placing the TV tags in the form (&tpl=`haveYourSay-Form` chunk) in hidden inputs (<input type="hidden" name="title" id="title" value="[*haveYourSayTitle*]" />), with [+title+] in the email template.
In this case I get the following error on the form page and no email:
[undefined] » Tampering attempt detected!
OK, let me put it another way. Can anyone tell me how to put the value of a TV (template variable) into an email resulting from a form.
function efOnBeforeMailSent(&$fields) { ... $fields['field_name'] = $field_text; ... }
<h1>[*pagetitle*]</h1> <p><b>[*haveYourSayTitle*]</b></p> <br/> <p>[*haveYourSayTopic*]</p> <br/><br/> [!eForm? &formid=`haveYourSayForm` &tpl=`haveYourSay-Form` &report=`haveYourSay-Email` &to=`[email protected]` &from=`[email protected]` &replyto=`[email protected]` &subject=`Volunteer Have Your Say` &invalidClass=`invalidValue` &requiredClass=`requiredValue` &cssStyle=`haveYourSay-Styles` &debug=`0` &thankyou=`haveYourSay-Thanks`!]