I was wondering if there is a way to put a “Clear Form” button on the admin forms of the apps in django?
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
In your templates directory create a folder admin, in this create a file
submit_line.html, paste this code in there (this is actually the original submit_line with the last<input...statement added:Now, while this will do what you want, the Reset Form button will appear not to be clickable in some browsers (some effect is disabled). It will however work. You can also replace the input by
<button type="reset">Reset form</button>but I find this rather ugly. Finally, you could also search the stylesheets to see which code fails (it’s something like a input[‘reset’] that’s missing somewhere). But anyway, this works, have fun with it