I have a simple contact form on a website that has 2 text fields, 1 textarea, and 1 hidden field.
For some reason, all the fields POST to a PHP script except the tex
Though in your case you don't have the textarea
set to disabled
, the reason I found this post was because I wasn't getting a value from a textarea
that was. So here's a note for anyone else with that issue.
To POST
the value from a textarea
where you want the field to be non-editiable, use readonly
instead of disabled
- either directly in html or via setAttribute
in JavaScript - and then use CSS to highlight it, eg:
textarea[readonly] {background-color:#F0F0F0;})