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
Global defaults can be set with "sf-options", among them
'formDefaults' useful for setting things like ngModelOptions
and validationMessage for an entire form.
Copy file name to clipboardExpand all lines: docs/index.md
+68-13Lines changed: 68 additions & 13 deletions
Original file line number
Diff line number
Diff line change
@@ -2,6 +2,7 @@ Documentation
2
2
=============
3
3
4
4
1.[Basic Usage](#basic-usage)
5
+
1.[Global Options](#global-options)
5
6
1.[Form types](#form-types)
6
7
1.[Default form types](#default-form-types)
7
8
1.[Form definitions](#form-definitions)
@@ -10,6 +11,7 @@ Documentation
10
11
1.[onChange](#onchange)
11
12
1.[Validation Messages](#validation-messages)
12
13
1.[Inline feedback icons](#inline-feedback-icons)
14
+
1.[ngModelOptions](#ngmodeloptions)
13
15
1.[Specific options and types](#specific-options-and-types)
14
16
1.[fieldset and section](#fieldset-and-section)
15
17
1.[conditional](#conditional)
@@ -77,6 +79,35 @@ Example with custom submit buttons:
77
79
</div>
78
80
```
79
81
82
+
Global Options
83
+
--------------
84
+
Schema Form also have two options you can set globally via the `sf-options`
85
+
attribute which should be placed along side `sf-schema`.
86
+
87
+
`sf-options` takes an object with the following possible attributes.
88
+
89
+
90
+
| Attribute ||
91
+
|:--------------|:------------------------|
92
+
| supressPropertyTitles | by default schema form uses the property name in the schema as a title if none is specified, set this to true to disable that behavior |
93
+
| formDefaults | an object that will be used as a default for all form definitions |
94
+
95
+
*formDefaults* is mostly useful for setting global [ngModelOptions](#ngmodeloptions)
96
+
i.e. changing the entire form to validate on blur. But can also be used to set
97
+
[Validation Messages](#validation-messages) for all fields if you like a bit more
0 commit comments