79757561

Date: 2025-09-06 13:07:41
Score: 1
Natty:
Report link
Your expected value is not possible since the getResponse() method returns an array of arrays (a two-dimensional array), just like @Wicket said.

When you submit a form, the FormResponse object contains all your responses. To get the answer for a specific form item, like a CHECKBOX_GRID, you use the getItemResponses() method on the FormResponse object.

The key to a CHECKBOX_GRID is that the getResponse() method returns an array of arrays, not a simple string or a flat array of strings. Each inner array corresponds to a row in the grid and contains the column titles of the selected options for that specific row.

For example, a grid with rows "X-Small," "Small," and "Medium," and columns "White" and "Navy."

If you selects "Navy" for the "X-Small" row, selects nothing for the "Small" row, and selects both "White" and "Navy" for the "Medium" row, the getResponse() method would return: [['Navy'], [], ['White', 'Navy']] or as string Navy,,White,Navy.

Reasons:
  • Long answer (-1):
  • No code block (0.5):
  • User mentioned (1): @Wicket
  • Low reputation (0.5):
Posted by: Jats PPG