-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
bootstrap grid/column support #859
bootstrap grid/column support #859
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just need to confirm editor is working as intended. When I enable bootstrap in the demo the fields look a little off.
Awesome PR 👍 . The rendered form looks pretty good but the editor may need some attention, screenshot above. Overall good work though, formBuilder was way overdue for column support. In the future we should look at improving the UI in the field edit panel and maybe moving row and column info to a special property in the field data object. Special row and column properties would prevent having to parse the |
Co-Authored-By: Jojoshua <[email protected]>
So yeah I did not know how to approach this with actually showing the preview inside formBuilder itself. A couple more ideas that could be done...
|
Needed to add /^col-(xs|sm|md|lg)-([^\s]+) to match other bootstrap grid classes like col-md-push-2 |
69ed7e1
to
c0b0924
Compare
I hadn't seen formeo. Why did you make another project that does the same type of thing? The column support looks like a nice UI |
at the time my thinking was that formBuilder needed so much work to get to a point of being able to support columns, conditions, repeatable input groups, control groups, etc. that i might as well start from scratch. |
bootstrap grid/column support (#859) bs grid support Authored-By: Jojoshua <[email protected]>
# [3.1.0](v3.0.2...v3.1.0) (2018-11-15) ### Features * **column:** add bootstrap grid/column support ([e9cc23a](e9cc23a)), closes [#859](#859)
bootstrap grid/column support (kevinchappell#859) bs grid support Authored-By: Jojoshua <[email protected]>
# [3.1.0](kevinchappell/formBuilder@v3.0.2...v3.1.0) (2018-11-15) ### Features * **column:** add bootstrap grid/column support ([e9cc23a](kevinchappell@e9cc23a)), closes [kevinchappell#859](kevinchappell#859)
@Jojoshua @kevinchappell - trying this Feature with latest 3.6.1 Version. My Test FormData:
Rendering like:
Output:
As one can see - it's not grouping, but duplicating the IDs ... ?!? Hope you can give me a hint on what's wrong here as I would badly need this "Multi Column" Feature ;-) Thank you, bye from Austria |
just figured out it's working when using an actual existing DOM Element within the Page: |
@kevinchappell Reflecting on this again, I think formBuilder codebase is still workable and can support all that but just needs some restructuring to make it feel extensible/clean again. Also, moving the codebase to Typescript would be a huge first step forward. |
@Jojoshua a couple other reasons were themeability and not requiring jQuery. The number of changes required to support all of those features seemed like too much for me to handle alone, but with the support of you and the community I think its all doable. I agree there is still a need for formBuilder to continue to grow and moving to typescript would be great. |
Just FYI @kevinchappell I was playing around and did a TypeScript PoC. Not exactly sure how to do the webpack properly to build but got rid of all TS errors except for 8 on the formbuilder instance stuff which not really sure how to resolve. https://github.com/Jojoshua/formBuilder/tree/TypeScriptMigrationPoC |
There are a lot of requests for column support. Here is my implementation. I haven't tested with all form elements but the ones I needed worked fine.
This introduces the concept of columns using bootstrap grid system via class attributes set on the formBuilder elements. To set this up ....
All elements with the same row- identifier will be grouped into the same row
A second row can be added by repeating the same steps but setting a different row- identifier i.e row-2