Skip to content

Instantly share code, notes, and snippets.

@pingram3541
Created August 3, 2020 21:51
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save pingram3541/0fcd54f4c1e8baaefbe94b2eb1949648 to your computer and use it in GitHub Desktop.
Save pingram3541/0fcd54f4c1e8baaefbe94b2eb1949648 to your computer and use it in GitHub Desktop.
Strips html "name" attribute from Elementor Form's rendered html - All Forms
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