I have a text field that is disabled based on who the user is. When the page submits, the value of the text field is supposed to be inserted into a SQL table, but SQL seems to see the value as empty because the text field is disabled. Can anyone tell me a way to get this value into SQL, i.e. for SQL to actually see the value? Below is the code for my text field. The SQL code is just an insert. Thanks!
<input type="text" name="txtWorkOfDate" id="txtWorkOfDate"<%
...
If vIsManager = 0 Then
Response.Write "Disabled style='background-color:#E8E8E8'"
End If %>
value="<%=(RSMain("IPIssueWorkOfDate"))%>">
Use
readonlyinstead ofdisabledif you want the browser to send you the value. But note that it doesn’t stop the user from modifying/sending it some other way (even withdisabled). You need to verify that the user can save the value on the server side, but then you can’t use the value the browser sent to you.