Question

Add multi-line text to ContactProfileSchema

I have customized the ContactProfileSchema to display some additional data about the contact (the full address). Everything is working, however I want to display this as multi-line text.

My element in the diff array is always rendered as a readonly input which doesn't allow for multiple lines. I have added rowSpan with no luck, it is always rendered in the html as an input instead of a textarea. 

Is there something I can add to the diff element to force it to render as a textarea so I can add my multi-line text to it?

My diff element looks like this:

{
	"operation": "insert",
	"name": "Address",
	"parentName": "ProfileContentContainer",
	"propertyName": "items",
	"values": {
		"bindTo": "FullAddress",
		"enabled": false,
		"caption": { "bindTo": "Resources.Strings.AddressLabel" }
		"layout": {
			"column": 4,
			"row": 5,
			"colSpan": 20,
			"rowSpan": 4
		}
	}
}

(FullAddress is a virtual attribute with Terrasoft.DataValueType.TEXT I am binding it to and setting that with my multi-line text). All is working except I can't figure out how to force it to render as a textarea instead of an input.

Basically, how to I create manually a multi-line text element in the diff? I can't see anything different about how the page designer in the section wizard adds when you check the multi-line text checkbox. 

Any ideas appreciated.

Thanks.

Like 1

Like

2 comments

Hello Ryan,



You need to specify content type and rowspan for your field. You can check what content types exist by following this link: https://academy.bpmonline.com/api/jscoreapi/7.12.0/index.html#!/api/Ter….



In your case code will look like the following:

{
	"operation": "insert",
	"name": "Address",
	"parentName": "ProfileContentContainer",
	"propertyName": "items",
	"values": {
		"bindTo": "FullAddress",
		"enabled": true,
		"caption": { "bindTo": "Resources.Strings.AddressLabel" },
        "contentType": 0,
		"layout": {
			"column": 4,
			"row": 5,
			"colSpan": 20,
			"rowSpan": 4
		}
	}
}

Best wishes,

Alex

Alex_Tim,

That worked perfect. Thank you so much!

Ryan

Show all comments