Is it possible to POST/Submit an Input Checkbox that is disabled?

Welcome to our community

Be apart of something great, join today!

Antoniorth

Newbie
Messages
4
Reaction score
0
Points
1
Hello,

I have a checkbox that, given certain conditions, needs to be disabled. It turns out HTTP doesn't post disabled inputs. How can I get around that?
 

worcester

Newbie
Messages
6
Reaction score
1
Points
3
To get "readonly" look and POST checkbox's value at the same time, just add a hidden "input" with the same name and value as your checkbox. You have to keep it next to your checkbox or between the same <form></form> tags:

You don't have permission to view the spoiler content. Log in or register now.

Also, just to let you know readonly="readonly", readonly="true", readonly="", or just READONLY will NOT solve this!
 
  • Advertisement
  • Advertisement

    Top