These forums are now Read Only. If you have an Acrobat question, ask questions and get help from one of our experts.

Tooltips????

ForbesDi6
Registered: Apr 28 2009
Posts: 16
Answered

I have entered default text on the value tab of my text field. I prefer these "hints/examples" over mouse pointer tooltips as this form most typically is tabbed thru. The default text can be deleted and entered over, however, I'm wondering if "upon entry" the default text can be automatically deleted (so that the users don't leave the examples there). I do not want this field to be a mandatory fill field, however.

Thanks for any assistance!

My Product Information:
LiveCycle Designer, Windows
akshay
Registered: May 13 2009
Posts: 5
if the text value is textfield and default text in the textfield is "demotest".... try this code

in the event myform.textfield::enter,

if (textfield.rawValue == "demotest")
{
textfield.rawValue = "";
}



- akshay
ForbesDi6
Registered: Apr 28 2009
Posts: 16
I apologize - I should have mentioned I'm very new using this software (3 weeks) and do not have programming background. Where do I enter this code? Does this go into Script Editor? I tried that but am getting an error on the first { .
akshay
Registered: May 13 2009
Posts: 5
yes, this code will go in Script Editor.

On the form click on the Text Field, then in Script Editor open up the drop down box which shows up all events.

Select "enter"
and then just paste the code
ForbesDi6
Registered: Apr 28 2009
Posts: 16
akshay -

I think I followed your instructions correctly - here is what I have in the script editor after clicking on the text field and selecting "enter".........
---------------------------------------

form1.#subform[0].Confidential_info1::enter - (FormCalc, client)
if (textfield.rawValue == "ie: financial, grades, medical, ssn")
{
textfield.rawValue = "";
}

------------------------------

I am getting an error "Error: syntax error near token '{' on line 2, column 1.

Any suggestions?
akshay
Registered: May 13 2009
Posts: 5
ooppss.. i should have told you earlier itself.
Select the language as "JavaScript" in the dropdown for language..

i tried it using JavaScript the same code works perfectly fine....!!!!!!!!



form1.#subform[0].textfield::enter - (JavaScript, client)
if (textfield.rawValue == "ie: financial, grades, medical, ssn")
{
textfield.rawValue = "";
}
ForbesDi6
Registered: Apr 28 2009
Posts: 16
Oh - thank you - that definitely worked! One strange thing however, I have entered 12 versions of tips in 12 fields and 2 of the twelve aren't working. When tabbing into the field the cursor goes to the end of the line and does not delete the tooltip. I've studied the code and it looks fine, have cut the old code and started over...... is there something I'm missing? The default value is = to the code as I have copied and pasted it from the field value tab.

form1.#subform[1].TextField10::enter - (JavaScript, client)
if (textfield.rawValue == "ie: alarm, camera")
{
textfield.rawValue = "";
}
akshay
Registered: May 13 2009
Posts: 5
hi,

I am not sure.. I tried the same code with tabbing through the textfields it works as it should. i.e. deleting the tool tip.

just make sure that the if condition, checks for the correct corresponding default value for each textfields.
ForbesDi6
Registered: Apr 28 2009
Posts: 16
Thanks. I've checked and double checked. I even took out most of the default value and just left two letters. Still not highlighting / deleting. I'll keep working on it. Thanks so much for you help!