Collapsible ChoiceField in Django -


i have django form textfield input i'd turn choicefield can away having compare similar answers determine if refer same thing. however, number of possible choice prohibitive (several hundred). collapsible choicefield users select category, sub-category, , on @ each step presented reasonable number of options (especially since many users on mobile devices limited screen sizes). options quite amenable unambiguous categorization , seems way display information. however, while see information collapsing sorts of other sorts of aspects of forms haven't seen how this. i'm not sure avenue pursue make work best. css or javascript seem ways people make collapsible lists don't know whether either of these play django select widget. what's best option sort of thing?

here options i'm aware of: 1) write sort of new widget. sounds horrible (based on experience writing new widgets) if it's best option i'll it. 2) use normal select widget , use javascript hide options. i'm not sure how select options in clean groups though. 3) use css collapsible list , and hidden form field bit of javascript grab value list , insert hidden field. 4) use chain of views navigate through smallest category. sounds easy do, nice , clean (because logic in python feel comfortable), requires multiple reloads may problematic mobile users.

if number of subcategories infinite, solution. if it's not infinite, might able away loading of choices on page along parent categories can decide choices show via javascript.


Comments

Popular posts from this blog

ios - UICollectionView Self Sizing Cells with Auto Layout -

node.js - ldapjs - write after end error -

DOM Manipulation in Wordpress (and elsewhere) using php -