-
-
Notifications
You must be signed in to change notification settings - Fork 356
Proposal: component to handle form collections #3
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
Comments
100%. Literally the first thing I thought of when I ready the post was "I wonder if they did this whole initiative just to make UX easier with form collections" |
Same for me - form collections were my first thought when hearing about the UX Has there been any movement on this issue anywhere? |
Not yet but we are open to contribs :) ! |
Hi everyone, I just made my first Symfony bundle which should meet your need. Here you have the demo code: |
@stakovicz Awesome work - I took a quick look at the bundle and it looks good! I will try and test it out in a project of mine later this week. |
@stakovicz I just tested your bundle in an application of mine. At first glance it worked pretty good. Just install, change the form type and you're good to go. It would be great if we could be able to customize the way entries are added, e.g. if you want to use tables. Otherwise good work. 👍 |
Thanks, I'll see what I can do. |
This is great! Low entry barrier to using the bundle :) |
Hi @tgalopin, What do you think of my bundle? What would be missing to integrate it into Symfony UX? |
Hey @stakovicz ! I didn't have much time to review it in details, but I see that you are already using Symfony UX :) ! The plug and play behavior isn't linked to the Symfony namespace, your bundle already is integrated with Symfony UX. Regarding putting it under the Symfony namespace, it does seem to be a great fit and a well implemented bundle, I'd be happy to review a PR to add the component. I'd probably name it UX Form Collection (UX Collection is maybe a it too generic). |
Hi @stakovicz, One thing I think your package is missing is handling an other prototype name than |
Hi @tgalopin, Thanks for your support ! I do the changes for the namespace and the name here : But I don't know how I can make PR on a bundle that doesn't exist. |
Create a new folder inside src/ within this repository and copy your bundle inside this folder :-) |
Thanks @richardhj ! I did my first PR 🥳 |
@jmsche you would like to have an attribute to use a custom placeholder |
I'm not sure I understand the question. You should be able to pass the prototype name from the Form Type to the view, then it will be available in the form vars, so you can pass it from the view to JS using a data attribute. I hope it answers your question :) |
@jmsche I'm not sure about that you want :) Has you can see here : |
The idea is to pass the prototype name from the Form Type to the view and finally to JS like this:
|
@jmsche I've removed the hard coded property_name value. |
# This is the 1st commit message: WIP heavy refactoring to Component Initial "hook" system used to reset model field after re-render Adding a 2nd hook to handle window unloaded reinit polling after re-render Adding Component proxy # This is the commit message #2: fixing some tests # This is the commit message #3: Refactoring loading to a hook # This is the commit message #4: fixing tests # This is the commit message #5: rearranging # This is the commit message #6: Refactoring polling to a separate class
# This is the 1st commit message: WIP heavy refactoring to Component Initial "hook" system used to reset model field after re-render Adding a 2nd hook to handle window unloaded reinit polling after re-render Adding Component proxy # This is the commit message symfony#2: fixing some tests # This is the commit message symfony#3: Refactoring loading to a hook # This is the commit message symfony#4: fixing tests # This is the commit message symfony#5: rearranging # This is the commit message symfony#6: Refactoring polling to a separate class
It would be nice if there was some available JS in the ux components to add basic stuff to handle form collections (add & remove) :)
The text was updated successfully, but these errors were encountered: