Forums

event switcher causing captch to just reload

cyboman 11 Apr, 2017
HELP ME BOB! YOU'RE MY ONLY HOPE!

Please take a look at this application for employment form I'm working on.
http://logansinthecarolinas.com/newsite/index.php?option=com_chronoforms5&chronoform=Augusta203

I finally got the event switch to behave the way I want it to BUT now the captcha just keeps loading a new one on the last page. I'm using event switcher to allow the user to add another employment record to the application so if they select YES then it loads the next page and if they select NO it loads the last page.

If I remove the event switcher from the "on submit" section then captcha works fine.
here is my event switcher code:
<?php
switch ($form->data['addemployer'] ) {
  case 'page8':
  default:
    return 'page8';
    break;
  case 'page6':
    return 'page6';
    break;
  case 'page7':
    return 'page7';
    break;
}
?>

Please note: this is in early development. I have only set a few fields as required at this point so that it is easier to fill it out during testing.

thanks in advance
Eric
GreyHead 11 Apr, 2017
Hi Eric,

Why would you put the Captcha on the last page of a multi-page form? What are the chances of any spammer ever getting there to fail it?

If you use a Captcha put it on the first page and add a check in the later pages that the first page has been completed.

Bob
cyboman 12 Apr, 2017
thanks for the advice but the customer wants Captcha included in the form.
in any case when I load Captcha on the first page I am able to fill in the field and proceed thru to the last page.

but when I press the submit button on the last page nothing appears to happen.

I'm wondering if the event switcher code that is above the "on success" and "on fail" section of the "on submit" section are being prevented from executing for some reason.

i realize now that when the load captcha was on the last page that page was also just reloading after submit was pressed.

any ideas?

thanks
Eric
Max_admin 12 Apr, 2017
Hi Eric,

Could you please post a screenshot of your form setup ?

Best regards,
Max
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
GreyHead 12 Apr, 2017
Hi Eric,

If you use a capture on the first page then the check Captcha action needs to be in the Event that page submits to. Then it will work correctly.

Bob
This topic is locked and no more replies can be posted.