Zum Inhalt springen
Menü
Sie müssen registriert sein, um mit der Community zu interagieren.
Diese Frage wurde gekennzeichnet
1 Antworten
3608 Ansichten

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
Verwerfen
Beste Antwort

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
Verwerfen
Verknüpfte Beiträge Antworten Ansichten Aktivität
3
Dez. 19
10922
0
Mai 22
3671
4
Juni 21
7482
1
Juni 17
11389
3
März 15
9171