Chronoforms v5 how to pass the captcha code through into an email

ftpaul 11 Apr, 2016
I was able to accomplish this in v4 but it seems that I can't replicate the same behavior in v5.

I want to be able to pass the captcha code into the email that's generated from the load captcha event. I have the captcha code working properly since when I use the debugger I get an error if the captcha is entered incorrectly. But my main problem is that it doesn't look like the captcha code shows up in the data array and even though I have the correct field name in my email template, it does not pass that captcha code value into the email.

Is there any way to get the captcha code value to get passed along from the data array and into the generated email?
GreyHead 11 Apr, 2016
1 Likes
Hi ftpaul,

If you are using the ChronoForms captcha that is certainly submitted. It may be that the Check Captcha action deletes it. if so, you could make a copy in a Custom Code action before the Check Captcha action and use that in the Email.

Bob
ftpaul 11 Apr, 2016
Not exactly sure how I would use the custom code action to grab the captcha code value before the check captcha action is initiated.
GreyHead 11 Apr, 2016
1 Likes
Hi ftpaul,

Add a debugger in that position to check the name of the value in the submitted data, then use a line of PHP to copy it.
<?php
$form->data['bbb'] = $form->data['aaa'];
?>
replace aaa with the name if the value, and bbb with the name you want to use.

Bob
ftpaul 11 Apr, 2016
That seems to have done the trick. Thank you very much for your help!😀
This topic is locked and no more replies can be posted.