ReadOnly Picklist Radio Buttons can still be changed on UI side

  • 1
  • Problem
  • Updated 4 years ago
I am having an issue with my picklist fields that I use as radiobuttons. When the field is in read-only mode they radio buttons can still be toggled/changed on the UI side which doesn't harm anything but the user might think they are editing and cause confusion.

Is there a way to keep these locked so while in readonly mode the user cannot move the selected radio?

Photo of Jarrod Hinson

Jarrod Hinson

  • 2,310 Points 2k badge 2x thumb

Posted 4 years ago

  • 1
Photo of J.

J., Official Rep

  • 7,470 Points 5k badge 2x thumb
Jarrod,

This is bug in Skuid. I've already got it fixed in our dev org, and it should go out with our next patch release. Thanks for catching this for us and reporting it here on the community!
Photo of Jarrod Hinson

Jarrod Hinson

  • 2,310 Points 2k badge 2x thumb
Nice! just curious, is this a CSS thing?
Photo of J.

J., Official Rep

  • 7,470 Points 5k badge 2x thumb
It's actually a JavaScript issue. It shouldn't be too long before that patch is available, but if you want a workaround in the meantime, try something like the following field renderer snippet on that Picklist field:
var field = arguments[0],
value = arguments[1];

field.options.type = 'RADIO_BUTTONS';
field.mode = field.mode === 'readonly' ? 'read' : field.mode;

skuid.ui.fieldRenderers.PICKLIST[field.mode](field,value);
Does that help?
Photo of Jarrod Hinson

Jarrod Hinson

  • 2,310 Points 2k badge 2x thumb
More than helps! Thank you.