Erase placeheld fields for browsers without FormData support
-
Hi guys,
I noticed a severe bug when using CF7 with for example Internet Explorer 9 or other browsers which don’t support both HTML5 FormData and the placeholder input attribute. In the scripts.js file, in the submit callback of the form, a return statement is reached before the values of placeheld fields are set to an empty string:
$form.submit( function( event ) { if ( typeof window.FormData !== 'function' ) { return; } wpcf7.submit( $form ); event.preventDefault(); } );Also here:
wpcf7.submit = function( form ) { if ( typeof window.FormData !== 'function' ) { return; } ... $( '[placeholder].placeheld', $form ).each( function( i, n ) { $( n ).val( '' ); } ); };The [placeholder].placeheld each loop should be executed before the return statement of window.FormData not being a function, so that placeheld fields are cleared.
What are your thoughts on this?
Thanks!
// T
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
The topic ‘Erase placeheld fields for browsers without FormData support’ is closed to new replies.