Answered
Hi, I have a script in my PDF form to calculate time
here's my script:
event.value = (this.getField("end_monday").currentValueIndices - this.getField("start_monday").currentValueIndices) / 4 ;
So far, it works good... but, I want to be able to substract 30 min from that total if a certain check box is checked...
Can anyone help me with this ?
Thanks in advance
Paga
It appears you are computing the time in 15 minute intervals from a series of the value indices from a pair of drop down boxes and displaying the time as decimal hours.
You can check the value of the check box to be 'Off' for the non-selected state of the box, the export value for the selected state of the box, or use the 'isBoxChecked()' method to see test for the box being checked without knowing the value for that box.
I would do this as a calculation script for the result field and not a validation script.
George Kaiser