Class CheckboxGridValidation
CheckboxGridValidation
בדיקת תקינות נתונים של CheckboxGridItem
.
// Add a checkbox grid item to a form and require one response per column.
const form = FormApp.openById('123abc');
const checkboxGridItem = form.addCheckboxGridItem();
checkboxGridItem.setTitle('Where did you celebrate New Years?')
.setRows(['New York', 'San Francisco', 'London'])
.setColumns(['2014', '2015', '2016', '2017']);
const checkboxGridValidation = FormApp.createCheckboxGridValidation()
.setHelpText('Select one item per column.')
.requireLimitOneResponsePerColumn()
.build();
checkboxGridItem.setValidation(checkboxGridValidation);
אלא אם צוין אחרת, התוכן של דף זה הוא ברישיון Creative Commons Attribution 4.0 ודוגמאות הקוד הן ברישיון Apache 2.0. לפרטים, ניתן לעיין במדיניות האתר Google Developers. Java הוא סימן מסחרי רשום של חברת Oracle ו/או של השותפים העצמאיים שלה.
עדכון אחרון: 2024-12-22 (שעון UTC).
[null,null,["עדכון אחרון: 2024-12-22 (שעון UTC)."],[[["`CheckboxGridValidation` is used to set validation rules specifically for `CheckboxGridItem` within Google Forms."],["It allows you to enforce constraints like requiring exactly one response per column in a checkbox grid, enhancing data integrity and user experience."],["You can customize the validation with help text to guide users on expected input."]]],["This content demonstrates creating and validating a checkbox grid item within a form. It outlines adding a checkbox grid with titles, rows (e.g., \"New York\"), and columns (e.g., \"2014\"). The example then builds a `CheckboxGridValidation` to enforce a limit of one response per column, including setting custom help text. Finally, it applies this validation to the checkbox grid, ensuring responses adhere to the set criteria.\n"]]