Forums

Data being written before verification

zhiler 24 Jan, 2011
Hello,

I'm new to Chronoforms, but so far I've been able to figure everything out, except for this one issue. I am using Chronoforms and ChronoConnectivity to create a petition that also shows the signatures submitted on a separate page. I'm also using the Email Verification plugin, but the issue is that the form writes the data to the table and is visible before the user clicks on the vlink in their email. Is there something I'm doing wrong here? I can provide full form details if necessary. I also have this code at the end of the form, and when turned ON, gives an error but the data is still submitted. It is currently turned off. I found this code on the Chronoforms forum. It works without Email Verification, but gives an 'unexpected T_STRING' error on line 258 of chronocontact.php.


<?php
$checkmail = JRequest::getString('email', '', 'post');
$db =& JFactory::getDBO();
$query = "
    SELECT COUNT(`email`)
        FROM `#__chronoforms_petition`
        WHERE `email` = '$checkmail' ;
";
$db->setQuery($query);
$count = $db->loadResult();
if ( $count ) {
    return 'We're sorry, but you've already signed the petition using that email address.  If you believe this is an error, please contact us immediately.';
}
?>
Max_admin 26 Jan, 2011
Hi zhiler,

you may add some field in the database where the "email verification" plugin writes 1 or 0 to check if the record has been verified or not, you will need to write this piece of code and include it in the plugin OR use V4 because this is already implemented there, but if you used V4 then you can use it for the frontend work ONLY, you may continue using the V3.2 for the Connectivity admin pages though.

Regards,
Max
Max
ChronoForms developer...
Did you try ChronoMyAdmin for managing your Joomla database tables ?
zhiler 26 Jan, 2011
I had already added the verified field, and it defaulted to 0. The vlink would get generated upon submission via the Email Verification plugin, and when clicked, would change that field from 0 to 1, but ChronoConnectivity is still displaying the data before the field is changed from 0 to 1. I've looked over my settings and everything is working except for this. Is there some sort of code that I'm missing for this to work? Also, you mentioned using V4, I am currently using V3.2. Will V4 display form results like ChronoConnectivity does? I'm trying to make a petition where the form submissions are verified through email so that they are legit. Let me know if there is anymore information I can provide and thank you for responding.
Max_admin 27 Jan, 2011
In Connectivity's WHERE box you will need to add a condition WHERE say "verify='1'", so that only records with verify = 1 will be loaded, did you add this ?
Max
ChronoForms developer...
Did you try ChronoMyAdmin for managing your Joomla database tables ?
This topic is locked and no more replies can be posted.