Passa al contenuto
Menu
È necessario essere registrati per interagire con la community.
La domanda è stata contrassegnata
1 Rispondi
3626 Visualizzazioni

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
Abbandona
Risposta migliore

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
Abbandona
Post correlati Risposte Visualizzazioni Attività
3
dic 19
10938
0
mag 22
3676
4
giu 21
7495
1
giu 17
11413
3
mar 15
9199