• Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint
Share this Page URL
Help

Chapter 11. Forms > Keeping Elements from Being Changed

Keeping Elements from Being Changed

Sometimes it may be necessary to automatically set the contents of a form element and keep the visitor from changing it. For example, you could have the visitor confirm information, or you could show a past history of transactions and then submit that information again with the new data collected. You can do this by making the element "read-only".

To keep elements from being changed:

TypeREADONLY in the form element's tag.

Tip

You can use the READONLY attribute intext boxes, password boxes, checkboxes, radio buttons, and text areas.

Tip

Setting the READONLY attribute is something like using a hidden field without making it hidden. For more information on hidden fields, consult About Hidden Fields on page 204.


PREVIEW

                                                                          

Not a subscriber?

Start A Free Trial


  
  • Creative Edge
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint