307
Views
7
Comments
Changing Style of a label associated with a checkbox on checking 
Question

Hi,

I have 3 checkbox and each of the checkbox have labels associated with it. Right now I want to change the style of labels when respective checkbox is clicked. For this I need to give Id of the checkbox in "for" property in extended properties of labels. But I'm unable to do so. How can we implement html <label>  in outsystems?

2018-10-09 16-01-17
Diogo Coelho

Hi, 

You don't need implement a html.

You can create OnChange action and this actions makes update one variable to change the labels style.


You can create css class and in extended property you can put "class" and the value is the name of class what you created. 

For example: If(var = true, " cssclass1 ", " cssclass2")

2024-06-19 07-19-32
JitendraYadav

Hi,


Yes on checkbox changed event u can apply specific style for particular label using one variable.


Thanks!

2024-06-19 07-19-32
JitendraYadav

Please check attached solution.

TestCheck.oap
2024-06-19 07-19-32
JitendraYadav


2024-06-19 07-19-32
JitendraYadav

Hi...Please mark this post as a solution...thanks!

UserImage.jpg
Shashankit Thakur

Hi,

I want to implement the same using CSS only. Any solution?


2018-08-26 20-34-32
Pankaj pant

Shashankit Thakur wrote:

Hi,

I want to implement the same using CSS only. Any solution?


Hi Sashankit,

Use extended property the HTML tag will render at runtime as the label,



My Regards,

Pankaj

Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.