You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Apr 30, 2018. It is now read-only.
`templateUrl` can be set instead of `type` to use a custom html template form field. Set a path relative to the root of the application. ie `directives/custom-field.html`
98
+
99
+
###### Default
100
+
`undefined`
101
+
102
+
---
103
+
##### key (string)
104
+
By default form results are keyed by location in the form array, you can override this by specifying a `key`.
105
+
106
+
###### Default
107
+
`undefined`
108
+
109
+
---
110
+
##### label (string)
111
+
`label` is used to add an html label to each field.
112
+
113
+
###### Default
114
+
A default is set for each field based on its type. ie `Text`, `Checkbox`, `Password`
115
+
116
+
---
117
+
##### required (boolean)
118
+
`required` is used to add the required attribute to a form field.
119
+
120
+
###### Default
121
+
`undefined`
122
+
123
+
---
124
+
##### disabled (boolean)
125
+
`disabled` is used to add the disabled attribute to a form field.
126
+
127
+
###### Default
128
+
`undefined`
129
+
130
+
---
131
+
##### placeholder (string)
132
+
`placeholder` is used to add placeholder text to some inputs.
133
+
134
+
###### Default
135
+
`undefined`
136
+
137
+
### Form Fields
138
+
#### Text form field
139
+
The text field allows single line input with a input element set to `type='text'`. It doesn't have any custom properties.
140
+
##### default (string)
141
+
142
+
_Example text field_
143
+
```json
144
+
{
145
+
"type": "text",
146
+
"key": "firstName",
147
+
"placeholder": "jane doe",
148
+
"label": "First name"
149
+
}
150
+
```
151
+
152
+
---
153
+
#### Textarea form field
154
+
The textarea field creates multiline input with a textarea element.
155
+
##### default (string)
156
+
##### lines (number)
157
+
`lines` sets the rows attribute for the textarea element.
158
+
159
+
_Example textarea field_
160
+
```json
161
+
{
162
+
"type": "textarea",
163
+
"key": "about",
164
+
"placeholder": "I like puppies",
165
+
"label": "Tell me about yourself",
166
+
"lines": 4
167
+
}
168
+
```
169
+
170
+
---
171
+
#### Checkbox form field
172
+
The checkbox field allows checkbox input with a input element set to `type='checkbox'`. It doesn't have any custom properties.
0 commit comments