Open tstiemerling opened 5 days ago
@tstiemerling, could you clarify your use case? I'm not entirely sure which default form data
you're trying to pass to the onSuccess
callback.
Also, I am not in favor of adding a deprecated component like MUI Hidden to react-hook-form-mui
.
I believe OP is probably asking about something that helps with input type=hidden
, rather than CSS hidden, which is what the MUI Hidden was all about.
I've not tried to do this myself using react hook form, nor mui, so I can't speak to what extra functionality a library could offer here.
Okay, then the following code can be used to register the field while keeping it hidden in the form.
<input {...register("test")} type="hidden"/>
Duplicates
Latest version
Summary 💡
Would be nice to have support for HiddenElement or similar which is basically with some wrapper code so the value can be defined in the default form data and sent to the onSuccess callback along with other inputs. Right now I have to have some extra useState variables to handle this separately from the form data.
Examples 🌈
No response