Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support for single input being tied to multiple forms #11809

Closed
elieven opened this issue Apr 22, 2024 · 0 comments
Closed

Support for single input being tied to multiple forms #11809

elieven opened this issue Apr 22, 2024 · 0 comments
Labels
feature request request a feature to be added waiting-up-vote Waiting for votes from the community.

Comments

@elieven
Copy link

elieven commented Apr 22, 2024

Is your feature request related to a problem? Please describe.

Yes. I have a complicated form with many tabs and parts of it edit the config of something and other parts edit the state of it / some construct that is related to but is not the config. Editing / changing each part is its own endpoint and they are also quite different so I cannot really do one form for both (they do share some data / structures though). The problem is that some data is needed in both. Would be cool if we'd be able to bind an input or fieldArray to multiple forms so editing it would update it in both.

Describe the solution you'd like

A way to register an input / fieldArray to multiple forms perhaps with direct support in the register function or some helper that merges / reuses the refs or idk really.

Describe alternatives you've considered

Duplicated hidden inputs with useEffect or onChange data forwarding but it's hacky and ugly.

Additional context

Ask if needed.

@elieven elieven added feature request request a feature to be added waiting-up-vote Waiting for votes from the community. labels Apr 22, 2024
@bluebill1049 bluebill1049 added this to Pending Feature Requests in React Hook Form May 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature request request a feature to be added waiting-up-vote Waiting for votes from the community.
Projects
React Hook Form
  
Pending Feature Requests
Development

No branches or pull requests

2 participants