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 List[A] #4

Open
ghstrider opened this issue Apr 30, 2022 · 1 comment
Open

Support for List[A] #4

ghstrider opened this issue Apr 30, 2022 · 1 comment

Comments

@ghstrider
Copy link

ghstrider commented Apr 30, 2022

This is a feature request.
Some forms have options to add/subtract List of items. For example:- List[Pet]

The implementation will be whenever List[A] is encountered:

  • Add and Subtract Button should appear, doing their respective job.
  • Form Label should add n for nth display of list item
  • Validation should also work with nth context and error reporting.

I am very much inclined to develop it, if this request makes sense to you.
Thanks

@randm-ch
Copy link
Contributor

List[A] is supported with implicit def listForm[A](implicit form: Form[A]): Form[List[A]] = Form.Many(form), though you will get a Count field which in turn displays the requested count of input fields, instead of showing +/- buttons.

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