با مجموعهها، منظم بمانید ذخیره و طبقهبندی محتوا براساس اولویتهای شما.
مورد سرصفحه بخش
یک آیتم طرح بندی که به صورت بصری شروع یک بخش را نشان می دهد. آیتم ها را می توان از یک Form مشاهده کرد یا ایجاد کرد.
// Open a form by ID and add a new section header.constform=FormApp.openById('1234567890abcdefghijklmnopqrstuvwxyz');constitem=form.addSectionHeaderItem();item.setTitle('Title of new section');
تاریخ آخرین بهروزرسانی 2025-07-24 بهوقت ساعت هماهنگ جهانی.
[[["درک آسان","easyToUnderstand","thumb-up"],["مشکلم را برطرف کرد","solvedMyProblem","thumb-up"],["غیره","otherUp","thumb-up"]],[["اطلاعاتی که نیاز دارم وجود ندارد","missingTheInformationINeed","thumb-down"],["بیشازحد پیچیده/ مراحل بسیار زیاد","tooComplicatedTooManySteps","thumb-down"],["قدیمی","outOfDate","thumb-down"],["مشکل ترجمه","translationIssue","thumb-down"],["مشکل کد / نمونهها","samplesCodeIssue","thumb-down"],["غیره","otherDown","thumb-down"]],["تاریخ آخرین بهروزرسانی 2025-07-24 بهوقت ساعت هماهنگ جهانی."],[[["\u003cp\u003eA \u003ccode\u003eSectionHeaderItem\u003c/code\u003e visually separates sections within a Google Form, enhancing organization and readability for respondents.\u003c/p\u003e\n"],["\u003cp\u003eYou can programmatically add, duplicate, and modify \u003ccode\u003eSectionHeaderItems\u003c/code\u003e using Apps Script methods like \u003ccode\u003esetTitle()\u003c/code\u003e, \u003ccode\u003esetHelpText()\u003c/code\u003e, and \u003ccode\u003eduplicate()\u003c/code\u003e.\u003c/p\u003e\n"],["\u003cp\u003e\u003ccode\u003eSectionHeaderItems\u003c/code\u003e provide methods to retrieve their properties, such as \u003ccode\u003egetTitle()\u003c/code\u003e, \u003ccode\u003egetHelpText()\u003c/code\u003e, \u003ccode\u003egetId()\u003c/code\u003e, \u003ccode\u003egetIndex()\u003c/code\u003e, and \u003ccode\u003egetType()\u003c/code\u003e.\u003c/p\u003e\n"],["\u003cp\u003eAuthorization with specific scopes like \u003ccode\u003ehttps://www.googleapis.com/auth/forms\u003c/code\u003e is necessary when using Apps Script to interact with \u003ccode\u003eSectionHeaderItems\u003c/code\u003e and other form elements.\u003c/p\u003e\n"]]],[],null,["SectionHeaderItem\n\nA layout item that visually indicates the start of a section. Items can be accessed or created\nfrom a [Form](/apps-script/reference/forms/form).\n\n```javascript\n// Open a form by ID and add a new section header.\nconst form = FormApp.openById('1234567890abcdefghijklmnopqrstuvwxyz');\nconst item = form.addSectionHeaderItem();\nitem.setTitle('Title of new section');\n``` \n\nMethods\n\n| Method | Return type | Brief description |\n|-------------------------------------------|----------------------------------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| [duplicate()](#duplicate()) | [SectionHeaderItem](#) | Creates a copy of this item and appends it to the end of the form. |\n| [getHelpText()](#getHelpText()) | `String` | Gets the item's help text (sometimes called description text for layout items like [ImageItems](/apps-script/reference/forms/image-item), [PageBreakItems](/apps-script/reference/forms/page-break-item), and [SectionHeaderItems](#)). |\n| [getId()](#getId()) | `Integer` | Gets the item's unique identifier. |\n| [getIndex()](#getIndex()) | `Integer` | Gets the index of the item among all the items in the form. |\n| [getTitle()](#getTitle()) | `String` | Gets the item's title (sometimes called header text, in the case of a [SectionHeaderItem](#)). |\n| [getType()](#getType()) | [ItemType](/apps-script/reference/forms/item-type) | Gets the item's type, represented as an [ItemType](/apps-script/reference/forms/item-type). |\n| [setHelpText(text)](#setHelpText(String)) | [SectionHeaderItem](#) | Sets the item's help text (sometimes called description text for layout items like [ImageItems](/apps-script/reference/forms/image-item), [PageBreakItems](/apps-script/reference/forms/page-break-item), and [SectionHeaderItems](#)). |\n| [setTitle(title)](#setTitle(String)) | [SectionHeaderItem](#) | Sets the item's title (sometimes called header text, in the case of a [SectionHeaderItem](#)). |\n\nDetailed documentation \n\n`duplicate()` \nCreates a copy of this item and appends it to the end of the form.\n\nReturn\n\n\n[SectionHeaderItem](#) --- a duplicate of this [SectionHeaderItem](#), for chaining\n\nAuthorization\n\nScripts that use this method require authorization with one or more of the following [scopes](/apps-script/concepts/scopes#setting_explicit_scopes):\n\n- `https://www.googleapis.com/auth/forms.currentonly`\n- `https://www.googleapis.com/auth/forms`\n\n*** ** * ** ***\n\n`get``Help``Text()` \nGets the item's help text (sometimes called description text for layout items like [ImageItems](/apps-script/reference/forms/image-item), [PageBreakItems](/apps-script/reference/forms/page-break-item), and [SectionHeaderItems](#)).\n\nReturn\n\n\n`String` --- the item's help text or description text\n\nAuthorization\n\nScripts that use this method require authorization with one or more of the following [scopes](/apps-script/concepts/scopes#setting_explicit_scopes):\n\n- `https://www.googleapis.com/auth/forms.currentonly`\n- `https://www.googleapis.com/auth/forms`\n\n*** ** * ** ***\n\n`get``Id()` \nGets the item's unique identifier.\n\nReturn\n\n\n`Integer` --- the item's ID\n\nAuthorization\n\nScripts that use this method require authorization with one or more of the following [scopes](/apps-script/concepts/scopes#setting_explicit_scopes):\n\n- `https://www.googleapis.com/auth/forms.currentonly`\n- `https://www.googleapis.com/auth/forms`\n\n*** ** * ** ***\n\n`get``Index()` \nGets the index of the item among all the items in the form.\n\nReturn\n\n\n`Integer` --- the index of the item\n\nAuthorization\n\nScripts that use this method require authorization with one or more of the following [scopes](/apps-script/concepts/scopes#setting_explicit_scopes):\n\n- `https://www.googleapis.com/auth/forms.currentonly`\n- `https://www.googleapis.com/auth/forms`\n\n*** ** * ** ***\n\n`get``Title()` \nGets the item's title (sometimes called header text, in the case of a [SectionHeaderItem](#)).\n\nReturn\n\n\n`String` --- the item's title or header text\n\nAuthorization\n\nScripts that use this method require authorization with one or more of the following [scopes](/apps-script/concepts/scopes#setting_explicit_scopes):\n\n- `https://www.googleapis.com/auth/forms.currentonly`\n- `https://www.googleapis.com/auth/forms`\n\n*** ** * ** ***\n\n`get``Type()` \nGets the item's type, represented as an [ItemType](/apps-script/reference/forms/item-type).\n\nReturn\n\n\n[ItemType](/apps-script/reference/forms/item-type) --- the item's type\n\nAuthorization\n\nScripts that use this method require authorization with one or more of the following [scopes](/apps-script/concepts/scopes#setting_explicit_scopes):\n\n- `https://www.googleapis.com/auth/forms.currentonly`\n- `https://www.googleapis.com/auth/forms`\n\n*** ** * ** ***\n\n`set``Help``Text(text)` \nSets the item's help text (sometimes called description text for layout items like [ImageItems](/apps-script/reference/forms/image-item), [PageBreakItems](/apps-script/reference/forms/page-break-item), and [SectionHeaderItems](#)).\n\nParameters\n\n| Name | Type | Description |\n|--------|----------|-------------------|\n| `text` | `String` | the new help text |\n\nReturn\n\n\n[SectionHeaderItem](#) --- this [SectionHeaderItem](#), for chaining\n\nAuthorization\n\nScripts that use this method require authorization with one or more of the following [scopes](/apps-script/concepts/scopes#setting_explicit_scopes):\n\n- `https://www.googleapis.com/auth/forms.currentonly`\n- `https://www.googleapis.com/auth/forms`\n\n*** ** * ** ***\n\n`set``Title(title)` \nSets the item's title (sometimes called header text, in the case of a [SectionHeaderItem](#)).\n\nParameters\n\n| Name | Type | Description |\n|---------|----------|------------------------------|\n| `title` | `String` | the new title or header text |\n\nReturn\n\n\n[SectionHeaderItem](#) --- this [SectionHeaderItem](#), for chaining\n\nAuthorization\n\nScripts that use this method require authorization with one or more of the following [scopes](/apps-script/concepts/scopes#setting_explicit_scopes):\n\n- `https://www.googleapis.com/auth/forms.currentonly`\n- `https://www.googleapis.com/auth/forms`"]]