Forums

Thank you message shows already when i put wrong captcha

shd 07 May, 2012
Hi,

I was testing a form and saw that when I put a wrong captcha code, it is showing already the Thanks Message beneath the form! I think that is not oke. Is there a solution that it is not showing when putting a wrong captcha code?

I am using 4.0 RC3.0.

Thanks again,
Stephanie
GreyHead 12 May, 2012
Hi Stephanie,

This sounds as though the order of the actions in the On Submit event may not be quite correct. What do you have in there?

Bob
shd 14 May, 2012
Hi Bob,

I use this code in On Submit before email:
<?php
if ( isset ( $_POST['ongewenst'] ) && $_POST['ongewenst'] !== '' ) {
  echo 'U heeft een verborgen anti-spam veld ingevuld waardoor u een blanke pagina heeft geactiveerd. Vul het formulier nogmaals in zonder dit veld in te vullen. ';
  exit;
}
?>



Regards Stephanie
GreyHead 15 May, 2012
Hi Stephanie,

Here's a slightly modified version of your code, please add this to a ServerSide Validation action with an Event Loop action in the On Fail event.
<?php
if ( isset( $form->data['ongewenst'] ) && $form->data['ongewenst'] !== '' ) {
  $form->validation_errors[] = 'U heeft een verborgen anti-spam veld ingevuld waardoor u een blanke pagina heeft geactiveerd. Vul het formulier nogmaals in zonder dit veld in te vullen.';
  return false;
}
?>


Bob
shd 16 May, 2012
Hi Bob,

I did what you asked and the thank you message is still showing when I put a wrong captcha code.

Regards,
Stephanie
GreyHead 16 May, 2012
Hi Stephanie,

Please take a Form Backup using the icon in the Forms Manager and post it here (as a zipped file) or PM or email it to me and I'll take a closer look.

Bob
GreyHead 21 May, 2012
Hi Stephanie,

In the Event Loop that you have in the Check Captcha action 'Quit next actions' is set to 'No' . . . so ChronoForms continues with the remaining On Submit actions. Please change this back to the default 'Yes' setting.

Bob
shd 21 May, 2012
:D 😀 😀
Tnx, so simple sorry, I was a little bit blond!😶 😶 😶 😶

regards,
Stephanie
This topic is locked and no more replies can be posted.