Search code examples
ajaxwordpressformsgravityforms

Ajax not working for Mobile devices


I got my form in a wordpress website: https://www.dravaliani.com/250botox/ which on desktop if you don't fill all the fields then a warning message is displayed so that user don't let them empty.

But If I see the same form but on a mobile device (a phone), if you leave the fields empty the warning message do not appear. And the same thing happens for Tablets.

The form is create with GravityForm ALTHOUGH it's not its fault because I have create another page and the form works perfectly. So I guess the ajax it's not loading on mobile devices.

any ideas?


Solution

  • it's not ajax you have duplicate form in your html output gform_fields_1 that's why you are not seeing the validation results.

    The first one form is hidden using css :

    @media screen and (max-width: 640px) .fusion-no-small-visibility 
    { display: none !important; 
    }
    

    The validation script which adding the error massage most probably using querySelector to select the form and appending the error massages, if you change above css code to display the first form you will see the validation error is already there.