Text Field Disappearance

Avatar

19-06-2008

Hello, was wondering if there is a way for the default word(s) in a text field to disappear once the field is clicked on instead of the user having to backspace the whole word(s) out, thanks



Shane C

Replies

Avatar

Avatar
Boost 500
Level 10
pguerett
Level 10

Likes

612 likes

Total Posts

7,689 posts

Correct reply

692 solutions
Top badges earned
Boost 500
Boost 50
Boost 5
Boost 3
Boost 250
View profile

Avatar
Boost 500
Level 10
pguerett
Level 10

Likes

612 likes

Total Posts

7,689 posts

Correct reply

692 solutions
Top badges earned
Boost 500
Boost 50
Boost 5
Boost 3
Boost 250
View profile
pguerett
Level 10

19-06-2008

You can add this code to the enter event of the field:



this .rawValue = ""



But then this will delete everything that they have in there each time they enter the field.

Avatar

24-06-2008

This worked for me in Acrobat, probably doesn't apply in Designer...but maybe there's an equivalent!



if (event.target.value == event.target.defaultValue)



{

event.target.value = ""

}



so.. as Paul said above, but only reset the field if its value is equal to its default value