Ive gone through examples of using &eFormOnBeforeFormParse and I think
tm I understand it.
But Im still getting an error with an undefined function. Heres what Ive done.
In my document for displaying a form I have:
[[eFormEvents]]
[!eForm? &formid=`RegisterForm` &subject=`[+subject+]` &to=`[email protected]` &tpl=`RegisterForm` &noemail=`1` &eFormOnBeforeFormParse='testtest' &thankyou=`RegisterFormReport`!]
I have created a snippet called "eFormEvents" with the content:
<?php
//functions for eForm events
function testtest(&$fields, &$templates) {
return true;
}
?>
(keeping it simple to start with...)
And then I have my chunk called "RegisterForm" which, when I remove the "&eFormOnBeforeFormParse=’testtest’" from the eForm snippet call, works fine.
But with the &eFormOnBeforeFormParse=’testtest’ in there I get the dreaded
Fatal error: Call to undefined function ’testtest’ () in /home/mysite/htdocs/assets/snippets/eform/eform.inc.php on line 138
As far as I can see Ive got everything in there, thanks to the help Ive already received from the forum and the documentation. Ive got the snippet call in the document to the snippet with the testtest function, and then Ive got the snippet call to the eForm wich asks for the testtest function...
What am I missing?