Page 1 of 1
form recaptcha & filling the blanks are not working
Posted: Sun Aug 28, 2022 6:39 am
by herneise
hi!
i have 2 questions;
first is, when i create the form, ( simple contact form); it is written that all fields should be filled, ( if not, the "submit" should go to error page.)
but in my case, it just send the form and goes to success page with empty form. which options should i choose?
please check video:
https://youtu.be/m_Ebg-B-mcA
second question;
when i add a recaptcha( v2 or v3), seems that recaptcha is working, but when i click "submit" it goes to error, not to success page, could you help me please? what am i missing?
( i tried all temple forms, with/without autorespond)
please check video:
https://youtu.be/9_R3dnEuat0
page is:
https://amigapple.com/test/ayri_form.php
thanks
Re: form recaptcha & filling the blanks are not working
Posted: Sun Aug 28, 2022 7:01 am
by Pablo
it is written that all fields should be filled
I do not see any form of validation on the page?
How did you implement this?
To be able to help you, I need a DEMO project (.wbs file) so I can see all your settings.
I do not need the complete project because that will only take more time to figure out what you have done.
Basically, I just need a small project with one page and object(s) that are relevant to your question.
Note that I cannot see what you have done based on the published page (HTML), because the software has thousands of options and millions of possible combinations.
So, there is no way to know which options you have used by looking at the HTML only.
For further details about how to share a project file, please see this FAQ:
https://www.wysiwygwebbuilder.com/forum ... 10&t=82134
Re: form recaptcha & filling the blanks are not working
Posted: Sun Aug 28, 2022 7:52 am
by herneise
hi!
thanks for reply

