Expand my Community achievements bar.

Autofill fields

Avatar

Former Community Member
I have made a form where I have an English side and at Egypt side.



When I have filled out the English side, another person fills out the Egypt side with Arabic text.



I would like to, when I fill out the date field in the English side, that it at the same time fills out the Egypt side, so I'm sure that the date is the same.



Does that give any meaning??



Charlotte
4 Replies

Avatar

Former Community Member
Hi Charlotte,



Put this script in your English side date field. Place it in the exit event.



var dateEng = xfa.resolveNode("dateEng");

var dateEgy = xfa.resolveNode("dateEgy")



dateEgy.rawValue = dateEng.rawValue



Regards,



Chris Fourie

www.intelliform.co.za

Avatar

Former Community Member
Hi Chris



I don't have a exit event, so can I make an event otherwise??

I would like that when I have filled out the date in the English side, that it when I leave that field it fills out the Egypt side, so I can see it immediately.



Charlotte

Avatar

Former Community Member
Hi Charlotte,



Every field in Designer have an "exit event" If you look in the script editor dropdown box you will find all the different events.



If you place the above script in the exit event of the English date field... tab out or click out of the English date field, the value in that field will be copied into the Egypt side date field.



Trust it helps,



Regards,



Chris Fourie

www.intelliform.co.za

Avatar

Former Community Member
Hi,



You could also set the fields to be global. For example:



1. Select both date fields.

2. In the Object palette, Binding tab, type a name. Then set the Default Binding to Global.

3. In the Field tab, specify the Display Pattern and Locale as required by your form. These setting will most likely be different for each field.

4. Preview the form.

5. Click in one of the date fields and select a date from the calendar. The other date field will be updated in consequence.



Regards,



Hélène

Adobe Systems