Copy link to clipboard
Copied
Hi there
I want to make a form to print labels.
I want to print 6 labels on one page
Date on the first label is present date (I have used Date Printed).
Date on next label must be DatePrinted+1, the date on the 3rd label DatePrinted+2 etc etc
Also I have a text field on each and every label. I just want to enter text in the text field on label1 and have this text copied in the same text field on the other 5 labels.
How do I get this done?
Copy link to clipboard
Copied
When you want the same text in fields assign the same name to the text fields.
Copy link to clipboard
Copied
Not only is the value shared between the fields with the same name but some other properties like "required" and "read only" are also shared. So if one wants to have another field with the same value but "read only" one needs to create a second field with a different name. In this case, one will need to update the second field when the first field is updated. This could be done using the calculation action. Under this scenario the update will occur each time any calculated field needs to be updated. One can use the "on blur" action update the second field with a script. Since you have multiple fields with this scenario, I would develop a script that adjust the name for the second field base on the first field's name. So I could have field like "Name" and create a second field like "Name_Duplicate" that would take on the value of the field named "Name" but have some different propertites. One could use the following script in the "on blur" action to copy the value of the field to the second field "_Duplicate" and use in any group of fields.
this.getField(event.target.name + "_Duplicate").value = event.target.value;
Copy link to clipboard
Copied
Can I use this script to copy the value but modify its format? For instance, I want the date in 2 different fields but in the first field it would have the date entered as m-d-yyyy and in the second it would autopopulate to be mmm-yy based on the first field.
Find more inspiration, events, and resources on the new Adobe Community
Explore Now