Deon
Posts: 0
Joined: Sun Jun 30, 2013 6:00 am

Make component read-only

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

Serhii Kulibaba
Posts: 150
Joined: Tue Aug 27, 2013 1:47 pm

Make component read-only

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

Deon
Posts: 0
Joined: Sun Jun 30, 2013 6:00 am

Make component read-only

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

Serhii Kulibaba
Posts: 150
Joined: Tue Aug 27, 2013 1:47 pm

Make component read-only

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

Deon
Posts: 0
Joined: Sun Jun 30, 2013 6:00 am

Make component read-only

Awesome, thank you!

Deon
Posts: 0
Joined: Sun Jun 30, 2013 6:00 am

Make component read-only

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

Serhii Kulibaba
Posts: 150
Joined: Tue Aug 27, 2013 1:47 pm

Make component read-only

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

Deon
Posts: 0
Joined: Sun Jun 30, 2013 6:00 am

Make component read-only

aaah great. Thank you

Deon
Posts: 0
Joined: Sun Jun 30, 2013 6:00 am

Make component read-only

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

Serhii Kulibaba
Posts: 150
Joined: Tue Aug 27, 2013 1:47 pm

Make component read-only

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

Return to “Issues”