barseghyanartur / django-fobi

Form generator/builder application for Django done right: customisable, modular, user- and developer- friendly.
https://pypi.python.org/pypi/django-fobi
484 stars 112 forks source link

Integration with django-autocomplete-light / select2 #208

Closed dwasyl closed 5 years ago

dwasyl commented 5 years ago

Hi there,

I've used this package before with some excellent results, however, I have a new challenge that I would like to use it for. Is there any possibility of fobi being able to use a typeahead/autocomplete style lookup for a text field?

Ideally, integrating the ability to use django-autocomplete-light as a widget type and specify a url for the autocomplete. I have a need for a few forms based on a remote datasource that I'm unable to load into a form manually.

If not built-in, is there another way I can go about this? In my thinking it would be quite similar to a model field, except it would also require some additional content in the template (to initiative the element).

barseghyanartur commented 5 years ago

@dwasyl:

Sure. You will need to make your own field plugin, similar to text field plugin and use django-autocomplete-light as a widget there. If you think it's too challenging, I could implement that (if sponsored). Mail me for the details.