tetranz / select2entity-bundle

A Symfony2 bundle that integrates Select2 as a drop-in replacement for a standard entity field on a Symfony form.
MIT License
219 stars 110 forks source link

[Feature] add non-AJAX option #23

Open pbowyer opened 8 years ago

pbowyer commented 8 years ago

This is a pre pull-request conversation

I would like the option to have Select2 either use AJAX to fetch data or the options already in the select field. While this can be done - using this bundle for the AJAX fields, and a ChoiceType + custom JS for the others - I would like to see one Select2 field type for Symfony2, which I can switch between the two quickly and easily (as datasets scale), via changing one parameter (e.g. an ajax flag per field).

Is this a change you would like to have as part of the library? I don't believe it's already present in your bundle, and would be interested in working on it.

tetranz commented 8 years ago

Sure, by all means go ahead submit a PR when you have it. The AJAX functionality was my main use for this but the more flexibility the better.

So long as it doesn't break backwards compatibility, that sounds great.

abdallahmaali commented 8 years ago

+1

mbartok commented 8 years ago

+1

Schyzophrenic commented 7 years ago

@pbowyer Have you had a chance to work on this in the end?

pbowyer commented 7 years ago

@Schyzophrenic I didn't unfortunately - in the end project deadlines meant we used this in places and used a raw Select2 field for non-AJAX fields. It got us to production :)

Schyzophrenic commented 7 years ago

Proposed PR #68

Arkemlar commented 7 years ago

+1