Yammyguy Posted April 6, 2009 Share Posted April 6, 2009 With the following code in a form: <input type="text" name="my_input" value="HELLO!" disabled="disabled" /> Does the value get passed through POST on Submit? It doesn't seem to be. is there something I should be adding/doing in order to enable the value to pass? I thought this would be a fairly straightforward thing - but it's turning out to be a pain in the bum! Thanks in advance! Quote Link to comment https://forums.phpfreaks.com/topic/152720-solved-passing-values-in-a-disabled-input-text-box/ Share on other sites More sharing options...
PFMaBiSmAd Posted April 6, 2009 Share Posted April 6, 2009 Disabled input fields are not sent. You probably want to use a hidden field. What you are trying to accomplish? Quote Link to comment https://forums.phpfreaks.com/topic/152720-solved-passing-values-in-a-disabled-input-text-box/#findComment-801979 Share on other sites More sharing options...
Yammyguy Posted April 6, 2009 Author Share Posted April 6, 2009 Disabled input fields are not sent. You probably want to use a hidden field. What you are trying to accomplish? I ended up using the hidden field to pass the disabled values - it worked. Thanks very much! ~C. Quote Link to comment https://forums.phpfreaks.com/topic/152720-solved-passing-values-in-a-disabled-input-text-box/#findComment-801982 Share on other sites More sharing options...
ToonMariner Posted April 6, 2009 Share Posted April 6, 2009 try readonly="readonly" - should be posted but still sent with headers - thats if the info needs to be visible in the form - if not then the hidden field is best. Quote Link to comment https://forums.phpfreaks.com/topic/152720-solved-passing-values-in-a-disabled-input-text-box/#findComment-801984 Share on other sites More sharing options...
Yammyguy Posted April 6, 2009 Author Share Posted April 6, 2009 try readonly="readonly" - should be posted but still sent with headers - thats if the info needs to be visible in the form - if not then the hidden field is best. ...readonly, huh??? I'll have to try that! Thanks for the suggestion! Quote Link to comment https://forums.phpfreaks.com/topic/152720-solved-passing-values-in-a-disabled-input-text-box/#findComment-802033 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.