Form Handler - Having a clear button for input file fields would be nice
We had a non-required binary field in a form, and since most of the browsers don't allow clearing the path after a file has been selected, we had to add a custom field with the script show next to make possible to the user to get rid of a previous selection without having to reload the whole form:
Our binary field was named "Binary Field", so "binaryfieldFieldInput" is the name of the input file generated by the form handler vtl.
It would be nice if such clear button was rendered by the form handler vtl for each input file type in the form structure.
This improvement was requested by HCA's QA team while testing Secure Form functionality.
Included clear button for binary,file and image fields in the submit content macro.
Files Updated
- /dotCMS/WEB-INF/velocity/static/content/binary_field_render.vtl
- /dotCMS/WEB-INF/velocity/static/content/file_field_render.vtl
- /dotCMS/WEB-INF/velocity/static/content/image_field_render.vtl
- /dotCMS/html/js/content/content_form_macro.js
- /dotCMS/html/css/content/form.css
Ozzy I merged your pull request and closed the issue
Fixed, Tested on dotCMS 2.5 // W7 // Chrome, now the button is appearing an working fine