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

LiveCycle 8: Getting User Input via Message Box

davidbb
Registered: Oct 23 2007
Posts: 17

The pdf file I'm attempting to automate is the financial disclosure page of a loan contract. I've successfully done this in LiveCycle, and have used the financial functions to calculate/display all the elements you would expect to see on a page like this, after the user inputs the loan term, and total amount: down payment, total cost of the loan, amount financed, etc.

Now, Marketing wants to calculate things differently so that the downpaymet and interest rate are calculated, based on some rounding rules, etc. that would make the annual payment to come out to a whole dollar amount.

I've opened the contract pdf file in LiveCycle as artwork, as I only want to add text and numerical form fields to the existing contract "artwork."

Bottom line, I would like to create a pop-up "worksheet" or dialog box of some sort that would allow the form filler to input some basic values, in order to set some global form variables, so that I may do my calculations.

Is this possible, or am I going to have to open the pdf to create an interactive form, and try to find a spot on the form to utilize a hidden subform to create this?

I was hoping for a dialog box to get user input, as it would be aesthetically better than trying to make a subform visible on the existing contract layout.

Hope this makes sense. Thanks in advance for any help that you guys can provide.

-David

carrimak
Team
Registered: Dec 13 2006
Posts: 165
Try this, which I found on another listserve. Not original to me....

Double-click the field with the Select Object Tool to bring up
Properties.

On the Actions tab of the Properties window choose "On Focus" for the
trigger and Run Javascript for the action.

Click the add button to input the Javascript:

app.alert({
cMsg: "Add the text here your want for your message",
cTitle: "add title of your message here"
});

Customize the text in the quotes.

Click ok the exit the Javascript window.

Then close the properties.

Now when you click on the field with one of the regular tools it will
pop up a window titled with cTitle and with the text from cMsg.

___________________________________________

Haven't tried it out myself; let us know if it works....

carrimak

Acrobat is probably the program I use most often and I'm learning more every day.

gkaiseril
Online
Expert
Registered: Feb 23 2006
Posts: 4307
I would use the "response()" method in LiveCycle Designer in FormCalc or JavaScript.

The JavaScript example:.

var sResponse = xfa.host.response("Hows is your health today?", "Your Health Today", "Fine", false);
xfa.host.messageBox(sResponse, "Your Response", 3, 0);

You will have to add some validation scripting for the inputted values.

George Kaiser

gkaiseril
Online
Expert
Registered: Feb 23 2006
Posts: 4307
If you would consider using Acrobat Forms and not LiveCycle Desinger, there is a dialog object available that could be used to gather the reiquired information in one screen. You might need to obtain a 3rd party tool to build the dialog box as the structure is quit complex, Look at WindJacks AcroDialog tool.

George Kaiser