Skip to content

Commit 63424b6

Browse files
committed
Update text area
1 parent d81a34f commit 63424b6

3 files changed

Lines changed: 131 additions & 88 deletions

File tree

content/en/docs/refguide/modeling/pages/input-widgets/text-area.md

Lines changed: 130 additions & 87 deletions
Original file line numberDiff line numberDiff line change
@@ -16,64 +16,149 @@ For example, the following text area allows the end-user to see, and set, the **
1616

1717
{{< figure src="/attachments/refguide/modeling/pages/input-widgets/text-area/text-area.png" >}}
1818

19-
## 2 Properties
19+
## 2 Properties Pane
2020

21-
An example of text area properties is represented in the image below:
21+
The properties pane is divided into two major sections by a toggle at the top of the pane: **Properties** and **Styling**. Text area properties consist of the following sections:
2222

23-
{{< figure src="/attachments/refguide/modeling/pages/input-widgets/text-area/text-area-properties.png" width="250" >}}
24-
25-
Text area properties consist of the following sections:
26-
27-
* [Common](#common)
28-
* [Data source](#data-source)
29-
* [Design Properties](#design-properties)
30-
* [Editability](#editability)
31-
* [Events](#events)
23+
Properties:
3224
* [General](#general)
25+
* [Data source](#data-source)
3326
* [Label](#label)
34-
* [Validation](#validation)
27+
* [Editability](#editability)
3528
* [Visibility](#visibility)
29+
* [Validation](#validation)
30+
* [Accessibility](#accessibility)
31+
* [Common](#common)
32+
* [Events](#events)
33+
* [On Change Behavior](#on-change-behavior)
3634

37-
### 2.1 Common Section{#common}
35+
Styling:
36+
* [Design Properties](#design-properties)
37+
* [Common](#common-styling)
3838

39-
{{% snippet file="/static/_includes/refguide/common-section-link.md" %}}
4039

41-
### 2.2 Data Source Section{#data-source}
40+
## 3 Properties
41+
42+
### 3.1 General Section{#general}
43+
44+
#### 3.1.1 Grow Automatically
45+
46+
{{% alert color="info" %}}The grow automatically property does not impact the behavior of native mobile pages. On iOS, the text area will always grow automatically
47+
{{% /alert %}}
48+
49+
This property defines whether the text area grows automatically depending on the amount of text in it.
50+
51+
Default: *No*
52+
53+
#### 3.1.2 Number of Lines
54+
55+
**Number of lines** determines the size of the text area, based on the height of the lines. If the text in the text area contains more lines, a scroll bar will enable the end-user to see it all. This property is only used if **Grow automatically** is set to *No*.
56+
57+
Default: *5*
58+
59+
#### 3.1.3 Counter Message
60+
61+
{{% alert color="info" %}}Counter message is not supported on native mobile pages.{{% /alert %}}
62+
63+
This is the text displayed when typing in the text area. This text has two [parameters](/refguide/text/#parameters). The first parameter contains the number of characters already typed and the second parameter contains the maximum number of characters.
64+
65+
For example, if you use the counter message `You've used {1} characters of the {2} characters that are allowed.` for your text area, the end-user will see this message displayed below the text area widget:
66+
67+
{{< figure src="/attachments/refguide/modeling/pages/input-widgets/text-area/counter-message.png" >}}
68+
69+
#### 3.1.4 Text Too Long Message
70+
71+
{{% alert color="info" %}}Text too long message is not supported on native mobile pages.{{% /alert %}}
72+
73+
This is the text displayed when the number of characters is higher than the maximum allowed number of characters.
74+
75+
This type of message can also occur when a loaded or stored value exceeds the character limit
76+
77+
#### 3.1.5 Maximum Length
78+
79+
This property specifies the maximum number of characters that can be typed in this text area.
80+
81+
| Value | Description |
82+
| --- | --- |
83+
| Attribute length *(default)* | The maximum number of characters is the same as the maximum length of the connected attribute |
84+
| Unlimited | The maximum number of characters is unlimited |
85+
| Custom | The maximum number of characters is specified in the widget properties |
86+
87+
#### 3.1.6 Placeholder Text
88+
89+
The placeholder text is shown when no text has been entered yet, or when a displayed attribute is empty.
90+
91+
It can be used, for example, to give a hint to the end-user what kind of text should be entered.
92+
93+
#### 3.1.7 Autocomplete
94+
95+
The autocomplete property specifies if a text area should have autocomplete enabled. The autocomplete attribute also improves mobile devices' ability to pre-populate fields.
96+
97+
{{% alert color="info" %}}This option is only available in native pages.{{% /alert %}}
98+
{{% alert color="info" %}}In Android when autocomplete is turned off it will remove support for new lines.{{% /alert %}}
99+
100+
#### 3.1.8 AutoFocus {#autofocus}
101+
102+
If `true`, the text area will be rendered focused with the device keyboard opened.
103+
104+
{{% alert color="info" %}}
105+
This option is only available in native pages.
106+
{{% /alert %}}
107+
108+
### 3.2 Data Source Section{#data-source}
42109

43110
{{% snippet file="/static/_includes/refguide/data-source-section-link.md" %}}
44111

45-
### 2.3 Design Properties Section{#design-properties}
112+
### 3.3 Label Section{#label}
46113

47-
{{% snippet file="/static/_includes/refguide/design-section-link.md" %}}
114+
{{% snippet file="/static/_includes/refguide/label-section-link.md" %}}
48115

49-
### 2.4 Editability Section{#editability}
116+
### 3.4 Editability Section{#editability}
50117

51118
{{% snippet file="/static/_includes/refguide/editability-section-link.md" %}}
52119

53-
### 2.5 Events Section{#events}
120+
### 3.5 Visibility Section{#visibility}
121+
122+
{{% snippet file="/static/_includes/refguide/visibility-section-link.md" %}}
123+
124+
### 3.6 Validation Section{#validation}
125+
126+
{{% snippet file="/static/_includes/refguide/widget-validation-link.md" %}}
127+
128+
### 3.7 Accessibility Section{#accessibility}
129+
130+
### 3.7.1 Aria Required
54131

55-
#### 2.5.1 On Change{#on-change}
132+
In a text area widget, when **Aria required** is set to **Yes** then assistive technologies will read out the field that is required. When set to **No** then assistive technologies will not read the field out.
133+
134+
### 3.8 Common Section{#common}
135+
136+
{{% snippet file="/static/_includes/refguide/common-section-link.md" %}}
137+
138+
### 3.9 Events Section{#events}
139+
140+
#### 3.9.1 On Change{#on-change}
56141

57142
The on change property specifies an action that will be executed when leaving the widget, either by using the <kbd>Tab</kbd> key or by clicking another widget after the value has been changed.
58143

59144
{{% snippet file="/static/_includes/refguide/events-section-link.md" %}}
60145

61-
#### 2.5.2 On Change Behavior
146+
#### 3.9.2 On Change Behavior
62147

63148
The on change behavior property lets users select how **on change** is handled in Studio Pro via the following options:
64149

65150
* **When user leaves input field (Default)**
66151
* **While user is entering data**
67152

68-
##### 2.5.2.1 When User Leaves Input Field (Default)
153+
##### 3.9.2.1 When User Leaves Input Field (Default)
69154

70155
Text area will apply changes when a value is different than a previously saved value in the database and the following condition is met:
71156

72157
* Blurred: this will trigger on change and on leave events
73158

74159
This means that there is no way for users to trigger an on change event while typing. To address that use case, please use the second option: [While user is entering data](#user-enters-data).
75160

76-
##### 2.5.2.2 While User is Entering Data {#user-enters-data}
161+
##### 3.9.2.2 While User is Entering Data {#user-enters-data}
77162

78163
This option allows users to trigger an on change event while they are typing.
79164

@@ -86,99 +171,57 @@ With **While user is entering data**, users can adjust one more property called
86171

87172
{{% snippet file="/static/_includes/refguide/events-section-link.md" %}}
88173

89-
#### 2.5.3 On Enter
174+
#### 3.9.3 On Enter
90175

91176
The on enter property specifies an action that will be executed when the widget is entered, either by using the <kbd>Tab</kbd> key or by clicking it.
92177

93178
{{% snippet file="/static/_includes/refguide/events-section-link.md" %}}
94179

95-
#### 2.5.4 On Leave
180+
#### 3.9.4 On Leave
96181

97182
The on leave property specifies an action that will be executed when leaving the widget, either by using the <kbd>Tab</kbd> key or by clicking another widget.
98183

99184
This differs from the [on change](#on-change) property in that the event will always be triggered, even if the value has not been changed.
100185

101186
{{% snippet file="/static/_includes/refguide/events-section-link.md" %}}
102187

103-
### 2.6 General Section{#general}
188+
### 3.10 On Change Behavior {#on-change-behavior}
104189

105-
#### 2.6.1 Grow Automatically
190+
### 3.10 On Change Behavior {#on-change-behavior}
106191

107-
{{% alert color="info" %}}The grow automatically property does not impact the behavior of native mobile pages. On iOS, the text area will always grow automatically
108-
{{% /alert %}}
192+
The On Change Behavior property lets users select how **on change** is handled via the following options Studio Pro:
109193

110-
This property defines whether the text area grows automatically depending on the amount of text in it.
194+
* When user leaves input field (Default)
195+
* While user is entering data
111196

112-
Default: *No*
197+
##### 3.10.1 When user leaves input field (Default)
113198

114-
#### 2.6.2 Number of Lines
199+
This option will work as in previous versions of Studio Pro. Text area will apply changes when a value is not the same as previously saved value in the database and one of the following conditions is met:
115200

116-
**Number of lines** determines the size of the text area, based on the height of the lines. If the text in the text area contains more lines, a scroll bar will enable the end-user to see it all. This property is only used if **Grow automatically** is set to *No*.
201+
* On enter key pressed: This will trigger on change and on enter key press events
202+
* Blurred: This will trigger on change and on leave events
117203

118-
Default: *5*
204+
This means that there is no way for users to trigger an on change event while typing. That use case requires the second option: **While user is entering data**.
119205

120-
#### 2.6.3 Counter Message
206+
##### 3.10.2 While user is entering data
121207

122-
{{% alert color="info" %}}Counter message is not supported on native mobile pages.{{% /alert %}}
123-
124-
This is the text displayed when typing in the text area. This text has two [parameters](/refguide/text/#parameters). The first parameter contains the number of characters already typed and the second parameter contains the maximum number of characters.
208+
This option allows makes it so users trigger an on change event while they are typing. Text area will save changes when the value is not the same as the previously saved value in the database and if the last change made took place after the configured **Apply after (ms)** length of time.
125209

126-
For example, if you use the counter message `You've used {1} characters of the {2} characters that are allowed.` for your text area, the end-user will see this message displayed below the text area widget:
210+
With **While user is entering data**, users now can adjust one more property called **Apply after (ms)** (described above). This will reduce the amount of the calls made for an on change event, thus improving app performance.
127211

128-
{{< figure src="/attachments/refguide/modeling/pages/input-widgets/text-area/counter-message.png" >}}
129-
130-
#### 2.6.4 Text Too Long Message
131-
132-
{{% alert color="info" %}}Text too long message is not supported on native mobile pages.{{% /alert %}}
133-
134-
This is the text displayed when the number of characters is higher than the maximum allowed number of characters.
135-
136-
This type of message can also occur when a loaded or stored value exceeds the character limit
137-
138-
#### 2.6.5 Maximum Length
139-
140-
This property specifies the maximum number of characters that can be typed in this text area.
141-
142-
| Value | Description |
143-
| --- | --- |
144-
| Attribute length *(default)* | The maximum number of characters is the same as the maximum length of the connected attribute |
145-
| Unlimited | The maximum number of characters is unlimited |
146-
| Custom | The maximum number of characters is specified in the widget properties |
147-
148-
#### 2.6.6 Placeholder Text
149-
150-
The placeholder text is shown when no text has been entered yet, or when a displayed attribute is empty.
151-
152-
It can be used, for example, to give a hint to the end-user what kind of text should be entered.
153-
154-
#### 2.6.7 Autocomplete
155-
156-
The autocomplete property specifies if a text area should have autocomplete enabled. The autocomplete attribute also improves mobile devices' ability to pre-populate fields.
157-
158-
{{% alert color="info" %}}This option is only available in native pages.{{% /alert %}}
159-
{{% alert color="info" %}}In Android when autocomplete is turned off it will remove support for new lines.{{% /alert %}}
160-
161-
#### 2.6.8 AutoFocus {#autofocus}
162-
163-
If `true`, the text area will be rendered focused with the device keyboard opened.
164-
165-
{{% alert color="info" %}}
166-
This option is only available in native pages.
167-
{{% /alert %}}
168-
169-
### 2.7 Label Section{#label}
212+
{{% snippet file="/static/_includes/refguide/events-section-link.md" %}}
170213

171-
{{% snippet file="/static/_includes/refguide/label-section-link.md" %}}
214+
## 4 Styling
172215

173-
### 2.8 Validation Section{#validation}
216+
### 4.1 Design Properties Section{#design-properties}
174217

175-
{{% snippet file="/static/_includes/refguide/widget-validation-link.md" %}}
218+
{{% snippet file="/static/_includes/refguide/design-section-link.md" %}}
176219

177-
### 2.9 Visibility Section{#visibility}
220+
### 4.2 Common Section{#common-styling}
178221

179-
{{% snippet file="/static/_includes/refguide/visibility-section-link.md" %}}
222+
{{% snippet file="/static/_includes/refguide/common-section-link.md" %}}
180223

181-
## 3 Read More
224+
## 5 Read More
182225

183226
* [Data view](/refguide/data-view/)
184227
* [Attributes](/refguide/attributes/)

content/en/docs/refguide/modeling/pages/input-widgets/text-box.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ Properties:
3737
* [Accessibility](#accessibility)
3838
* [Common](#common)
3939
* [Events](#events)
40-
* [On change Behavior](#on-change)
40+
* [On change Behavior](#on-change-behavior)
4141

4242
Styling:
4343

Binary file not shown.

0 commit comments

Comments
 (0)