Copy link to clipboard
Copied
Hello , I created a form with Adobe pro XI . I want to create a text field that combines two text fields ( field1 and field2 ) . How can I do?
If the third field does not need to be editable, you can use a custom calculation script for it that is something like the following:
// Custom calculation script
(function () {
// Get the field values, as strings
var s1 = getField("Text1").valueAsString;
var s2 = getField("Text2").valueAsString;
// Set this field's value by concatenating the two strings
event.value = s1 + s2;
})();
Copy link to clipboard
Copied
You need to be more specific. Do you want to concatenate the field values as strings, and if so, do you want to include a separator between the two values? Or do you want to numerically add the two field values? Or something else? The more details you provide the better.
Copy link to clipboard
Copied
Yes, I have two string fields ( Text1 and Text2 ) and I would like to create a third field that combines " Text1Text2 " without other characters between them
Copy link to clipboard
Copied
If the third field does not need to be editable, you can use a custom calculation script for it that is something like the following:
// Custom calculation script
(function () {
// Get the field values, as strings
var s1 = getField("Text1").valueAsString;
var s2 = getField("Text2").valueAsString;
// Set this field's value by concatenating the two strings
event.value = s1 + s2;
})();
Copy link to clipboard
Copied
TNK
Find more inspiration, events, and resources on the new Adobe Community
Explore Now