Hello, I want to thank you again for such a wonderful component. I am opening another thread as adviced for detailed instructions on one the answers to of my questions you gave.
(If they are registered users then you can use an Event Switcher in the form ON Load event to check for an existing record in the database table. If one is found then show a message and use a Show Stopper action to stop processing any more - otherwise ehow the form.)
Sir, on adding the event switcher, what command would I use to search for the existing record in the database? Also, where am I putting the display message and show stopper? Is it on the on success or on fail event? And finally, would the event switcher be above or below the load honeypot?
Thanks
(If they are registered users then you can use an Event Switcher in the form ON Load event to check for an existing record in the database table. If one is found then show a message and use a Show Stopper action to stop processing any more - otherwise ehow the form.)
Sir, on adding the event switcher, what command would I use to search for the existing record in the database? Also, where am I putting the display message and show stopper? Is it on the on success or on fail event? And finally, would the event switcher be above or below the load honeypot?
Thanks
Hi dominusgai ,
Put the Event Switcher after the Captcha check; set it to have just one event 'fail' and add code something like this to check the database table
Bob
Put the Event Switcher after the Captcha check; set it to have just one event 'fail' and add code something like this to check the database table
<?php
$db =& JFactory::getDBO();
$query = "
SELECT COUNT(*)
FROM `#__table_name`
WHERE `col_name` = '{$form->data['input_name']}' ;
";
$db->setQuery($query);
$count = $db->loadResult();
If ( $count > 0 ) {
return 'fail';
}
?>
Bob
This topic is locked and no more replies can be posted.