Highlighted

Preventing User from Adding Text into a Text Box

Avatar

04-09-2008

I have a situation where I want to prevent the user from entering text into a Text box after they have clicked on a button.



I have looked at all the properties and can't find any way to do this. I don't want the field to be "Hidden" or "Invisible". I just want to lock it so nothing can be typed in!



Thank you in advance for any ideas you can share.

Replies

Highlighted

Avatar

Avatar

pguerett

Total Posts

7.7K

Likes

611

Correct Answer

692

Avatar

pguerett

Total Posts

7.7K

Likes

611

Correct Answer

692
pguerett

04-09-2008

put this code on the button click event as the last line of code



fieldname.access = "readOnly"
Highlighted

Avatar

05-09-2008

additionally, if you don't want the field to be in the tab order, set the access property to be "protected".