Forums

Event Registration

sweet160 25 Apr, 2010
Hi,

I would like to ask if its possible to use chronoforms for this:

Users can fill the form to register for an event.
after filling the form they receive a confirmation email with link that they have to click
to verify if the mail is real.

After that they receive another mail that they can print with their name, timestamp etc.
to get their free ticket to the event.

Also it should check that the same email isnt used for multiple people...

Is this possible?

Thanks!
GreyHead 25 Apr, 2010
Hi sweet 160,

Yes, it's possible. I'd probably use two forms for the two stages.

Bob
sweet160 25 Apr, 2010
Hi Greyhead,

That's a good idea to work with two forms.

The only thing that I don't understand is how we can avoid repeated registration
with the same email address..?

thanks,
sweet160
GreyHead 25 Apr, 2010
Hi sweet160,

Use serverside validation to check if the email address is already in the database. I think that there has been a thread about this very recently.

Bob
sweet160 25 Apr, 2010
thank you very much Greyhead!
sweet160 25 Apr, 2010
Hi,

I have the emails saved in the database

and activated the validation to see is the email already exists,
but I get an error....

THis is the code in the validation:

<?php
$db =& JFactory::getDBO();
$email = JRequest::getString('email', '', 'post);
$query = "
  SELECT COUNT(*) FROM `jos_chronoforms_Registrar_paso_1` WHERE `email` = '$email';
";
$db->setQuery($query);
if ( $db->LoadResult ) {
  return "Email already in use";
}
?>


with jos_chronoforms_Registrar_paso_1 being my connected table to search.

but I get this error...

Parse error: syntax error, unexpected T_VARIABLE in ************/components/com_chronocontact/libraries/chronoform.php(212) : eval()'d code on line 5

Am I using a wrong validation code?

thanks!
GreyHead 25 Apr, 2010
Hi sweet160,

There's a typo in thois line - needs a ' after post (I've added it here):
$email = JRequest::getString('email', '', 'post');

Bob
sweet160 25 Apr, 2010
Hi Greyhead,

The error is gone now, thank you,
but it doesn't return the message that that email address is already registered.

did I do the correct thing with that tablename there?

Thanks again...
GreyHead 26 Apr, 2010
Hi sweet160,

Sorry , that was last thing at night and I didn't look far enough. You have another little typo in this line (also corrected here)
if ( $db->loadResult() ) {


Bob

PS table name looks OK - assuming that the name is correct.
sweet160 28 Apr, 2010
thanks GreyHead!
This topic is locked and no more replies can be posted.