D
D
Dmitry Zhukov2018-03-13 15:42:53
WordPress
Dmitry Zhukov, 2018-03-13 15:42:53

What is the reason for the "Are you sure you want to do this" error?

Problem with Gravity Form plugin.
When you go to the "Confirmations", "Notifications" form settings tabs, an error appears "Are you sure you want to do this?"
At random, I found out that it is called by the code in the functions.php file of the active theme:

if ($ipad || $iphone || $android || $palmpre || $ipod || $berry || $mobile || $symb || $operam || $htc || $fennec || $winphone || $wp7 || $wp8 === true)  {
    $_POST['device'] = 'mobile'; 
}

else { 	$_POST['device']= 'pc'; }

specifically, passing strings to the POST array (there is a check for the device type, and then connecting the necessary styles / scripts, depending on the result).

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question