Form problem on mobile
-
Did you have a look?
-
-
and u did a really amazing job with this website!
-
It works on desktop but not on mobile... Did you try on mobile too?
Thank you for your comment.... I really like your theme... We can do great websites.
-
I tried with and without "disable ajax / compatibility mode".
Nothing changes. 😅 -
i see.
i think the issue is the contact form plugin cant handle the same contact form being in the page twice.
because you have a custom phone layout, you basically have the code for the contact form on your page two times. one time in the phone layout code, one time in the desktop layout code.
thats my guess.
maybe you can create a new contact form and insert that one into the phone layout?
and remove the one you already have in the custom phone layout, but without removing it from the desktop layout.you could also try and disable the custom phone layout feature in lay options.
just to test for a few minutes if my assumption is right.if you'd disable the custom phone layout feature, you'd not have the code for the contact form twice, so probably it would work on mobile then too.
-
You're right, that's the problem. When i remove the phone layout, it works.
Thank you very much...is there a way to detect the device to only load the form one time?
-
with my design, it's impossible to do without the custom phone layout.
-
i dont know what javascript you used to initiate the contact form.
if you coded it yourself, you can test if the html has a class "phone-size"
and then target the contact form in the div:
#custom-phone-layout
instead, you can also test for:
window.laytheme.on('newpageshown', function(){ if( jQuery('#custom-phone-grid').is(':visible') ){ var myform = jQuery('#custom-phone-grid').find('.mycoolcontacform'); //initiate your form } })
-
if u used a plugin to create a form, you can try to create two different forms.
insert contact form 1 into desktop layout, and contact form 2 into custom phone layout
Before you post:
- When using a WordPress Cache plugin, disable it or clear your cache.
- Update Lay Theme and all Lay Theme Addons
- Disable all Plugins
- Go to Lay Options → Custom CSS & HTML, click "Turn Off All Custom Code", click "Save Changes"
This often solves issues you might run into
When you post:
- Post a link to where the problem is
- Does the problem happen on Chrome, Firefox, Safari or iPhone or Android?
- If the problem is difficult to explain, post screenshots / link to a video to explain it