-
Notifications
You must be signed in to change notification settings - Fork 97
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Disable & Enable states/methods #77
Comments
Hello, @adrien-be. It makes total sense. I'm not sure when I'll be able to get back to this, anyway. Do you think you could give it a try? Thanks! |
Hi, // 1. make checkbox writable & style it as enabled // 2. make checkbox readonly & style it as disabled |
Hi again Arthur, I just came across this strange fact yesterday "Inputs of type checkbox & inputs of type radiobutton MUST ignore the readonly attribute" "How weird!" I thought... following thought being "Oh well, it's an HTML spec after all, why am I surprised?". The thing is, there is a real need for this feature, as in, there are cases where you do want your checkbox/radiobutton to be displayed and its value submitted BUT not have it editable (just like other readonly input types, right?). Just have a look at the links in the "read more" section & see how many people actually answered/voted/viewed on these pages. Hence I would support the idea of supporting this readonly mode, and:
Read more: |
Hi,
First, thank you for this great javascript library.
You do have methods to switch from & to "enable/disable".
However, there is no method to switch from & to "readonly/readwrite".
The problem I have here is that switching a input field to "disable" means that it is NOT sent on submit.
Whereas in my case I do want to sent it on submit, hence i want to use "readonly".
Any tip for this?
Introducing a new method might make sense, such as $('#myInput').prettyCheckable('readonly');
See this great SO question regarding "difference between disabled=“disabled” and readonly=“readonly” for HTML form input fields": http://stackoverflow.com/questions/7730695/whats-the-difference-between-disabled-disabled-and-readonly-readonly-for-ht
The text was updated successfully, but these errors were encountered: