Can't get a regular select field

35 views
Skip to first unread message

Joseph Leon

unread,
Dec 5, 2014, 7:12:00 AM12/5/14
to django-s...@googlegroups.com
building = selectable.AutoCompleteSelectField(
        lookup_class=BuildingLookup,
        label='Building',
        required=False,
        widget=selectable.AutoComboboxSelectWidget,
        # widget=selectable.AutoCompleteSelectWidget,
        # widget=forms.Select,
    )

I can't get a regular select list. The only one that works is AutoComboboxSelectWidget which makes an ugly click box. AutoCompleteSelectWidget leaves the field looking like a simple textfield, Select throws an error. 

I have the functionality working fine except I want the markup to just be a plain old select drop down.

Mark Lavin

unread,
Dec 5, 2014, 7:36:52 AM12/5/14
to django-s...@googlegroups.com
If you want a select box there is no reason to be using django-selectable. That can be handled by the ChoiceField or ModelChoiceField which come with Django.

--
You received this message because you are subscribed to the Google Groups "django-selectable" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-selecta...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Joseph Leon

unread,
Dec 5, 2014, 8:59:56 AM12/5/14
to django-s...@googlegroups.com
Yes but I need chained selects.

Mark Lavin

unread,
Dec 5, 2014, 10:06:30 AM12/5/14
to django-s...@googlegroups.com
It would be possible to use the lookup code/view without the field if you were comfortable writing the client-side calls for the chained selection yourself and wanted to use a select input. This project is meant to help primarily for cases where a select input isn't a good option because there are 100s, 1000s, or 10Ks of options. There are other projects noted in the docs which are focused on chained selection using select boxes http://django-selectable.readthedocs.org/en/v0.9.X/advanced.html#chained-selection
Reply all
Reply to author
Forward
0 new messages