here is the project related to first question:
https://amigapple.online/nextcloud/inde ... QQQR2fcLmi
(first is, when i create the form, ( simple contact form); it is written that all fields should be filled, ( if not, the "submit" should go to error page.)
but in my case, i just click to submit the form and it goes to success page with empty form.( it should go to error page,right??)
which options should i missed?)
please check video:
https://youtu.be/m_Ebg-B-mcA
here is the project related to second-recaptcha question:
( i removed the google keys from recaptcha(should i leave?)
https://amigapple.online/nextcloud/inde ... H2KZkfyx5g
(when i add a recaptcha( v2 or v3), seems that recaptcha is working, but when i click "submit" it goes to error, not to success page, could you help me please? what am i missing?
( i tried all templete forms, with/without autorespond)
please check video:
https://youtu.be/9_R3dnEuat0
Re: form recaptcha & filling the blanks are not working
Posted: Sun Aug 28, 2022 9:28 am
by Pablo
As far as I can tell, there is no validation in the form. You can read more about this functionality here:
https://wysiwygwebbuilder.com/validation.html
About recaptcha:
You have used the old re-captcha extension. I recommend to use the built-in re-captcha instead.

Re: form recaptcha & filling the blanks are not working
Posted: Sun Aug 28, 2022 11:38 am
by herneise
thanks a lot. one issue( validation) resolved!
other issue still exist:
used the built-in re-captcha(v2)
when i fill all the data on the form( name surname-tel-email- message),
i click the recaptcha resolve. i resolve it. then i click the 'submit form"
after that it gives http error??
could you check please:
https://amigapple.online/nextcloud/inde ... 4zFAqqfzsF
thanks.
Re: form recaptcha & filling the blanks are not working
Posted: Sun Aug 28, 2022 1:49 pm
by Pablo
Maybe the specified keys are invalid?
or maybe you did not publish all files?
Re: form recaptcha & filling the blanks are not working
Posted: Mon Aug 29, 2022 8:51 am
by herneise
thanks for assist Pablo.
i ve tried all captchas v2-3 hcaptcha. and i am publishing via filezilla, all files.
but i found out the issue. it is because of web server.
i checked the control panel of webserver; it was enabled php.ini option.
i disabled it, then it started to work.
everything is ok now

thanks
Re: form recaptcha & filling the blanks are not working
Posted: Mon Aug 29, 2022 3:20 pm
by misterjones
I have a similar problem.
Created a form with recaptcha included and the form doesn't go through and I do not receive the mail.
If I remove the recaptcha php snippet the form works and I receive the mail, but when I add the snippet for the recaptcha it doesn't go through. My secret key and site keys are correct. I am not any good at php so I need your help please.
https://geoffsquirestattoos.co.za/test.php I have searched high and low for a solution.
On one of the posts here a guy mentions changing the PHP.ini, all I could find on google was to make sure the allow_url_fopen = On.
Re: form recaptcha & filling the blanks are not working
Posted: Mon Aug 29, 2022 3:55 pm
by jerryco
This is looking at the solution elsewhere, but did you try giving the e-mail a subject without Uppercase characters?
Re: form recaptcha & filling the blanks are not working
Posted: Mon Aug 29, 2022 4:55 pm
by misterjones
Yes. Tried that.
Please explain how that might make a difference.
I just used the default form layout, which in my opinion should work.

Re: form recaptcha & filling the blanks are not working
Posted: Mon Aug 29, 2022 4:58 pm
by jerryco
I once read that a webhost would consider Uppercased e-mails a spam threath. It's just something I thought could be an issue, but apparently it is not. Maybe a solution will come here.
Re: form recaptcha & filling the blanks are not working
Posted: Mon Aug 29, 2022 5:11 pm
by Pablo
On one of the posts here a guy mentions changing the PHP.ini, all I could find on google was to make sure the allow_url_fopen = On.
Did you enable "allow_url_fopen"? on the server.
Note that only your webhost can help you find out why the emails are not sent.
Usually (>99%), it's a server related issue.
Re: form recaptcha & filling the blanks are not working
Posted: Tue Aug 30, 2022 6:22 am
by misterjones
Thanks for this Pablo.
I have checked the allow_url_fopen and it is On "allow_url_fopen = On" from my php.ini.
My dilemma is that the form works on other sites on my server, WordPress, Umbraco and Html sites, using the recaptcha. But it's on the form created in WWB16 that doesn't work with recaptcha. Without the recaptcha snippet the form works fine. This tells me there is something wrong with the PHP snippet for the form created with WWB16. Or what else could it be?
Re: form recaptcha & filling the blanks are not working
Posted: Tue Aug 30, 2022 7:28 am
by Pablo
This tells me there is something wrong with the PHP snippet for the form created with WWB16. Or what else could it be?
If there was a problem with the generated code then other user would have the same issue. So, it's unlikely related to WWB.
What do you mean by "PHP snippet". Did you add code yourself?
Re: form recaptcha & filling the blanks are not working
Posted: Tue Aug 30, 2022 7:36 am
by misterjones
This is the snippet I am referring to:
<?php
session_start();
if ($_SERVER['REQUEST_METHOD'] == 'POST' && $_POST['formid'] == 'form1')
{
$recaptcha_valid = false;
if (isset($_POST['g-recaptcha-response']))
{
$recaptcha_secret = '6LuPATvlZcu97h4EP-GGGTTTR'; <--this is just a made up secret code, I use the correct one on the site.
$recaptcha_response = $_POST['g-recaptcha-response'];
if (function_exists('curl_exec'))
{
$ch = curl_init();
curl_setopt_array($ch, [
CURLOPT_URL => '
https://www.google.com/recaptcha/api/siteverify',
CURLOPT_POST => true,
CURLOPT_POSTFIELDS => ['secret' => $recaptcha_secret, 'response' => $recaptcha_response],
CURLOPT_RETURNTRANSFER => true ]);
$recaptcha = curl_exec($ch);
curl_close($ch);
}
else
{
$recaptcha = file_get_contents('
https://www.google.com/recaptcha/api/siteverify?secret=' . $recaptcha_secret . '&response=' . $recaptcha_response);
}
$recaptcha_result = json_decode($recaptcha);
if ($recaptcha_result->success == true)
{
$recaptcha_valid = true;
}
}
if (!$recaptcha_valid)
{
$errorcode = file_get_contents('./error.html');
$errorcode = str_replace('##error##', 'CAPTCHA verification failed.', $errorcode);
echo $errorcode;
exit;
}
}
?>
Re: form recaptcha & filling the blanks are not working
Posted: Tue Aug 30, 2022 9:29 am
by Pablo
What is wrong with this code?
It works for all other users.