Custom calculation script for field that has value but not entered by user
Hello,
I'm creating an interactive form where users fill out details and I am using various scripts which I found online. I'm not very proficient with JavaScript so I'm hoping someone can help me.
One feature of the form is a summary section that populates with the answers the user has given earlier in the form. To facilitate this I am using the following script:
var n1 = this.getField("Project name");
var n2 = this.getField("Summary_Project name");
n2.value = n1.value;
So whatever is entered in the field "Project name" is automatically filled in in "Summary_Project name". This is activated by an On Blur action which works as the user is entering text into the parent field.
The next tool I am using is Form Router Calendar tool which uses a whole bunch of JavaScript that I don't understand - but allows the user to pick a date from a calendar picker. This works by adding a button next to the "Date" field.
The problem I face is because text is not directly entered in the "Date" field, the script mentioned above does not work to copy the date to the Summary section.
So I thought there could be a way to use a custom calculation script for the "Date" field that says something along the lines of "If this field has a value, then copy it's contents to the "Summary_Date" field". I'm hoping that this could work in theory so once the date picker adds the date to that field, it will automatically copy it to the Summary field.
As mentioned I have no knowledge of writing code or the proper syntax needed so I hope somebody can help. I really appreciate any advice you can give.
Thank you!
Harry.

