Fixes #6769 : remove form element should remove the inputFilter

Fixes #6769 
this is the reason why code is copy-ed.