form recaptcha & filling the blanks are not working

All WYSIWYG Web Builder support issues that are not covered in the forums below.
Forum rules
IMPORTANT NOTE!!

DO YOU HAVE A QUESTION OR PROBLEM AND WANT QUICK HELP?
THEN PLEASE SHARE A "DEMO" PROJECT.



PLEASE READ THE FORUM RULES BEFORE YOU POST:
http://www.wysiwygwebbuilder.com/forum/viewtopic.php?f=12&t=1901

MUST READ:
http://www.wysiwygwebbuilder.com/getting_started.html
WYSIWYG Web Builder FAQ
Post Reply
herneise
 
 
Posts: 4
Joined: Sun Aug 28, 2022 6:14 am

form recaptcha & filling the blanks are not working

Post 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
User avatar
Pablo
 
Posts: 23596
Joined: Sun Mar 28, 2004 12:00 pm
Location: Europe
Contact:

Re: form recaptcha & filling the blanks are not working

Post 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
herneise
 
 
Posts: 4
Joined: Sun Aug 28, 2022 6:14 am

Re: form recaptcha & filling the blanks are not working

Post 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
User avatar
Pablo
 
Posts: 23596
Joined: Sun Mar 28, 2004 12:00 pm
Location: Europe
Contact:

Re: form recaptcha & filling the blanks are not working

Post 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.

Image
herneise
 
 
Posts: 4
Joined: Sun Aug 28, 2022 6:14 am

Re: form recaptcha & filling the blanks are not working

Post 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.
User avatar
Pablo
 
Posts: 23596
Joined: Sun Mar 28, 2004 12:00 pm
Location: Europe
Contact:

Re: form recaptcha & filling the blanks are not working

Post by Pablo »

Maybe the specified keys are invalid?
or maybe you did not publish all files?
herneise
 
 
Posts: 4
Joined: Sun Aug 28, 2022 6:14 am

Re: form recaptcha & filling the blanks are not working

Post 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
User avatar
misterjones
 
 
Posts: 17
Joined: Sat Aug 09, 2008 11:50 am
Location: South Africa
Contact:

Re: form recaptcha & filling the blanks are not working

Post 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.
Interon for best web design services in South Africa http://www.interon.co.za
"For turnkey web solutions"
User avatar
jerryco
 
 
Posts: 916
Joined: Fri Mar 27, 2009 2:42 pm
Location: Purmerend, Holland

Re: form recaptcha & filling the blanks are not working

Post by jerryco »

This is looking at the solution elsewhere, but did you try giving the e-mail a subject without Uppercase characters?
// Love is the acceptance of nothing / Account age is no guarantee of efficiency ;-) ->

Above, Beyond, and @wwonderfull! <- Genuinely helps you with a powered up site that counts! Four Times Excellence!
User avatar
misterjones
 
 
Posts: 17
Joined: Sat Aug 09, 2008 11:50 am
Location: South Africa
Contact:

Re: form recaptcha & filling the blanks are not working

Post 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. :?
Interon for best web design services in South Africa http://www.interon.co.za
"For turnkey web solutions"
User avatar
jerryco
 
 
Posts: 916
Joined: Fri Mar 27, 2009 2:42 pm
Location: Purmerend, Holland

Re: form recaptcha & filling the blanks are not working

Post 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.
// Love is the acceptance of nothing / Account age is no guarantee of efficiency ;-) ->

Above, Beyond, and @wwonderfull! <- Genuinely helps you with a powered up site that counts! Four Times Excellence!
User avatar
Pablo
 
Posts: 23596
Joined: Sun Mar 28, 2004 12:00 pm
Location: Europe
Contact:

Re: form recaptcha & filling the blanks are not working

Post 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.
User avatar
misterjones
 
 
Posts: 17
Joined: Sat Aug 09, 2008 11:50 am
Location: South Africa
Contact:

Re: form recaptcha & filling the blanks are not working

Post 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?
Interon for best web design services in South Africa http://www.interon.co.za
"For turnkey web solutions"
User avatar
Pablo
 
Posts: 23596
Joined: Sun Mar 28, 2004 12:00 pm
Location: Europe
Contact:

Re: form recaptcha & filling the blanks are not working

Post 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?
User avatar
misterjones
 
 
Posts: 17
Joined: Sat Aug 09, 2008 11:50 am
Location: South Africa
Contact:

Re: form recaptcha & filling the blanks are not working

Post 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;
}
}
?>
Interon for best web design services in South Africa http://www.interon.co.za
"For turnkey web solutions"
User avatar
Pablo
 
Posts: 23596
Joined: Sun Mar 28, 2004 12:00 pm
Location: Europe
Contact:

Re: form recaptcha & filling the blanks are not working

Post by Pablo »

What is wrong with this code?
It works for all other users.
Post Reply