What is the JS to get a tooltip to show up in a field?

This is the script that adds the field 'APEGM';

/* APEGM Stamp A0 */
a = this.addField("APEGM Stamp", "signature", 0, [1725, 340, 1810, 285]);
a.required = true;

,how do I get 'APEGM' to always be visble in the field so the user can easily see which field is which? I have multiple fields created, I am just posting the APEGM one for simplicity.
I'm sure it's easy once you know:-)


Robin Davidson


4 Answers

Voted Best Answer

You can set the field's tooltip text, but you can't force it to appear. That only happens when the user hovers with the mouse above it.

To set the tooltip text you can use something like this:

a.userName = "APEGM";

.


Visit my custom-made PDF scripts website: http://try67.blogspot.com
Contact me personally: try6767@gmail.com


By Gilad D (try67)   

Have you looked and thought about how the tool tip works? There is no option to make always visible. It only appears after one has focus on the form field for a period of time.

Have you considered coloring the fill or border of the missed fields?

Have you thought about other approaches and how to implement them?


George Kaiser   

As Gilad and George explained, the tooltip is a mouseover event. If you want text to appear until the user fills it out you can add this script as a custom format:

if (event.value==""){event.value="APEGM"}

However, it looks like you have a signature field so this won't work with a signature field. You can always put a label next to the field, which is actually a text field set to readonly and visible but doesn't print.


David Dagley   

Folks,,

Thanks for for your replies, Gilad's answer works for my purposes. I have a cluster of fields quite close together but without a tooltip showing up with a mouse hover, people weren't always sure which one they should sign. If the wrong one was signed, as has happened, we have to restart the signing process, hopefully the tooltip appearance will eliinate the error.


Thanks again.


Robin


Robin Davidson   


Please specify a reason: