I have a form that the user enters a date completed in one field and I want to have this date + 45 days calculated in another field (due date). Any ideas on the scripting for this?
Solved! Go to Solution.
Views
Replies
Total Likes
Place the following script in the exit event of the complete date field. Set the language to FormCalc.
Duedate.rawValue = Num2Date(Date2Num(complete.rawValue, "YYYY-MM-DD")+45,"YYYY-MM-DD");
Thanks
Srini
Views
Replies
Total Likes
Here is a sample for you..
https://acrobat.com/#d=wIoJ1TaNXLYBlEfkPdr8AA
Check the Change event of the first Date field..
Thanks
Srini
Views
Replies
Total Likes
I have an example that does something similar.
Please see the attached file.
Paul
Views
Replies
Total Likes
I like your form but I can't see your formula?
Views
Replies
Total Likes
Thanks for your quick response - i don't have the correct version of Adobe to open your example and I don't have administrative rights to download it :-(
Views
Replies
Total Likes
This is what I placed in the change event..
DateTimeField2.rawValue = Num2Date(Date2Num(DateTimeField1.rawValue, "YYYY-MM-DD")+45,"MM/DD/YYYY");
Thanks
Srini
Views
Replies
Total Likes
Thank you for your response. I'm very new to the form design so bear with me. What
is a "change event"?
I need clarification on the formula. Do I use the actual name of the fields (ie complete (date/time field 1) and duedate (date time field 2) or just the kind of field and the number it is on the form?
Views
Replies
Total Likes
Select the complete field on your form and open the Script Editor by going to Window -> Script Editor..
Select Change event and place the following code..
duedate.rawValue = Num2Date(Date2Num(complete.rawValue, "YYYY-MM-DD")+45,"MM/DD/YYYY");
In my sample file, I used the names of the fields as DateField1 and DateField2.. So you need to change the names as per your form.
Thanks
Srini
Views
Replies
Total Likes
Hi,
The attachment you sent to me I cannot open. I still cannot get this formula to work. I am using Adobe Acrobat 8 Professional version 8.1.3. Maybe that is why?
Views
Replies
Total Likes
Views
Replies
Total Likes
Place the following script in the exit event of the complete date field. Set the language to FormCalc.
Duedate.rawValue = Num2Date(Date2Num(complete.rawValue, "YYYY-MM-DD")+45,"YYYY-MM-DD");
Thanks
Srini
Views
Replies
Total Likes
It works!! Thank you for your patience and assistance.
Views
Replies
Total Likes
Views
Likes
Replies
Views
Likes
Replies