smacdonald2008 - Are you able to query this with the dev team please?
The use case I have is to add more than one value entered by a user from a custom widget to the guide state.
The problem I have is I can only set "_value" via the getCommitValue of my custom widget, in total I need to store 3 values:
1) The value of the range slider (1-100)
2) A comment from a textbox within the same widget
3) The value of a radio button to say if the question is N/A
The custom widget easily allow me to store one of these values, but I cannot see an easy way to store multiple/custom values.
Workarounds that I have tried so far include:
1) Representing 'N/A' as -1 value on the slider - this worked but doesn't cater for the comments.
2) I can store a stringified JSON object in _value containing all 3 values, and parse it in getOptionsMap. This works, but is pretty hacky.
Ideally I would have an example that shows how I can add custom properties to the guidestate e.g.
guidecustomwidget:{
"jcr:title":"Question 1"
"name": "Q1
.....
"_value": "Value from the slider".
"applicable":true/false,
"comment":"Text entered in the comment textbox"
}
Thanks,
James