Hi Bob,
I have put the following code in the tab Others/Custom PHP code/Before emails code
However, it does not work and I can keep sending out the completed form with the same input
Pls advise
Rgds
K
I have put the following code in the tab Others/Custom PHP code/Before emails code
<?php
$naam = JRequest::getString('naam', '', 'post');
$email1 = JRequest::getString('email1', '', 'post');
if ( $naam && $email1) {
$db =& JFactory::getDBO();
$query = "
SELECT COUNT(*)
FROM `vs2cm_chronoforms_data_xxxx`
WHERE `naam` = '{$naam}'
AND `email1` = '{$email1}';
";
$db->setQuery($query);
$count = $db->loadResult();
if ( $count > 0 ) {
$form->validation_errors[''] = "U heeft dit formulier reeds ingevuld!";
return false;
}}
?>
However, it does not work and I can keep sending out the completed form with the same input
Pls advise
Rgds
K