Validate gravity form from unwanted text
Validate gravity form for unwanted words use the below code and put it at your functions.php function bld_strpos_arr($haystack, $needle) { if(!is_array($needle)) { $needle = array($needle); } foreach($needle as $what) { $pos = stripos($haystack, $what); if( $pos !== false) { return true; } } return false; } /* * Our bad words validation function */ add_filter(‘gform_validation’, …