HTML Text Boxes

  _plAsma 11:12 02 Sep 04
Locked

Hi, how am i able to have a HTML textbox locked so that the user cannot edit the contents of it?

  Taran 12:04 02 Sep 04

In what context ?

A textbox is, by default, an editable area of an online form.

If you want to have a textbox that may not be typed in your can simply add the following tag into the textbox snippet:

readonly="true"

The whole snippet would look something like this:

<input name="" type="text" readonly="true" />

I'm not sure why you'd want a textbox that may not be edited unless you are going to populate it with dynamic content where you are using it to display a value pulled from another source.

Anyway, it's not for me to know why you want to do it. The above is how you can do it though. Hope it helps.

T

  _plAsma 12:11 02 Sep 04

Ah, thankyou! it works great :) its because i have a date/time section in the form which is made dynamically in php :)


Thanks alot! :)
_plAsma

  Taran 12:25 02 Sep 04

You're very welcome.

This thread is now locked and can not be replied to.

Surface Pro 5 News - release date, UK price, features, specs

Microsoft Surface Studio hands-on review: the iMac killer is here

Best Mac antivirus 2017