Snippet List
Custom form widget for rendering an autocomplete (using jQuery UI's autocomplete widget) text input in a template.
This arose from the need to have all fields asking for a state to use autocomplete, so I decided to make this.
- forms
- jquery
- autocomplete
- widget
- jqueryui
CitySelector is a jquery widget, allowing to pick cities from DB, filled by django_ipgeobase application.
Also it includes widget for django forms, based on mentioned jquery plugin, views and urlconf, required to provide
interaction between widget and DB and middleware, populating request with correspondent location.
Visit https://bitbucket.org/JustDelight/city_selector
- jquery
- widget
- geolocation
- jqueryui
- ru
- django_ipgeobase
This widget can be imported in your forms.py file and used like so:
formfield = forms.ModelChoiceField(widget=SelectDropdownWidget, queryset=Model.objects.all())
The javascript is provided by [filament group's Scott and his jQueryUI Selectmenu](http://www.filamentgroup.com/lab/jquery_ui_selectmenu_an_aria_accessible_plugin_for_styling_a_html_select/). In addition to the javascript you will need [jQuery (the latest release is fine) and jQuery UI](http://jqueryui.com/). The convenient thing is that this widget will style to match whichever jQuery UI you've 'rolled' or selected, making it highly customizable!
Hopefully this helps others who wanted a nice widget with jQuery and were sad to find there were no nice default options, enjoy! :)
- dropdown
- jquery
- select
- widget
- jqueryui
This widget can be imported in your forms.py file and used like so:
formfield = forms.ModelMultipleChoiceField(widget=MultiSelectWidget, queryset=Model.objects.all())
The javascript is provided by [Michael's Multiselect](http://github.com/michael/multiselect/tree/next). In addition to the javascript you will need [jQuery (the latest release is fine) and jQuery UI](http://jqueryui.com/). The convenient thing is that this widget will style to match whichever jQuery UI you've 'rolled' or selected, making it highly customizable!
Hopefully this helps others who wanted a nice widget with jQuery and were sad to find there were no nice default options, enjoy! :)
- jquery
- widget
- multiple select
- multiselect
- jqueryui
4 snippets posted so far.