useFieldValue()
Allows you to get and set values for any field.
This hook is commonly used when showing or hiding fields based on their value.
Props
Props in
Prop Name | Description |
| The base field name without a |
Props out
Prop Name | Description |
| Function which sets the value for this field. |
| Current field value. When changed, value is updated. |
When to use?
At the moment, OneForm doesn't allow you to render or not render a field based on its value. For now, this hook is required for those use cases.
You can even use it to display a list of notifications which disappear after 5 seconds:
Last updated