Skip to content
This repository was archived by the owner on Apr 30, 2018. It is now read-only.

Commit 229c1a4

Browse files
committed
added password and number fields
1 parent b9a5969 commit 229c1a4

File tree

1 file changed

+41
-3
lines changed

1 file changed

+41
-3
lines changed

README.md

Lines changed: 41 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -232,15 +232,15 @@ _Example radio field_
232232

233233
---
234234
#### Select form field
235-
>The select field allows selection via dropdown with the select element.
235+
>The select field allows selection via dropdown using the select element.
236236
237-
##### default (string)
237+
##### default (number)
238238
>The default can be set to the index of one of the `options`.
239239
240240
##### options (array)
241241
>`options` is an array of options for the select form field to display. Each option should be an object with a `name`(string). You may optionally add a `group` to some or all of your options.
242242
243-
_Example radio field_
243+
_Example select field_
244244
```json
245245
{
246246
"key": "transportation",
@@ -290,9 +290,47 @@ _Example radio field_
290290

291291
---
292292
#### Number form field
293+
>The number field allows input that is restricted to numbers. Browsers also provide minimal ui to increase and decrease the current value.
294+
295+
##### default (number, optional)
296+
297+
##### min (number, optional)
298+
>`min` sets minimum acceptable value for the input.
299+
300+
##### max (number, optional)
301+
>`max` sets maximum acceptable value for the input.
302+
303+
##### minlength (number, optional)
304+
>`minlength` sets minimum number of characters for the input. If a number less than this value it will not be submitted with the form. eg 1000 is 4 characters long and if `minlength` is set to 5, it would not be sent. Currently there is no error displayed to the user if they do not meet the requirement.
305+
306+
##### maxlength (number, optional)
307+
>`maxlength` sets maximum number of characters for the input. If a number is greater than this value it will not be submitted with the form. eg 1000 is 4 characters long and if `maxlength` is set to 2, it would not be sent. Currently there is no error displayed to the user if they do not meet the requirement.
308+
309+
_Example number field_
310+
```json
311+
{
312+
"key": "love",
313+
"type": "number",
314+
"label": "How much love?",
315+
"default": 2,
316+
"min": 0,
317+
"max": 100,
318+
"required": true
319+
}
320+
```
293321

294322
---
295323
#### Password form field
324+
>The password field allows password input, it uses an input with `type='password'`.
325+
326+
_Example password field_
327+
```json
328+
{
329+
"key": "password",
330+
"type": "password",
331+
"label": "Password"
332+
}
333+
```
296334

297335
---
298336
#### Hidden form field

0 commit comments

Comments
 (0)