-
Notifications
You must be signed in to change notification settings - Fork 413
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
Specify individual fieldsets in templates #427
Comments
The fieldsets are arrays in part because this guarantees the order they On Mon, Oct 20, 2014 at 3:03 PM, Alejandro Mantecon-Guillen <
|
What about adding the possibility of specifying in the fieldset not only the legend and fields but also the name and template? The we could use this name attribute to reference the fieldset. model.fieldsets = [{
legend: 'from model',
fields: ['fromModel'],
name: 'modelFieldset',
template: <some template if needed>
}, {...}, {...}]; <div data-fieldsets="modelFieldset"></div> and the fieldset template to personalize it. Would this be more reasonable? |
Memento for anybody whom is using this library (just like me). Example how to personalize fieldsets using different templates:
|
Hello,
I was wondering if the possibility of specifying a particular fieldset in the templates is something desirable/planned. The idea would be something along the lines of:
while keeping the possibility of doing
which would place all fieldsets - as before.
Additionally, by being able to individually name the fieldsets, we can use custom templates for the fieldset itself. The advantage would be to gain flexibility on the custom templates.
I have noticed that during the render of the Form there is a search for the [data-editors], [data-fields] and [data-fieldsets], but while the editors and the fields are key-value objects, the fieldsets are an array, making each element anonymous.
An option would be to make the fieldsets a key-value object as well, or introduce another concept of something like a named-fieldset.
If this sounds like something that could interest you I could try preparing a pull request.
The text was updated successfully, but these errors were encountered: