Problem with contact form on mobile devices

Hello everyone, I hope you can help me, I'm almost desperate. My problem is the following. I created a contact form and validated it with JavaScript (client side) and with php (server side). I have also integrated a phpmailer and a success message or error message and a reCaptcha. The for,ulnar works perfectly on the desktop. It sends, it outputs the message, it redirects back to the page and then also deletes the input fields. It just doesn't do some of the things on mobile devices. It sends the message, but it doesn't update the page or return to it, nor does it give a success message, nor does it clear the fields. These errors are only resolved when I manually reload the page itself. But that shouldn't be the case. Can anyone help? I don't know exactly where the error is. If the code is needed I can send it. Hope you can help me . Thanks in advance LG Sporty One
10 Replies
reddogg476
reddogg4763mo ago
might check browser support for the event / form your using: https://github.com/kevin-powell/responsive-design-patterns --> caniuse.com ref
GitHub
GitHub - kevin-powell/responsive-design-patterns
Contribute to kevin-powell/responsive-design-patterns development by creating an account on GitHub.
SportyOne
SportyOne3mo ago
Ok thanks for the idea , I will give it a try . But if it were a browser support problem it should work on other browsers maybe . I tested Firefox app , safari app and chrome app , all the same problem
Chris Bolson
Chris Bolson3mo ago
It sounds like the PHP redirect isn't working. Presumably you are doing this with a header() redirection? Make sure that you don't have any output, albeit empty spaces, before this redirect. Have you turned on PHP error reporting to see if you are getting any PHP errors which will prevent the redirection?
SportyOne
SportyOne2mo ago
Yes correct . I do this with a header redirection . No I don’t used this option of php error reporting . Is there a better way instead of the header thing ?
Chris Bolson
Chris Bolson2mo ago
I don’t think so. Try turning on reporting to see if it gives you an error which will help you debug.
SportyOne
SportyOne2mo ago
Ok and where do turn it on ? I am using XAMPP to use php on an localhost . Or do u mean on mobile ?
Chris Bolson
Chris Bolson2mo ago
You can turn it on just for the file you are using. Add this to the beginning of the file (on a new line after the opening php tag): error_reporting(E_ALL); (assuming that this is a PHP issue this discussion should really be in the back-end channel)
SportyOne
SportyOne2mo ago
Thx I will try it I put this line on the php file , opened it on a localhost and fill out the form and send it . Where do I find the error if there is one ? On VSCode or on the console ?
Chris Bolson
Chris Bolson2mo ago
If there are any errors, you should see them on the screen when you submit the form on the mobile device
SportyOne
SportyOne2mo ago
Hey , I was such an idiot 🙈🙈. I found the problem . Completely easy . I put the noopener noreferrer infos into the form tag … I don’t now why I did this , this wasn’t even a link . Now it works perfectly fine . Thanks for ur effort .