Skip to Content
Menu
This question has been flagged
1 Odpoveď
2919 Zobrazenia

I have a selection field as follows:


source = fields.Selection([
('one', 'First'),
('two', 'Second'),
('three', 'Third'),
('four', 'Fourth'),
('five', 'Fifth'),
], required=True, default='one')


How can I show but inactive some of these options?


at the moment these options are all visible and selectable but I want some to be visible but inactive so not being selectable.

Avatar
Zrušiť
Best Answer

Hello 

you can not inactive but based on your condition you can add and remove using fields_view_get method

Avatar
Zrušiť
Related Posts Replies Zobrazenia Aktivita
2
aug 17
7345
1
sep 23
4229
1
sep 23
3088
2
jún 18
5200
2
jún 23
5297