Is there a way to enter ghost text in a field.
I would like to alert the user that only a certain number of characters are allowed in a field. By the way I am a novice when it comes to JavaScript so if someone has the answer, please be very precise as to where I should enter the script and how to enter it to get the desired results.
Thanks in advance
Hi,
I think you want there to be a default text in the field like "256 Characters Max."
If that is correct, enter something like that as the default value in the "value" tab of the "object" pallet. Change the font color to a light grey.
To clear the message, using the "enter" event, place the following formCalc script:
if($ == "256 Characters Max.")then
$ = ""
endif
or if you prefer javaScript:
if(this == "256 Characters Max."){
this = "";
}
Then, using the "change" event enter the following formCalc script:
$.fontColor = "000,000,000"
or if you prefer javaScript:
this.fontColor = "000,000,000";
This will change the font color to black when the user enters something into the field.
Cheers!
Stephen
Views
Replies
Total Likes
Thanks Stephen,
I am still unable to get this to work. I must be doing something wrong. Anymore assistance will be appreciated
Views
Replies
Total Likes
Hi,
check this brilliant example here:
http://cookbooks.adobe.com/post_Adding_Ghost_Text_to_LiveCycle_Designer_form-18436.html
Thanks so much! The link was very helpful!!!!
Views
Replies
Total Likes
Views
Likes
Replies
Views
Likes
Replies