Don't use the on-blur action to copy data, use a calculation script instead. Let's say you have to fields Field1 and Field2, and somehow the information in Field1 changes - either because it is changed by a user directly, or because some other script modifies it (e.g. your calendar picker). Any change in the form will trigger a calculation event, that is sent to all fields that have a calculation script. When you look at your field properties dialog, you will notice a "Calculate" tab:
So, if you want to copy data from Field1, you can use the following script:
event.value = this.getField("Field1").value;
You are using a "push" approach - the value gets pushed from the field that changed to other fields that need that information. A calculation script uses a "pull" approach: It pulls information from other fields when something in the form changed. There are pros and cons for each approach. In this case, the calculation script is the easier way to implement this.
This worked great and makes a lot of sense.
Hi Karl, thanks for your help.
I have another question off the back of that. On of my fields is a phone number so I would like the user to enter '01234567890' (10 digits) but in the summary field the first zero doesn't appear. Similarly if I type '000000000' (zeros) into the parent field I only get one '0' in the summary field. Would this be because of the calculation field?