Expand my Community achievements bar.

Preventing User from Adding Text into a Text Box

Avatar

Former Community Member
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.
3 Replies

Avatar

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



fieldname.access = "readOnly"

Avatar

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