Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
Bedrock Mission!

Learn more

View all

Sign in to view all badges

Preventing User from Adding Text into a Text Box

Not applicable
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
pguerett
Level 10
Level 10
put this code on the button click event as the last line of code



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