dynamic-django-forms
dynamic-django-forms copied to clipboard
multiple fields in single form
I tried to have multiple FormField in the same model, but I found some issues:
- formbuilder.html use a static id (fb-editor)
- the script are included multiple times
I can create a pull request, but I wanted to know how to you want this done. For the first part we can just prepend/append the widget's name to the current id, but for the latter I think we should remove the script tags entirely. This way everyone can include them where they feel better.
Hi, sorry for the late response. If you still have a use case for this, here's what I'm thinking:
- Allow overriding the templates for
FormBuilderWidgetandFormRenderWidget(via settings?) - Generate and assign a unique ID instead of a constant
fb-editor(widget name sounds good, or maybe a UUID?) - Split the scripts / styles out into their own templates so they can be included more easily if overriding templates. Not sure if it should be possible to include/exclude those into the default builder/render templates via some form of settings, I haven't been keeping up to date with Django conventions.
Just put this on the README (a bit too late, tbh), but I'm not using Django in any projects, and am open to someone else taking over maintenance of this package. I don't really have the time or need to push new features at the moment.