Skip to Content
Menu
Musisz się zarejestrować, aby móc wchodzić w interakcje z tą społecznością.
To pytanie dostało ostrzeżenie
1 Odpowiedz
3319 Widoki

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?

Awatar
Odrzuć
Najlepsza odpowiedź

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

Awatar
Odrzuć
Powiązane posty Odpowiedzi Widoki Czynność
3
gru 19
10473
0
maj 22
3312
4
cze 21
7095
1
cze 17
10884
3
mar 15
8709