Copy link to clipboard
Copied
I have created a form where I have duplicated fields. Say I have 5 "copies" of a field in my form, I want the user to be able to fill in field 1 which will populate fields 2 - 5, but I want fields 2 - 5 to be locked so that they can't be typed over.
It would also be beneficial to have the "hover over" instruction be different for field 2 - 5, eg instruction for field 1: "add detail here to populate fields 2 - 5" and instrcution for fields 2 - 5: "complete field 1 to populate this field."
I am new to Adobe and have been self teaching so have very little coding skills, so simple soluions or easy to follow instructions would be appreciated.
Copy link to clipboard
Copied
Name fields differently, then you can set fields 2-5 read only and use this code in each field (2-5) as custom calculation script:
event.value = this.getField("Text1").value;
change "Text1" name to your field you wish to copy value from.
Copy link to clipboard
Copied
This will overwrite the instructions.
Copy link to clipboard
Copied
Hi, Bernd what do you mean exactly?
I tested and it works fine unless I'm missing something?
Can you pls check file on link below?
https://drive.google.com/uc?export=download&id=1moc0TUy40x0ppVQNo7pqz41Z3eTeVZpI
Copy link to clipboard
Copied
See this sample, I enhanced NesaNurani's file to manage instructions:
https://documentcloud.adobe.com/link/track?uri=urn:aaid:scds:US:592a6248-eb8e-4d8b-8e48-d4ac3a703cb2
It uses this script in fields 2-5:
if (this.getField("Text1") != null && this.getField("Text1").value != "") {
event.target.value = this.getField("Text1").value;
event.target.textColor = color.black;
}
else {
event.value = "Complete field 1 to populate this field";
event.target.textColor = color.ltGray;
}
Copy link to clipboard
Copied
This will copy the instruction of field 1.
Copy link to clipboard
Copied
In my sample, instructions for field 1 are in the tooltip since this field is not readonly.
But maybe you have something better to offer?
Copy link to clipboard
Copied
Why does you a tooltip?
Copy link to clipboard
Copied
Because they are made for this
Copy link to clipboard
Copied
Thanks JR Boulay I somehow overlooked part where OP asked for instructions.
Copy link to clipboard
Copied
Does anyone else has issues with forum posts this post is diff then before it's like half of it was missing?
Or was it edited?
Find more inspiration, events, and resources on the new Adobe Community
Explore Now