<?php
if ($eFormOnMailSent) {
if ($eFormOnMailSent(&$fields)===false) return;
}
?><?php
if ($eFormOnMailSent) {
if ($eFormOnMailSent($fields)===false) return;
}
?><?php
$eFormOnMailSent= 'myCoolFunctionName';
function $eFormOnMailSent(& $fields) {
//code to manipulate the variable treated as a reference goes here
}
?>Error: Unknown(/www/htdocs/mydomain/assets/snippets/eform/eform.inc.php): failed to open stream: No such file or directory
<form name="contactForm" id="contactForm" action="" method="post"> <input type="hidden" name="formid" value="contact" /> <fieldset id="textfields"> <label for="name"> Name: <input type="text" name="name" id="name" size="24" value="[+name+]" /> </label> <label for="email"> Email: <input type="text" name="email" id="email" size="24" value="[+email+]" /> </label> <label for="phone"> Phone: <input type="text" name="phone" id="phone" size="24" value="[+phone+]" /> </label> </fieldset> <p>Please indicate what types of services you are interested in, and I will get back to you with additional information via phone or email.</p> <!-- checkboxes will be inserted here eventually --> <fieldset id="textarea"> <label for="comments"> Additional questions / comments: <textarea name="comments" id="comments" rows="9" cols="40">[+comments+]</textarea> </label> </fieldset> <fieldset id="send"> <input type="submit" name="send" value="Send!" /> </fieldset> </form>
[+name+]<br /> [+email+]<br /> [+phone+]<br /> [+comments+]
[[eForm? &formid=`contactForm` &to=`[email protected]` &gotoid=`1` &tpl=`contactForm` &report=`contactReport` &format=`name:Name:string:1,email:Email:email:1,phone:Phone:string:0,comments:Comments:string:0` ]]
<input type="hidden" name="formid" value="contact" />
<input type="hidden" name="formid" value="contactForm" />
Fixed that. Still doesn’t work. In fact, I’ve got it set to go to the home page (id 1) after sending and it doesn’t. It just re-displays the form with all fields blank.
This discussion is closed to further replies. Keep calm and carry on.