Barcellos
Ana Barcellos
I'm having problems to lock dropdown, cascading dropdown and radiobutton elements.
When I set a radiobutton true, the dropdown element should change to readonly state but it keeps on edit mode.
It works when the plugin is "field".
It works when I use "disabled" instead "readonly" but it's not usefull for me because it saves the data as null.
I'd really appreciate if someone could help me to solve this problem because it's a production site and I need to fix it as soon as possible. I'm struggling for more than a week.
When I set a radiobutton true, the dropdown element should change to readonly state but it keeps on edit mode.
It works when the plugin is "field".
It works when I use "disabled" instead "readonly" but it's not usefull for me because it saves the data as null.
I'd really appreciate if someone could help me to solve this problem because it's a production site and I need to fix it as soon as possible. I'm struggling for more than a week.
Code:
if ($$('#tablename___radiobuttonelement input[name=tablename___radiobuttonelement[]]:checked').get('value') == 'true') {
$$('#tablename___dropdownelement_1').set('readonly', true);
$$('#tablename___cascadingdropingdownelement_2').set('readonly', true);
}
else {
$$('#tablename___dropdownelement_1').set('readonly', false);
$$('#tablename___cascadingdropingdownelement_2').set('readonly', false);
}