Open engin-can opened 5 years ago
The form should still submit if you put content within the editor. The 'required' causes html5 validation which prevents submitting the form when it's blank. However, the browser is supposed to highlight the field, but it can't because it's hidden.
Here's a workaround:
from froala_editor.widgets import FroalaEditor as OriginalFroalaEditor
class FroalaEditor(OriginalFroalaEditor):
def use_required_attribute(self, initial):
# textarea is hidden so HTML5 validation won't work properly
return False
I have a problem where I can't submit my form because my description
textarea
isrequired
buthidden
in myform
. Any idea how I can solve this? I have no idea wherestyle="display:none;"
is coming from. Any idea?