Label on CheckBox or RadioButton

Label on CheckBox or RadioButton

  
I believe this should be included in the next version of the platform, however, since it's so simple I didn't bother creating WOC topic with it.
A "Label" property for checkbox and radio elements. :)
That way you can set a text for the element, and use that text to check/uncheck it.

Here's how to do it with some jQuery:
"<script type=""text/JavaScript"">
osjs('#" + CheckboxId + "').after(""<label for='" + CheckboxId + "' style='margin-left: 5px; position: relative; top: 1px'>" + Label + "</label>"");
</script>"
Hope it's useful to someone else :)
Completely agreed... it would be great to have labels semantic in this way.

At the moment, on the project we're working on, we have many forms with buttons and checkboxes, and the clickable area for the buttons are tiny. Users are now used to being able to click on labels to select checkboxes - so to have this built-in as part of the platform (perhaps as a field on the element inspector) would be great. :)

Thanks Antonio for the JQuery snippet - I've adapted it to use in my own project.
António Chinita wrote:
I believe this should be included in the next version of the platform, however, since it's so simple I didn't bother creating WOC topic with it.
A "Label" property for checkbox and radio elements. :)
That way you can set a text for the element, and use that text to check/uncheck it.

Here's how to do it with some jQuery:
"<script type=""text/JavaScript"">
osjs('#" + CheckboxId + "').after(""<label for='" + CheckboxId + "' style='margin-left: 5px; position: relative; top: 1px'>" + Label + "</label>"");
</script>"
Hope it's useful to someone else :)
Hi António,

 I've got a need for just that what you described, adding a text label beside a Radio Button, and being able to click on the text as well as the radio button itself to have it selected.

Being fairly new to Outsystems, I have no clue on where to put the jQuery snippet you provided, and how to use it to get a label beside a radio button.

Could you give me a small example?

Peter