Hi everyone,
I really need help with setting up my form.
My form is a staff rental car application form.
What it does is
1) Select a Car
2) Choose the pickup & dropoff dates (if it is on the same day it's counted as 1 day)
3) Depending on the number of days there will be a different price that will show up in cost.
i have used the purchase order example that comes with Livecycle ES 8.2 to auto populate my fields(Javascript). in this case the COST field. then i can just use simple formcalc to calculate the total.
My current problem is that i can't calculate days between dates in JS. I've tried calculating in formcalc and trying to "grab" the result into a JS but still can't get it to work.
Is anyone able to help me with the date calculation so that i can pass it into my getdescription function as a variable for a IF statement.
i have attached a link to my file
http://www.bses.org.au/downloads/Steven_IT/TravelWorkout2.pdf
the extra boxes outside of the table are jsut testing cells, so i could see what was returning.
I would be greatful if anyone has any suggestions for me in how to integrate the date manipulation.
$.rawValue = Date2Num(form1.Page1.Table1.Row1.dropOff.formattedValue, DateFmt(2)) - Date2Num(form1.Page1.Table1.Row1.pickUp.formattedValue, DateFmt(2)) + 1
To use this for calculating the total cost you need a script like
radzmar
• LoveCycle Blog
Documents you need:
• LiveCycle Designer ES2 Docs