Copy link to clipboard
Copied
Hi, need help, I have 4 fields "Name","Phone","Email","Address", I also have multiline text field and need each value in separate line with corresponding prefix, any help is appreciated.
Copy link to clipboard
Copied
You can use the following as custom calculation script of multi-line field:
var name = this.getField("Name").valueAsString;
var phone = this.getField("Phone").valueAsString;
var email = this.getField("Email").valueAsString;
var address = this.getField("Address").valueAsString;
var output = "";
if (name) output += "Name: " + name + "\n";
if (phone) output += "Phone: " + phone + "\n";
if (email) output += "Email: " + email + "\n";
if (address) output += "Address: " + address + "\n";
event.value = output;
Copy link to clipboard
Copied
You can use the following as custom calculation script of multi-line field:
var name = this.getField("Name").valueAsString;
var phone = this.getField("Phone").valueAsString;
var email = this.getField("Email").valueAsString;
var address = this.getField("Address").valueAsString;
var output = "";
if (name) output += "Name: " + name + "\n";
if (phone) output += "Phone: " + phone + "\n";
if (email) output += "Email: " + email + "\n";
if (address) output += "Address: " + address + "\n";
event.value = output;
Find more inspiration, events, and resources on the new Adobe Community
Explore Now