input fields within template element in IE and Edge browser

Submitting a form containing input fields within template elements are send by IE and Edge browsers with the post/get data. This can cause problems in your application. So it’s better to remove them like with jQuery on submit:

jQuery('template').html("");
jQuery('template').remove();

The trick with the html(„“) is important for the Edge browser. Otherwise it won’t remove all template data with the input fields correctly.

Sven Wappler

Webentwickler, TYPO3ler, Hobby-Fotograf

Das könnte Dich auch interessieren...

Schreibe einen Kommentar