1
0
-1

I am having two pages and a data driven check box in second page which is getting a value from a data field from the first page. On load of the second page all the options in the check box have to be pre-selected or some option need to be pre-selected. How can we do this?.
Kindly help to assists on this.


Thanks.

    CommentAdd your comment...

    1 answer

    1.  
      1
      0
      -1

      Hi,

      You can directly set the value of individual options on the data object as true/false.

      For example, if you have this code in a form load rule, the BMW option will be checked:

      data.$myDataField = [
      {label: "BMW"},
      {label: "Honda"},
      {label: "Suzuki"}
      ];

      data.datadrivenCheckboxGroup = {};
      data.datadrivenCheckboxGroup['BMW'] = true;

      (The data item data.datadrivenCheckboxGroup will initially be an empty string, so it needs to be changed to an object before setting any property values on it)

        CommentAdd your comment...