Page 1 of 2

Make component read-only

Posted: Tue Jul 05, 2016 9:32 am
by Deon

Hi
I would like to make a component (checkbox) read-only.
Is that possible?
Thanks


Make component read-only

Posted: Tue Jul 05, 2016 10:07 am
by Serhii Kulibaba

Hello Deon,

Please add a class "ui-disabled" for that component, e.g. with JS below:
preApperyio("myCheckbox").addClass("ui-disabled");/pre
here myCheckbox - name of your checkbox component


Make component read-only

Posted: Tue Jul 05, 2016 3:37 pm
by Deon

Great. Thank you very much. Just for interest sake, can this be done in css or by setting the property on the component as well?

Thank you


Make component read-only

Posted: Wed Jul 06, 2016 8:52 am
by Serhii Kulibaba

Sure, it is possible to do. Please use CSS below for that:
pre[name=myCheckbox]{
opacity: .3;
cursor: default !important;
pointer-events: none;
}/pre


Make component read-only

Posted: Fri Jul 08, 2016 6:29 am
by Deon

Awesome, thank you!


Make component read-only

Posted: Fri Sep 09, 2016 10:44 am
by Deon

Hi

I added
Apperyio("mySlider").addClass("ui-disabled"); to the Show Page Eventto make my slider read Only, but it is not working. Is their a different syntax that needs to be used to do this?

Thanks


Make component read-only

Posted: Fri Sep 09, 2016 8:36 pm
by Serhii Kulibaba

Yes, this is complex component so please use JS below to disable it:
pre$(".ui-slider").addClass("ui-disabled");/pre


Make component read-only

Posted: Sat Sep 10, 2016 4:37 am
by Deon

aaah great. Thank you


Make component read-only

Posted: Thu Sep 15, 2016 6:56 pm
by Deon

Actually, it greys out the slider. I still need the same brightness. How do we do that?


Make component read-only

Posted: Fri Sep 16, 2016 9:50 am
by Serhii Kulibaba

Could you clarify, what exactly do you need to get? You can use any CSS you need there.