Remove value from the form on field unmount
I have 2 fields:
By saying "hides," I mean this:
The scenario:
- Input a name
- Input a description
- Hide the description field
- Submit the form
- In
Is there a way to implement this?
name and description. The description is optional, and there is logic that hides the description field.By saying "hides," I mean this:
The scenario:
- Input a name
- Input a description
- Hide the description field
- Submit the form
- In
onSubmit callback I receive both name and description, but expect to receive only nameIs there a way to implement this?