Add instructional text to my text field that will disappear when clicked? I want to add some text into a form field to instruct respondents how to fill out the field and have the text disappear when the respondent clicks the field.

Avatar

Avatar
Validate 1
Level 1
Zomaxx
Level 1

Likes

0 likes

Total Posts

14 posts

Correct reply

0 solutions
Top badges earned
Validate 1
View profile

Avatar
Validate 1
Level 1
Zomaxx
Level 1

Likes

0 likes

Total Posts

14 posts

Correct reply

0 solutions
Top badges earned
Validate 1
View profile
Zomaxx
Level 1

16-01-2016

Is there a way to add instructional text to my text field that will disappear when clicked?  I want to add some text into a form field to instruct respondents how to fill out the field and have the text disappear when the respondent clicks the field. Is this possible? !

Accepted Solutions (0)

Answers (2)

Answers (2)

Avatar

Avatar
Validate 1
Level 1
Zomaxx
Level 1

Likes

0 likes

Total Posts

14 posts

Correct reply

0 solutions
Top badges earned
Validate 1
View profile

Avatar
Validate 1
Level 1
Zomaxx
Level 1

Likes

0 likes

Total Posts

14 posts

Correct reply

0 solutions
Top badges earned
Validate 1
View profile
Zomaxx
Level 1

16-01-2016

Thank you your quick reply ! I will check it today...Have a nice day..

Avatar

Avatar
Validate 1
Level 3
lateniteNC
Level 3

Likes

12 likes

Total Posts

98 posts

Correct reply

13 solutions
Top badges earned
Validate 1
Boost 5
Boost 3
Boost 10
Boost 1
View profile

Avatar
Validate 1
Level 3
lateniteNC
Level 3

Likes

12 likes

Total Posts

98 posts

Correct reply

13 solutions
Top badges earned
Validate 1
Boost 5
Boost 3
Boost 10
Boost 1
View profile
lateniteNC
Level 3

16-01-2016

Try this:

  • Create a text field; select the field and on the object palette, select the accessibility tab. In the tool tip, write your instructional text.
  • Now we need to write some code. In the script window, using javascript, place the following code in the field's initialize event:

this.execEvent("exit");

this.format.picture.value = "null{'" + this.assist.toolTip.value + "'}";`

  • Next, place this code in the field's enter event:

this.fontColor = "0,0,0";

this.font.posture = "normal";

Finally, place this code in the field's exit event:

if (this.isNull){

this.fontColor = "153,153,153";

this.font.posture = "italic";

this.caption.font.fill.color.value = "0,0,0";

this.caption.font.posture = "normal";

}

Now, preview your form. The instructional text should be in a grey color in italicized font. When your user types in the field, the instructional text will disappear.