Reference › SmartApp › Page › Section › ParagraphSetting
A paragraph setting displays text on a page. It's typically used for instructional information. If the i18n framework is used then normally only the name is specified:
section.paragraphSetting('instructionalText')
and the heading and body of the paragraph element are set in the localization file:
"pages.page1.settings.instructionalText.name": "Paragraph Heading",
"pages.page1.settings.instructionalText.description": "Paragraph text lorem ipsum dolor"
If i18n localization is not being used then the name and body of the text can be set explicitly:
section.paragraphSetting('instructionalText')
.name('Paragraph Heading')
.description('Paragraph text lorem ipsum dolor')
▸ defaultValue(value
: string | number): ParagraphSetting
Inherited from SectionSetting.defaultValue
Sets the initial value displayed in the setting when first shown to the user.
Parameters:
Name | Type |
---|---|
value |
string | number |
Returns: ParagraphSetting
▸ description(value
: string): ParagraphSetting
Inherited from SectionSetting.description
Sets value displayed in the setting control. Defaults to 'Tap to Set' for most types of settings.
Parameters:
Name | Type |
---|---|
value |
string |
Returns: ParagraphSetting
▸ disabled(value
: boolean): ParagraphSetting
Inherited from SectionSetting.disabled
Disables the ability to use the control
Parameters:
Name | Type |
---|---|
value |
boolean |
Returns: ParagraphSetting
▸ image(source
: string): ParagraphSetting
Specify an image URL to display with this setting
Parameters:
Name | Type | Description |
---|---|---|
source |
string | HTTPS url or Base64-encoded data URI. Max length 2048 characters. |
Returns: ParagraphSetting
▸ name(value
: string): ParagraphSetting
Inherited from SectionSetting.name
Sets the name of this setting. Used to reference the setting value during the processing of events. Also used as part of the i18n key for translating the displayed name and description of the setting. All settings on a page must have unique names.
Parameters:
Name | Type |
---|---|
value |
string |
Returns: ParagraphSetting
▸ required(value
: boolean): ParagraphSetting
Inherited from SectionSetting.required
Specifies that the control must be set in order to save the configuration page
Parameters:
Name | Type |
---|---|
value |
boolean |
Returns: ParagraphSetting
▸ submitOnChange(value
: boolean): ParagraphSetting
Inherited from SectionSetting.submitOnChange
Causes the page to be submitted and re-rendered any time the value of the setting is changed, rather than requiring the user to tap Next or Done. This behavior is useful when the the presence or enabled/disabled status of some settings depend on the value of other settings.
Parameters:
Name | Type |
---|---|
value |
boolean |
Returns: ParagraphSetting
▸ text(value
: string): ParagraphSetting
Sets the paragraph text. Normally not used if the i18n framework is being used.
Parameters:
Name | Type |
---|---|
value |
string |
Returns: ParagraphSetting
▸ translateDefaultValue(value
: string): ParagraphSetting
Inherited from SectionSetting.translateDefaultValue
Sets the initial value of the setting by passing the specified value through the i18n translation process.
You might want to use translatedDefaultValue
rather than defaultValue
in a case like setting the
default value of a text setting to the word "Kitchen" in the language of the user. defaultValue('Kitchen')
will set the value "Kitchen" regardless of the user's language or whether there were localization file entries
for the key "Kitchen". However, translateDefaultValue('Kitchen')
will look for a localization file entry
with the key "Kitchen" and set the default to that value.
Parameters:
Name | Type |
---|---|
value |
string |
Returns: ParagraphSetting