Expand my Community achievements bar.

Text Field - Default Value

Avatar

Former Community Member
All,



I have a text field for which I'd like to have the default value automatically disappear once the user puts the cursor into the field. How is this possible?



Also, I'd like to configure the field such that the default value does not print if the user has not replaced it. Is this possible?



Any thoughts are appreciated.



Matt
1 Reply

Avatar

Former Community Member
since thoughts are appreciated ...



I had added a similar script but in an AcroForm..



ON FOCUS: (Enter)

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

event.target.value = "";



ON BLUR: (Exit)



if (event.target.value.length == 0)

event.target.value = event.target.defaultValue;



The bad news is ... I unfortunately never managed to find the Livecycle equivalent to check against a default value though..(a generic way)



anyone?