Přejít na obsah
Menu
You need to be registered to interact with the community.
This question has been flagged
1 Odpovědět
3323 Zobrazení

I have a field that is defined as:-

request_text = fields.Html('Incident Description', required=True)

and in the xml:-

<field name="request_text" widget="html" />​

But somehow the field is not mandatory in the form.

How do I make sure that the field is made mandatory and it is highlighted as mandatory in the form and the form shows validation error when it is submitted without filling this field?

Avatar
Zrušit
Nejlepší odpověď

Hi,

For the latest version the required attribute will work for html fields. So either in python side or in the xml side, you can set the required=True for the field.


Thanks

Avatar
Zrušit
Related Posts Odpovědi Zobrazení Aktivita
3
pro 19
10476
0
kvě 22
3322
4
čvn 21
7096
1
čvn 17
10887
3
bře 15
8711