Copy link to clipboard
Copied
Hello,
In a multi page form, on the first page I have a field called ToDaysDate that will be populated upon opening of the form, other pages have Readonly fields that are called CToDaysDate which on the same JavaScript that is Opening the form, will copy the value of ToDaysDate to CToDaysDate. It almost works %95 of the times... Here is the code that is executed upon entry and opening of the Form:
function populate_date()
{
if (this.getField("ToDaysDate").value == this.getField("ToDaysDate").defaultValue) {
this.getField("ToDaysDate").value = util.printd("m/d/yyyy", new Date());
}
}
populate_date(); // call my function
getField("CToDaysDate").value = getField("ToDaysDate").value;
What is so strange is that on page four of this forms, there are two fields of CToDaysDate, because on this page user either sign on Participating or Non-Participating part based on where user sign, there is a date field of CToDaysDate... Strange thing that happens only the second CToDaysDate is populated the first one is left Blank!!! Why I have no idea... CToDaysDate#2 is left blank but CToDaysDate#3 is populated! Both CToDaysDate#2 and CToDaysDate#3 are on page four, all the rest of CToDaysDate are populated on the other pages.
I notice if I modify the date populated on the ToDaysDate fields the others keep their old value, I assume that I should run/create JavaScript that runs under the tab of Validation for ToDaysDate and after validating copy the value into CToDaysDate,,, Right?
Regards,
Jeff P.
Tab order is not the same as calculation order.
In the Prepare Form tool look under the "More" option (it is a drop down) and select the "Set field calculation order...".
I
Adjust the field order by highlighting the field name to adjust and move it up or down as necessary. Click "OK" when complete..
You might want to post a link to the form or a form with a similar issue
Copy link to clipboard
Copied
You might want to open the JavaScript console and see if there is any error in your code.
Copy link to clipboard
Copied
Hello,
Thanks for looking at this problem/question... but here is what I had set on my JavaScript debugger console, and no error is poped out.
I even tried with and extra line of code to copy ToDaysDate value to CToDaysDate#2, still came out blank.!
Copy link to clipboard
Copied
Check the calculation order.
Copy link to clipboard
Copied
Hello,
I was not sure regarding Calculation Order, but I did some study and I changed the tab order on Page 4 that I have problem, for CToDaysDate#2 and CToDaysDate#3 it used to be 4, 7, I changed it to 4,5 and close the form and reopened it again... result was the same still CToDaysDate#2 was blank and CToDaysDate#3 was populated on Page 4....!
Regards
Jeff P.
Copy link to clipboard
Copied
Have you tried using a validation script like you initially suggested?
Copy link to clipboard
Copied
Hello,
Not yet I will start working on it... Have any suggestion?
Copy link to clipboard
Copied
Tab order is not the same as calculation order.
In the Prepare Form tool look under the "More" option (it is a drop down) and select the "Set field calculation order...".
I
Adjust the field order by highlighting the field name to adjust and move it up or down as necessary. Click "OK" when complete..
You might want to post a link to the form or a form with a similar issue
Copy link to clipboard
Copied
Hello,
And thanks a million, that you took your time and you responded to my questions and problem. You are not going to believe what was wrong.... Somehow accidently the fields had been set to Invisible... ... As I was scratching my head for the last 3-4 days, and playing with that field all the parameter's, suddenly I noticed the field has been set to Invisible. Changed it to Visible and date appeared on the field...
Again and again thanks for your time and response and reading my problem.
Regards,
Jeff P
Find more inspiration, events, and resources on the new Adobe Community
Explore Now