Disabled HTML textbox not posting
Posted: Thu Aug 30, 2007 9:46 am
I've been crawling through code to find an error which turned out to be a disabled text box not posting its data. Surely there's a way to make it post data? This is a simple script I used to test if it works, but it doesn't:
But this only posts the data from the text box that's enabled.
Regards,
Code: Select all
<
form method = 'post'>
<input type = 'text' name = 'disabledBox' value = 'Filled in disabled box' disabled>
<input type = 'text' name = 'enabledBox'>
<input type = 'submit' value = 'Shoot'>
</form>
<?php
if($_POST)
print_r($_POST);
?>
Regards,