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
With current bootstrap4 implementation "vertical" form is impossbile. #573
Comments
@shulcsm — feel free to give it a shot! @zoidbergwill — Can you comment? |
Hi @shulcsm I'd be happy to help you fix the problem, or fix it myself. I was worried about the issue when originally working on this, since I was focusing on trying to make it easier for people to migrate a project from Bootstrap 3 to 4. I'm gonna make sure that I can reproduce what you're talking about, then I'll see if I can fix it. 1.I don't think these forms are broken by default. An inline/horizontal form has never been the default. Bootstrap 4 docs
I'm sorry, I'm battling to understand exactly what you mean and reproduce the issue. It's possible that we just need to make a PR that drops most of the If you can reproduce it in my test project and make a PR that adds a failure case, or make a gist that shows the issue, I'd happily help fix it. |
Wow, that looks terrible. Thanks. I will have a look at fixing it this evening. |
So is this an error in the markup or in Bootstrap? |
I think it's us, because of Flexbox and how it affects I will try a pure Bootstrap example with the changes between Flexbox being enabled and not, tonight. |
@zoidbergwill OK. Great. Thanks. Looking at the example on the bootstrap docs, the |
But, of course, in the Using the grid section, there it is... It looks as if the @zoidbergwill Have a look. See what you think. It might be we need to refactor to support both use-cases... |
Yeah, I added I think that's the issue. @carltongibson That sounds like a possible solution. Will take a look. |
I've managed to re-create it with Reverting that commit I mentioned fixes the default form, but breaks the horizontal form for flexbox. I'm working on a fix. |
How about introduction of new form style("horizontal") here https://github.com/maraujop/django-crispy-forms/blob/dev/crispy_forms/helper.py#L254 and using that? That would also make possible adding default column/label width classes. |
Here is what I've done so far with "vertical" and inline/horizontal forms: Without flexbox: With flexbox: This way adds classes without people having to add them themselves, which is useful. @shulcsm: That sounds like a good solution, but I think this solution I have might be simpler, if it works, since it still doesn't require users to add a |
Seems good, thanks. |
The alignment of the symbols when using flexbox for the prepdended/appended fields looks weird. Is that expected? |
That seems to be issue with current alpha, fixed in dev. twbs/bootstrap#19044 |
Are we just waiting for merge? I disovered another issue(not related to flexbox) that this fixes. |
Yeah. I'm basically happy but want to think it over one more time. Good news if it fixes other things! In general I'm expecting the Bootstrap 4 templates to have some issues since they're new and have never been used in action. Any issues you come across: open a ticket. |
I'd love a cleaner solution, but I couldn't think of one. :P |
This commit a9477f1 hardcodes classnames that from my perspective are soling edgecase.
There are multiple issues with this:
I'd be happy to fix this, but i'm not very familar with crispy forms. I think the right way to do this would be to add class somewhere conditionally depending on form_style, like its done with form-control?
The text was updated successfully, but these errors were encountered: