Web Hosting Forum - Explore the Latest in Web Hosting Discussions

We are a community of individuals and businesses passionate about web hosting. Let's build, learn, and grow together.

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

Antoniorth

Newbie
Registered
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?
 
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

    Back
    Top