Created
August 3, 2020 21:51
-
-
Save pingram3541/0fcd54f4c1e8baaefbe94b2eb1949648 to your computer and use it in GitHub Desktop.
Strips html "name" attribute from Elementor Form's rendered html - All Forms
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
add_action( 'elementor/widget/render_content', function( $content, $widget ) { | |
if ( 'form' === $widget->get_name() ) { | |
$content = preg_replace('/(<[^>]+) name=".*?"/i', '$1', $content); | |
} | |
return $content; | |
}, 10, 2 ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment