I am new to this forms, playing around.
My task form has drop down control (form control snippet)
{ "fieldType": "RestFieldRepresentation", "id": "dropOffLocation", "name": "", "type": "dropdown", "value": "Choose one...", "required": false, "readOnly": false, "overrideId": true, "colspan": 1, "placeholder": null, "minLength": 0, "maxLength": 0, "minValue": null, "maxValue": null, "regexPattern": null, "optionType": "manual", "hasEmptyValue": true, "options": [ { "id": "empty", "name": "Choose one..." }, { "id": "option_1", "name": "New York" }, { "id": "option_2", "name": "New Jersey" } ], "restUrl": null, "restResponsePath": null, "restIdProperty": null, "restLabelProperty": null, "tab": null, "className": null, "params": { "existingColspan": 1, "maxColspan": 1 }, "dateDisplayFormat": null, "layout": { "row": -1, "column": -1, "colspan": 1 }, "sizeX": 1, "sizeY": 1, "row": -1, "col": -1, "visibilityCondition": null, "endpoint": null, "requestHeaders": null }
Using rest api I am trying to set the value for the dropdown.
api/enterprise/task-forms/:taskId/save-form
{ "values": { "firstName" : "test1", "lastName" : "Test3", "dropOffLocation" : "option_1" } }
I was able to set the text field values(firstName and lastName, but not the dropdown(select) values.
What would be format for setting the dropdown values ?
Thanks in advance.
Solved! Go to Solution.
Hi,
You need to provide id and name of option.
Ex.
{ "values": { "firstName" : "test1", "lastName" : "Test3", "country": { "id": "India", "name": "India" } } }
Hi,
You need to provide id and name of option.
Ex.
{ "values": { "firstName" : "test1", "lastName" : "Test3", "country": { "id": "India", "name": "India" } } }
Hi @kdevineni1 & welcome to Alfresco,
Thanks for accepting the solution - helpful to others who have a similar issue.
Take care,
Thank you @sanjaybandhniya
Is there any document or link explaining the json formats for the different types of form controls
Whats the format for saving the hyperlink.
I need to update the hyperlink variable from rest call.
Ask for and offer help to other Alfresco Process Services and Activiti Users and members of the Alfresco team.
By using this site, you are agreeing to allow us to collect and use cookies as outlined in Alfresco’s Cookie Statement and Terms of Use (and you have a legitimate interest in Alfresco and our products, authorizing us to contact you in such methods). If you are not ok with these terms, please do not use this website.