Is it possible to have a hidden value attached to a text box in a form so that if nothing is inputted by the user into that textbox the value is for example: "not specified" without the user knowing?
Yes. onSubmit you can call a function that checks the value of your text box. if the value is nothing, you can assign the value of something, then proceed in sending the form info. here's half pseudo, half real code (in other words i've been working in other languages recently and not JS, check syntax).
Function checkTextValue(TextName){
if document.forms[Form1].elements[TextName].value == "" {document.forms[Form1].elements[TextName].value == "Not Specified";
}
}
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.