Skip to Content
Meniu
Trebuie să fiți înregistrat pentru a interacționa cu comunitatea.
Această întrebare a fost marcată
1 Răspunde
3317 Vizualizări

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?

Imagine profil
Abandonează
Cel mai bun răspuns

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

Imagine profil
Abandonează
Related Posts Răspunsuri Vizualizări Activitate
3
dec. 19
10469
0
mai 22
3310
4
iun. 21
7094
1
iun. 17
10884
3
mar. 15
8709