On line 1287 (version 1.5.12 of the plugin), change:
die("EndSelectForm('" . str_replace("'", "\'", str_replace(")", "\)", $str)) . "', " . GFCommon::json_encode($form) . ");");
to:
die("EndSelectForm('" . preg_replace('/\s+/', ' ', trim(str_replace("'", "\'", str_replace(")", "\)", $str))) . "', " . GFCommon::json_encode($form) . ");");
$str
had a couple line breaks in it and it wasn’t playing friendly with things.
Once that’s working, you’ll probably see a couple buttons that are typically hidden (or styled differently). I changed the following on line 98:
wp_enqueue_style("gforms_css", GFCommon::get_base_url() . "/css/forms.css", null, GFCommon::$version);
to:
wp_enqueue_style("gforms_css", GFCommon::get_base_url() . "/css/admin.css", null, GFCommon::$version);
and that seemed to help.
This certainly wasn’t an exhaustive code review – just a couple quick updates to get me up and running.
-
This reply was modified 2 years, 12 months ago by mfostn.