I would recommend to use mobile detect php library as it works on cloudfront, I found this works better than the standard wordpress functions for checking mobile/tablet, it is well document and has additional features. Just follow the instructions and use within your php code:
http://mobiledetect.net/
There is a a WordPress plugin for this as well, but it hasn’t been updated in two years:
https://ww.wp.xz.cn/plugins/wp-mobile-detect/
Hope this helps.
-
This reply was modified 8 years, 11 months ago by simonalwild.
For now I have done this hack:
jQuery(document).ready(function(){
jQuery("#gform_submit_button_15").click(function(){
localStorage.setItem('popup_submitted', true);
});
if(localStorage.getItem('popup_submitted') !== null) {
if(jQuery( "#gform_confirmation_message_15" ).length){
// on confirmation page.
} else {
jQuery("#ppsPopupBgOverlay").addClass('hidden');
jQuery(".ppsPopupListsShell").addClass('hidden');
}
}
});