Hello,
you can try this :
function addText(executionContext) {
var formContext = executionContext.getFormContext();
var textToAdd1 = "Text 1";
var textToAdd2 = "Text 2";
var textToAdd3 = "Text 3";
if (formContext.getAttribute("fieldname").getValue() != null) {
formContext.getAttribute("fieldname").setValue(formContext.getAttribute("fieldname").getValue() " \n" textToAdd1 "\n" textToAdd2 " \n" textToAdd3);
}
}
And also please make sure that the function name on your form event handler is the same as on your webresource.
(if this answer helps, please mark it as verified)