Due to a type in the call to eForm, the function was not called.
This is solved, but now I am getting an even stranger problem.
I have simplified the routine as much as possible:
(And I have left the original function names in the example, only taking out customer name and email address)
The contents of the page:
[[aanmeld_OnBeforeMailSent]]
{{aanmelden}}
The Call to eForm which is in a chunk called ’aanmelden’
[!eForm? &formid=`aanmeldForm` &to=`[email protected]` &tpl=`aanmeld_Formulier` &report=`aanmeld_Report` &thankyou=`aanmeld_Thanks` &vericode=`1` &subject=`Aanmeldformulier` &language=`nederlands` &eFormOnBeforeMailSent=`xxyy` !]
The content of the snippet called ’aanmeld_OnBeforeMailSent’
<?php
function xxyy(&$fields) {
$fields['ip'] = "22";
return true;
}
if (function_exists(xxyy)) {
print "<!-- DBG, function found. -->\n";
} else {
print "<!-- DBG, function NOT found -->\n";
}
?>
The content of chunk ’aanmeld_Report’:
<ul>
<li>Naam = [+naam+]</li>
<li>Telefoonnummer = [+mobilenumber+]</li>
<li>IP adres = [+ip+]</li>
</ul>
Calling the page, then filling in the two fields and klicking the Submit button gives the following error:
Fatal error: Call to undefined function xxyy() in /home/p6900/domains/serramobile.com/public_html/assets/snippets/eform/eform.inc.php on line 378
This looks like eForm cannot find the function. But I have proof that the function is there since the HTML-code show the Debug message "function found".
Any help is appreciated.
Thanks,
Bert