I am using this code to launch a popup form for people to contact us
<a id="pinfo" class="ajax pullup cboxElement" href="#contact-form">
However this popup form doesn't behave nicely on mobile browsers.
I was wondering if I could use some PHP code to detect mobile browsers and point to an e-mail address link instead of the popup form.
There is no PHP to accurately detect mobile browsers because the PHP runs on the server before anything is even sent to the device.
Take a look at this: https://deviceatlas.com/
I have used this in the past with great success. It works pretty well.
Else you could write you own one in PHP that checks the user-agent header to decide based on that
This topic is now closed. New replies are no longer allowed.