HTML Text Boxes

  _plAsma 11:12 02 Sep 2004

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 2004

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:


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.


  _plAsma 12:11 02 Sep 2004

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

Thanks alot! :)

  Taran 12:25 02 Sep 2004

You're very welcome.

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

Elsewhere on IDG sites

Xiaomi Mi Mix 2 review

What went wrong at the Designs of the Year 2017

iPhone X news: Release date, price, new features & specs

Comment regarder des séries et talk-shows américains en France ?