Overslaan naar inhoud
Menu
Je moet geregistreerd zijn om te kunnen communiceren met de community.
Deze vraag is gerapporteerd
1 Beantwoorden
3303 Weergaven

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
Annuleer
Beste antwoord

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
Annuleer
Gerelateerde posts Antwoorden Weergaven Activiteit
3
dec. 19
10463
0
mei 22
3301
4
jun. 21
7093
1
jun. 17
10882
3
mrt. 15
8708