When using Chronoforms to sign up for an event, is it possible to inform the user that they have already registered - by checking if the email address is already in the database?
(Ideally, by checking their email address against a specific year and not allowing them to submit the form.)
Thanks.π
(Ideally, by checking their email address against a specific year and not allowing them to submit the form.)
Thanks.π
Hello driv,
I'm not a Chrono professional, but after checking your new post, I think that the following links may help:
How can I add a User to a User Group?
How can I ask new users for information and not ask logged in users?
Is there a list of known bugs?
This form component rocks and is rock solid
Some email data is missing
P.S: I'm just an automated serviceπ
I'm not a Chrono professional, but after checking your new post, I think that the following links may help:
How can I add a User to a User Group?
How can I ask new users for information and not ask logged in users?
Is there a list of known bugs?
This form component rocks and is rock solid
Some email data is missing
P.S: I'm just an automated serviceπ
By the way... The user would not be a member (or logged into) the Joomla site if that's relevant.
Hi driv,
Yes, use an Event Switcher action in the On Submit event to run a query to check your database records. Have one event set called say 'already_registered' and set a message and Show Stopper action in that. The code will be something like this
Bob
Yes, use an Event Switcher action in the On Submit event to run a query to check your database records. Have one event set called say 'already_registered' and set a message and Show Stopper action in that. The code will be something like this
<?php
$db =& JFactory::getDBO();
$year = date('Y');
$query = "
SELECT COUNT(*)
FROM `#__some_table`
WHERE `email` = '{$form->data['email']}' && `year` = '{$year}';
";
$db->setQuery($query);
$count = $db->loadResult();
if ( $count > 0 ) {
return 'already_registered';
}
?>
Bob
Hi Bob,
Good to know that this can be done.π I've been experimenting today, but no luck so far.
I'm still quite inexperienced with Chronoforms, so I was wondering if this is how you envisaged things being done.
(Please see image.)
Looking at the php code, I'm thinking that the display message and show stopper should be in the 'on success' area.
Also,
Should #__Delegates be renamed completely with my table prefix (or does Chronoforms 'know' the prefix)?
Thanks,
d.
Good to know that this can be done.π I've been experimenting today, but no luck so far.
I'm still quite inexperienced with Chronoforms, so I was wondering if this is how you envisaged things being done.
(Please see image.)
Looking at the php code, I'm thinking that the display message and show stopper should be in the 'on success' area.
Also,
Should #__Delegates be renamed completely with my table prefix (or does Chronoforms 'know' the prefix)?
Thanks,
d.
Hi driv,
Your Event Switcher still has success & fail as the events, I suggest that you replace those with the single already_registered event (simply because that makes the function clearer).
Joomla! will replace #__ with the default table prefix for your site.
Bob
Your Event Switcher still has success & fail as the events, I suggest that you replace those with the single already_registered event (simply because that makes the function clearer).
Joomla! will replace #__ with the default table prefix for your site.
Bob
That was it Bob! Thanks very much.π
Is it possible to include any of these dbase details (e.g. name, email) in the 'Display Message' action?
Is it possible to include any of these dbase details (e.g. name, email) in the 'Display Message' action?
Hi driv,
You can add anything from the $form->data array into the Display Message action as e.g. {email} or {first_name}
Note: the Display Message action doesn't support PHP - if you need that for some reason use a Custom Code action instead.
Bob
You can add anything from the $form->data array into the Display Message action as e.g. {email} or {first_name}
Note: the Display Message action doesn't support PHP - if you need that for some reason use a Custom Code action instead.
Bob
You can add anything from the $form->data array into the Display Message action as e.g. {email}
I wasn't aware of that, great news!
Note: the Display Message action doesn't support PHP - if you need that for some reason use a Custom Code action instead.
Also good to know. It seems you can do virtually everthing with Chronoforms.π
Thanks again Bob!
This topic is locked and no more replies can be posted.
