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

Dynamically add fields to group #177

Closed
dez11de opened this issue Mar 25, 2024 · 1 comment
Closed

Dynamically add fields to group #177

dez11de opened this issue Mar 25, 2024 · 1 comment

Comments

@dez11de
Copy link

dez11de commented Mar 25, 2024

Is your feature request related to a problem? Please describe.
I'd like to be able to add (and remove) fields to a group depending on the value of a field in the (same) group.

Describe the solution you'd like
I would like to be able to be able to call some function like f.form.SomeGroup.AddField(someField) where someField is of huh.Field type. Removing a field would be done with something like f.form.SomeGroup.RemoveField("some_field_key")
For my use case it would be OK if the new field was added at the end of the field array.

Describe alternatives you've considered
I don't see any alternative.

@maaslalani
Copy link
Contributor

Hey @dez11de, thanks for creating this issue. We're planning on adding a Dynamic Form system to huh to solve all dynamic form problems and we'll keep track of the issue here: #69, feel free to follow this issue for updates!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants