coddingtonbear / django-measurement

Easily store, retrieve, and convert measurements of weight, volume, distance, area and more.
MIT License
145 stars 33 forks source link

Using measurement and unit as inline input group in form? #102

Closed DaEMoN33 closed 3 years ago

DaEMoN33 commented 4 years ago

Hello,

I'm trying to achieve an inline input group in a form in Django. I've tried for days to get the unit_choices to show up in a way that would work for this, but I'm still struggling, so I'm wondering if this is even possible.

As you can see I have a MeasureBase class "Height" that takes three units.

I have attached a mockup of what I envision...

Thanks for django-measurement and thanks in advance for any advice you may have!

input_group input_group2

codingjoe commented 4 years ago

Hi @DaEMoN33,

I presume you are talking about a frontend related issue, or rather how to make Django render the form in a way that is supported by your CSS framework. Might I ask which framework you are using and what the code your vision looks like?

Best, Joe

chetan1029 commented 3 years ago

Hey, @codingjoe I have the same issue with bootstrap. It shows weight and unit in the form one by one but what is best in bootstrap to use input-group forms. Is it any way we can make it with a weight text field and unit selection select field group into the input-group of bootstrap?

codingjoe commented 3 years ago

Hi, I honestly don't know. I haven't been using bootstrap in a while. Maybe you better look finding an answer on stackoverflow. Sorry, that I can't be of more help. Best, Joe