We have created a form using the form builder and the form has a section with bunch of check box options. We have an http service that
will return list of values based on which we have to decide whether to check/uncheck the check boxes. Below are screen shots showing
the checkboxes in the forms and also screen shot of the action that i am trying to use to determine if checkbox should be checked or not.
The problem with the action that i have defined is that the form runner is replacing my whole checkbox selection with only the list that i am
sending back from the service. For example i want First Choice and third choice selected the http service will be returning
And when i generate a form the section is now just showing First choice and third choice and the check box are not selected. But the requirement is that I should see all the four choices and based on the service values i should see the first and the third choice selected. Can you please suggest if there are any other alternate approaches to fulfill this requirement?
In the Actions Editor, your screenshot doesn't show that part, but I imagine that you used the section "Set Response Selection Control Items". That part is for replacing the choices the user can make, not the choice(s) she made. It seems you're aiming for the latter, so you should use "Set Response Control Values", and in your case the XPath expression should return "1 3", if you want the first and third item to be checked. So you can either change the service to return that, or make the expression be string-join(/test/checkboxList/value, ' '). You'll let us know if this works for you,
Follow Orbeon on Twitter: @orbeon
Follow me on Twitter: @avernet