Check radio button problem
Original Post by CHO (Imported from Ardevia Forum)
Good day,
I have a simple problem with automatic checking radio buttons:
I made a example list to show the problem:
The DropDown field got values of "1" and "2", radio button fields are "ab" and "cd" as you can see. I need to get the radio buttons automatically checked when choosing the dropdown, example:
when choose dropdown "1" check radio "ab", when dropdown "2" check radio "cd".
I solved this problem with a simple function code and returning "ab" or "cd".
But I need to have it solved without the values "ab" and "cd", I need to check them for example with (check radio button 1, or check radio button 2).
I tried it with this line:
jQuery('span[fieldname=DropDown] input[type=radio]')[0(or 1)].checked = true;
This code works ONLY when i use the "Test" button in the expression builder, and it works only ONCE. I need it to work in the new form and always while I'm changing other values.
Its because in my case i have 60 radio button fields, and its unnecessary to make the formula for every value.
Thanks in advance!
-
Original Post by Vitaliy Zadorozhnyy (Imported from Ardevia Forum)
Hello,
Try to use [[DropDown]] field placeholder in initial/calculated expression to trigger evaluation of expressions on the drop down change.
No logic actually is required in expressions behind [[DropDown]] placeholder.
For example it can be: var a = ?[[DropDown]];
only place in expressions where it is used.0
Please sign in to leave a comment.
Comments
1 comment