Hey, updated functions.php to remove the “required field” reference, but when I do I get the following warning above the header of the site.
I know I can suppress warnings from displaying on the site by added another customization to the functions.php file but wanted to know if there is a better/more current way to add the gravity forms modification.
How should the “constant” in the warning below be defined specifically?
Using this customization:
add_filter( ‘gform_required_legend’, ‘__return_empty_string’ );
Getting this warning: Warning: Use of undefined constant ‘gform_required_legend’ - assumed ‘‘gform_required_legend’’ (this will throw an Error in a future version of PHP) in /home/customer/www/abc.com/public_html/wp-content/themes/themeeabc/functions.php on line 139
Sorry which code are you referring to as “this”? Are you indicating something additional?
I added the standard line: add_filter( ‘gform_required_legend’, ‘__return_empty_string’ ); to the functions.php file
and get the warnings on the site once it is saved. Trying to find out if there is an updated version of the add_filter I should use instead so I don’t get the warnings.
If you are getting a warning about an “undefined constant,” chances are the code was added incorrectly, or there is some other syntax error in the code. Can you please post your functions.php file somewhere in its entirety (GitHub, codeshare, pastebin, etc.) and post the link here? We can see what’s happening. Thank you