Hi, I’m trying to make a textbox invisible originally…
<td><input type=“hidden” name=“price” id=“price”/></td>
and then visible on a submission…
document.getElementById(‘price’).style.visibility=“visible”;
However it doesn’t work.
I can however do the opposite. Any ideas?
That’s because there is displaying of hidden fields. What you can do alternatively is using something like:
<td><input type=“text” name=“price” id=“price” style=“display:none” /></td>
then your javascript line would be:
document.getElementById(‘price’).style.display=“block”;
Note - this is a quick example. The display:none should really be in a class with the class assigned to the field instead of styled inline like this.