Class SectionHeaderItem
संग्रह की मदद से व्यवस्थित रहें
अपनी प्राथमिकताओं के आधार पर, कॉन्टेंट को सेव करें और कैटगरी में बांटें.
सेक्शनहेडरआइटम
लेआउट आइटम, जो किसी सेक्शन की शुरुआत को विज़ुअल तौर पर दिखाता है. Form
से आइटम ऐक्सेस किए जा सकते हैं या बनाए जा सकते हैं.
// Open a form by ID and add a new section header.
const form = FormApp.openById('1234567890abcdefghijklmnopqrstuvwxyz');
const item = form.addSectionHeaderItem();
item.setTitle('Title of new section');
ज़्यादा जानकारी वाला दस्तावेज़
duplicate()
इस आइटम की कॉपी बनाता है और उसे फ़ॉर्म के आखिर में जोड़ता है.
वापसी का टिकट
SectionHeaderItem
— चेन करने के लिए, इस SectionHeaderItem
का डुप्लीकेट
अनुमति देना
इस तरीके का इस्तेमाल करने वाली स्क्रिप्ट को, इनमें से एक या एक से ज़्यादा स्कोप के लिए अनुमति की ज़रूरत होती है:
-
https://www.googleapis.com/auth/forms.currentonly
-
https://www.googleapis.com/auth/forms
getHelpText()
इससे आइटम का सहायता टेक्स्ट मिलता है. इसे कभी-कभी ImageItems
, PageBreakItems
, और SectionHeaderItems
जैसे लेआउट आइटम के लिए, ब्यौरा टेक्स्ट भी कहा जाता है.
वापसी का टिकट
String
— आइटम का सहायता टेक्स्ट या ब्यौरा
अनुमति देना
इस तरीके का इस्तेमाल करने वाली स्क्रिप्ट को, इनमें से एक या एक से ज़्यादा स्कोप के लिए अनुमति की ज़रूरत होती है:
-
https://www.googleapis.com/auth/forms.currentonly
-
https://www.googleapis.com/auth/forms
getId()
आइटम का यूनीक आइडेंटिफ़ायर पाता है.
वापसी का टिकट
Integer
— आइटम का आईडी
अनुमति देना
इस तरीके का इस्तेमाल करने वाली स्क्रिप्ट को, इनमें से एक या एक से ज़्यादा स्कोप के लिए अनुमति की ज़रूरत होती है:
-
https://www.googleapis.com/auth/forms.currentonly
-
https://www.googleapis.com/auth/forms
getIndex()
फ़ॉर्म में मौजूद सभी आइटम में से, आइटम का इंडेक्स दिखाता है.
वापसी का टिकट
Integer
— आइटम का इंडेक्स
अनुमति देना
इस तरीके का इस्तेमाल करने वाली स्क्रिप्ट को, इनमें से एक या एक से ज़्यादा स्कोप के लिए अनुमति की ज़रूरत होती है:
-
https://www.googleapis.com/auth/forms.currentonly
-
https://www.googleapis.com/auth/forms
getTitle()
आइटम का टाइटल दिखाता है. SectionHeaderItem
के मामले में, इसे हेडर टेक्स्ट भी कहा जाता है.
वापसी का टिकट
String
— आइटम का टाइटल या हेडर टेक्स्ट
अनुमति देना
इस तरीके का इस्तेमाल करने वाली स्क्रिप्ट को, इनमें से एक या एक से ज़्यादा स्कोप के लिए अनुमति की ज़रूरत होती है:
-
https://www.googleapis.com/auth/forms.currentonly
-
https://www.googleapis.com/auth/forms
getType()
आइटम का टाइप दिखाता है. इसे ItemType
के तौर पर दिखाया जाता है.
वापसी का टिकट
ItemType
— आइटम का टाइप
अनुमति देना
इस तरीके का इस्तेमाल करने वाली स्क्रिप्ट को, इनमें से एक या एक से ज़्यादा स्कोप के लिए अनुमति की ज़रूरत होती है:
-
https://www.googleapis.com/auth/forms.currentonly
-
https://www.googleapis.com/auth/forms
setHelpText(text)
आइटम का सहायता टेक्स्ट सेट करता है. इसे कभी-कभी ImageItems
, PageBreakItems
, और SectionHeaderItems
जैसे लेआउट आइटम के लिए, ब्यौरा टेक्स्ट भी कहा जाता है.
पैरामीटर
नाम | टाइप | ब्यौरा |
text | String | नया सहायता टेक्स्ट |
वापसी का टिकट
SectionHeaderItem
— चेन बनाने के लिए यह SectionHeaderItem
अनुमति देना
इस तरीके का इस्तेमाल करने वाली स्क्रिप्ट को, इनमें से एक या एक से ज़्यादा स्कोप के लिए अनुमति की ज़रूरत होती है:
-
https://www.googleapis.com/auth/forms.currentonly
-
https://www.googleapis.com/auth/forms
setTitle(title)
इससे आइटम का टाइटल सेट होता है. SectionHeaderItem
के मामले में, इसे हेडर टेक्स्ट भी कहा जाता है.
पैरामीटर
नाम | टाइप | ब्यौरा |
title | String | नया टाइटल या हेडर टेक्स्ट |
वापसी का टिकट
SectionHeaderItem
— चेन बनाने के लिए यह SectionHeaderItem
अनुमति देना
इस तरीके का इस्तेमाल करने वाली स्क्रिप्ट को, इनमें से एक या एक से ज़्यादा स्कोप के लिए अनुमति की ज़रूरत होती है:
-
https://www.googleapis.com/auth/forms.currentonly
-
https://www.googleapis.com/auth/forms
जब तक कुछ अलग से न बताया जाए, तब तक इस पेज की सामग्री को Creative Commons Attribution 4.0 License के तहत और कोड के नमूनों को Apache 2.0 License के तहत लाइसेंस मिला है. ज़्यादा जानकारी के लिए, Google Developers साइट नीतियां देखें. Oracle और/या इससे जुड़ी हुई कंपनियों का, Java एक रजिस्टर किया हुआ ट्रेडमार्क है.
आखिरी बार 2025-07-26 (UTC) को अपडेट किया गया.
[null,null,["आखिरी बार 2025-07-26 (UTC) को अपडेट किया गया."],[[["\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,["# Class SectionHeaderItem\n\nSectionHeaderItem\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\n### Methods\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\n### `duplicate()`\n\nCreates a copy of this item and appends it to the end of the form.\n\n#### Return\n\n\n[SectionHeaderItem](#) --- a duplicate of this [SectionHeaderItem](#), for chaining\n\n#### Authorization\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()`\n\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\n#### Return\n\n\n`String` --- the item's help text or description text\n\n#### Authorization\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()`\n\nGets the item's unique identifier.\n\n#### Return\n\n\n`Integer` --- the item's ID\n\n#### Authorization\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()`\n\nGets the index of the item among all the items in the form.\n\n#### Return\n\n\n`Integer` --- the index of the item\n\n#### Authorization\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()`\n\nGets the item's title (sometimes called header text, in the case of a [SectionHeaderItem](#)).\n\n#### Return\n\n\n`String` --- the item's title or header text\n\n#### Authorization\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()`\n\nGets the item's type, represented as an [ItemType](/apps-script/reference/forms/item-type).\n\n#### Return\n\n\n[ItemType](/apps-script/reference/forms/item-type) --- the item's type\n\n#### Authorization\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)`\n\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\n#### Parameters\n\n| Name | Type | Description |\n|--------|----------|-------------------|\n| `text` | `String` | the new help text |\n\n#### Return\n\n\n[SectionHeaderItem](#) --- this [SectionHeaderItem](#), for chaining\n\n#### Authorization\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)`\n\nSets the item's title (sometimes called header text, in the case of a [SectionHeaderItem](#)).\n\n#### Parameters\n\n| Name | Type | Description |\n|---------|----------|------------------------------|\n| `title` | `String` | the new title or header text |\n\n#### Return\n\n\n[SectionHeaderItem](#) --- this [SectionHeaderItem](#), for chaining\n\n#### Authorization\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`"]]