Перейти к содержимому
Меню
Чтобы взаимодействовать с сообществом, необходимо зарегистрироваться.
Этот вопрос был отмечен
1 Ответить
2611 Представления

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.

Аватар
Отменить
Лучший ответ

Hello 

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

Аватар
Отменить
Related Posts Ответы Просмотры Активность
2
авг. 17
7047
1
сент. 23
3903
1
сент. 23
2613
2
июн. 18
4808
2
июн. 23
4876