I have to show checkbox in disabled format using css. Don't want to use disabled attribute due to some technical reason. If i used disabled attribute it is not passing on checkbox value to next page.Hence i don't want to use disabled attribute.
can someone tell me how to show checkbox in disabled format using css ?
Asked
Active
Viewed 45 times
0

RBP
- 481
- 1
- 9
- 29
-
But...what if the user clicks it? It'll deselect it. – nnnnnn Mar 20 '17 at 09:27
-
https://css-tricks.com/almanac/properties/p/pointer-events/ – Rayon Mar 20 '17 at 09:27
-
I suppose making it readonly is a better alternative. – Aman Jain Mar 20 '17 at 09:28
-
@nnnnnn :- on click i am returning false; – RBP Mar 20 '17 at 09:35
-
If you know what the value is already, and you just want to display it to the user, simply send the value manually using a `` This way you will send the state of that element to the next page, and use disable to show the checkbox properly. – Narxx Mar 20 '17 at 09:37
-
@Narxx. It is in my mind . but there are 60 to 65 checkboxes present on page. Hence i want to try that last option. When user click on on disable page.i am disabling all checkboxes. And on click of submit form, i am enabling all checkboxes, so that they can pass on value to next form. – RBP Mar 20 '17 at 09:43
-
How about trying out @Spidi'sWeb idea, changing the disabled into readonly? http://stackoverflow.com/questions/7357256/disabled-form-inputs-do-not-appear-in-the-request – Narxx Mar 20 '17 at 11:51