Copy link to clipboard
Copied
PDF Forms: Pop to show correct result when hover the mouser over form field
I'm creating quiz and I want some sort of pop up to show correct result when i hover over field with mouse
but i don't want it to be alert, is there something else i could use to make it work other then app.alert?
[Edited the Subject with the as per the query: Mod]
Copy link to clipboard
Copied
Yes, you can add this as 'Mouse enter' event:
app.popUpMenu("Correct result is XXX");
Change text as you want.
Copy link to clipboard
Copied
Yes, you can add this as 'Mouse enter' event:
app.popUpMenu("Correct result is XXX");
Change text as you want.
Copy link to clipboard
Copied
That is actually nice, I take a look into guide for app.popUpMenu and I see that i can also add sub items,this will be useful for my project,thank you so much.
Copy link to clipboard
Copied
Use the field's built-in Tooltip property.
Copy link to clipboard
Copied
I knew already about tooltip but i gave up on it because it doesn't allow me much control over where inserting new line, because some aswers are long text and there is also multiple answers. But still thank you for your time i appreciate it.
Copy link to clipboard
Copied
Actually, you can control it, but only if you apply the tooltip using a script, like this:
this.getField("Text1").userName = "Tooltip line 1\nTooltip line 2";
Copy link to clipboard
Copied
Here's an article on using popup menus:
https://www.pdfscripting.com/public/Creating-Popup-Menus.cfm
However, I'd be careful with this function. It is not implemented on most PDF viewers. You are better off going with a strategy that uses more common PDF features. For example hiding/showing fields. This is something you can do with no scripting at all for a simple rollover. Or if more complex behavior is required, hide/show scripts are more widely implemented than popup menus.
https://www.pdfscripting.com/public/Hiding-and-Showing-Form-Fields.cfm?sd=40
Find more inspiration, events, and resources on the new Adobe Community
Explore Now