Expand my Community achievements bar.

SOLVED

New to LiveCycle- need help adding forms together (calculations)

Avatar

Level 2

Okay, here's my scenario.

I have one field called RoomBoard, one below it called TuitionFees.  I'm looking to calculate both automatically in a "Total" field below it so that when a person puts a figure in for Room & Board and one in for Tuition & Fees, a total will automatically pop up.  I thought this would be simple, but I just can't get it! HELP!

1 Accepted Solution

Avatar

Correct answer by
Level 6

Change the type of all three fields to numeric.  Highlight each field and in the Object window, on the Field tab, pull down the Type dropdown and select "Numeric Field".

View solution in original post

25 Replies

Avatar

Level 2

Sorry for all the trouble.  I am trying to attach the page as a PDF file.  If you can retrieve it, below the section where it says "Please refer to the financial aid award package letter sent to you by your school to complete this section. What other sources of financial assistance do you have available to you to put toward funding your education?" is where I need the help.  I have the following script written for it, based on names I gave some of the fields:

this.rawValue =ParentsContribution.rawValue + AnticipatedSummerEarnings.rawValue + StudentAssets.rawValue + CollegeFinancialAidOffer.rawValue + OtherScholarship1.rawValue + OtherScholarship2.rawValue + YourJob.rawValue + OhioInstructionalGrant.rawValue + OhioCollegeOpportunityGrant.rawValue + OhioChoiceGrant.rawValue + PellGrant.rawValue + SupplementalEducation.rawValue + AcademicCompetitiveness.rawValue + Loans.rawValue + WorkStudy.rawValue + Gifts.rawValue;


I'm still running into trouble.  The Total field (which should add everything together in this section) is just coming up as "0".  They all have numeric properties, and I switched the script to javascript when trying to input that.

Let me know if you don't receive the PDF...

Avatar

Level 6

OK it attached this time but it was saved as a static form and has no scripts.  Open your original file and when you "Save as" select Save As Type "Adobe Dynamic XML Form (*.pdf).  Then re-attach the file.

Avatar

Level 2

Okay- it should be right now.   See page 4...

Avatar

Level 6

Good, this is easy.  You have your script in the form:ready event, which means it will only execute once when the form is initially drawn.  Cut the script out and paste it into the calculate event for the TotalFinancialAssistance field.  Remember to change the language for that event to javascript.  The calculate event will fire whenever a field is changed and will run your script to recalculate the total.

One shortcut for you, if you are going to use javascript for the form, is to select Form Properties from the File menu, then on the Defaults tab select Default Language javascript from the pulldown.   That will automatically set the language when you enter script, eliminating the issue of forgetting to change it on each script event.

Avatar

Level 2

PERFECT!! Oh, I'm such a novice... thank you, everyone who has helped!!!!