-
Notifications
You must be signed in to change notification settings - Fork 1
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
Override default template #48
Comments
I did discuss with Andres the possibility of overriding directive templates in the app's folder. This would apply to all components, not just gforms. |
Ok. But I think we need some kind of solutions similar to the way filters works in order to be more easy to update.
|
At the moment the GForm template has a hardcoded base-template in the form HTML parsers for the form layout and the HTML to show an error if the form doesn't load from API properly. These could be extracted into a separate file and loaded when the component bootstraps, that would enable you to customize the main templates when you work out how, though the form item rendering is currently all done in code, so you would still get a |
Thanks for the information. Yes we need a way to be able to overwrite this kind of templates on some scenarios or specific forms. |
The main thing is to be able to override individual form controls - e.g. to add the select-ul attribute directive, or add a class to an input so it renders differently form the default. This should be tied in with patternlab. So taking the 2nd example - say we have 2 types of submit inputs (buttons) in our app - default and small. These 2 should be registered with patternlab as per normal, then we need a way of telling gforms which to use for a given form. |
At the moment by default content:
Each uses his own
div
we should update this in order to make it more pluggable by allowing the override of the default structure of the form.Related with #41
The text was updated successfully, but these errors were encountered: