Access count of selected multipicklist entries?

  • 1
  • Question
  • Updated 3 years ago
Is there a way to show the count of items selected in a multipicklist rendered as checkboxes?

The standard renderer does this for you when you've selected 4 or more. How can I access that value?
Photo of Matt Sones

Matt Sones, Champion

  • 31,478 Points 20k badge 2x thumb

Posted 3 years ago

  • 1
Photo of Matt Sones

Matt Sones, Champion

  • 31,478 Points 20k badge 2x thumb
Let me know if there's a better way.

I'm running this field renderer:

var field = arguments[0],
    value = skuid.utils.decodeHTML(arguments[1]),
$ = skuid.$,
count = 0;
if (value){
    var countarray = value.split(';');
    count = countarray.length;
}
skuid.ui.fieldRenderers.DOUBLE[field.mode](field,count);