Closed tisdall closed 8 years ago
False
as a template variable was added in 1.5, though, so maybe 0
instead.
For the moment you can disable HTML5 validation on the form with <form ... novalidate>
.
Or you can use the current master, I just pushed a commit including the required=0
as you suggested. :)
Thanks for the report!
In a form with a PointField widget (it probably does the same for any map widget) the UI in Chrome is less than ideal. The issue is that all the data is encoded and placed in a hidden
textarea
that's marked asrequired
(the html5 attribute). If a person leaves the field empty and hits "Submit" then you get an error message in the console saying "An invalid form control with name='loc' is not focusable." (where 'loc' is the name of the textarea) and the form simply doesn't submit. This should probably be changed sorequired
is left off of the hidden textarea regardless and the missing data is caught afterwards in Django validation.This seems to be easily fixed by changing:
{% include "floppyforms/textarea.html" %}
to:{% include "floppyforms/textarea.html" with required=False %}
in theopenlayers.html
file.