Creating a content fragment programmatically, it is successful apart from the creation of a multi-field where i
Using this as a reference:
https://developer.adobe.com/experience-manager/reference-materials/6-5/assets-api-content-fragments/...
How can I input a multi field text? as seen below:
The data type is 'single line text', and it renders as 'Multiple Field' in my content fragment model.
for instance a single field is just:
"{elementName}": {
"value": "<p>The HTML content of the element.</p>",
":type": "text/html",
How would a multiple field text look like if sending a POST? That is dynamic for the size, such as the number of inputs or elements within.
I currently have it looking like this:
So it looks like 'Test1, Test2, Test3' on the same field, rather than:
each being its own field
Solved! Go to Solution.
Views
Replies
Total Likes
Hi,
You just need to append the values in the "value" field. Something like below:
{
"properties": {
"cq:model": "/conf/myFolderToCF/settings/dam/cfm/models/demotest",
"title": "my content fragment from postman",
"description": "my test",
"elements": {
"myTextFieldName": {
":type": "string",
"value": [
"1",
"2",
"3"
]
}
}
}
}
The trick is to first GET a created CF using the Assets API and check how the values are being stored.
Hope this helps.
Hi,
You just need to append the values in the "value" field. Something like below:
{
"properties": {
"cq:model": "/conf/myFolderToCF/settings/dam/cfm/models/demotest",
"title": "my content fragment from postman",
"description": "my test",
"elements": {
"myTextFieldName": {
":type": "string",
"value": [
"1",
"2",
"3"
]
}
}
}
}
The trick is to first GET a created CF using the Assets API and check how the values are being stored.
Hope this helps.
Views
Likes
Replies