Members
# inner subscription
value is the value of the watched field
name is the name of the watched field
type is what happened. We only care about 'change'
Methods
# inner useDynamicForm(incomingValues, urlDomain, setLoadingnullable, asyncOptionsnullable) → {UseDynamicFormReturn}
useDynamicForm is a hook that handles the fields and validations for a dynamic form.
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
layoutOptions.type |
string
|
object type for standard get layout endpoint | |
layoutOptions.key |
string
|
layout key for standard get layout endpoint | |
layoutOptions.url |
string
|
url if you are not using the standard endpoint (optional) | |
layoutOptions.layout |
object
|
a layout object to use to build the dynamic form instead of pulling from an url | |
incomingValues |
object
|
object of the defaut or initial values for the form (optional) | |
urlDomain |
string
|
domain to use for the url (optional) | |
setLoading |
function
|
<nullable> |
function to set the loading state of the form for async conditional items (optional) |
asyncOptions |
object
|
<nullable> |
options for async operations (optional) |
- all the properties of useFom, an array of the sections, a loading boolean
UseDynamicFormReturn
Type Definitions
Object
# UseDynamicFormReturn
Properties:
Name | Type | Description |
---|---|---|
sections |
Array.<object>
|
Array of the sections of the form. |
layoutLoading |
boolean
|
the layout object |
...rest |
UseFormReturn
|
all the properties of useForm |