Javascript problem with radiobutton element as Button Group

Hi all,

I have a radio button with 3 options and need to hide/disable them based on what value is in the field. The visual appearance of the Button Group suites our needs much better than the old fashion radio controls. But this seems to pose a problem with javascript. If I add:

alert("Changing radio button");

for the "change" event it fires fine when "Button Group" is set to NO. But when "Button Group" is set to YES, nothing happens at all. Same with onload - sometimes it fires but most of the time it does not. If I use the OnLoad event, it fires every time when the page is loaded if "Button Group" is set to NO. If it's set to "YES" it only fires once in a while.

I found an old thread on github and here with the same problem: https://github.com/Fabrik/fabrik/issues/1553 and http://fabrikar.com/forums/index.php?threads/radio-buttons-and-ie8.42230/#post-213711

I'm using Google Chrome, so IE is not the culprit!

Any ideas on how to make this work?

Best regards,
Arnor Baldvinsson
Icetips Alta LLC
 
Just FYI, the problem with button groups is Bootstrap itself, which doesn't correctly relay change events through it's button overlays.

-- hugh
 
Hi Hugh,

Thanks for the information. I'm not sure if I'm barking up the wrong tree on this as I'm getting absolutely nowhere, grouped buttons or not.

Here is what I need:

Upon entering the form, I know from the data being loaded which of the 3 radio option is selected. Based on that I must remove or at least disable one or two of the three buttons. See screenshot below:

2017-03-23_11-05-19.png
In this case, when Done is checked, the "Accepted" and "Rejected" should be hidden or disabled. It should only happen when the form is loaded as the buttons should not be removed/disabled WHILE the user is on the form. I'm such a complete idiot when it comes to javascript and jquery that this is really kicking my butt!

Best regards,
 
Hi Hugh,

Thanks - we might need to do that at some point. In the mean time I solved this with the "Eval populate" option on the "Advanced" tab. Worked perfectly as I simply added the buttons I needed :)

Best regards,
Arnor
 
We are in need of some funding.
More details.

Thank you.

Members online

Back
Top