genemu / GenemuFormBundle

Extra Form : Captcha GD, Tinymce, Recaptcha, JQueryDate, JQueryAutocomplete, JQuerySlider, JQueryFile, JQueryImage
587 stars 263 forks source link

Multiple select2 inputs with ajax #329

Closed jxn closed 10 years ago

jxn commented 10 years ago

From what I can tell in the example (https://github.com/genemu/GenemuFormBundle/blob/master/Resources/doc/jquery/select2/ajax.md) it is not possible to have multiple select2 inputs using ajax querying separate resources on the same form, because overriding the genemu_jqueryselect2_javascript block in the view will override it for all select2 widgets.

Would it be possible to specify the query or ajax data resource in the configs parameter, or some other option?

jxn commented 10 years ago

Wow, I don't know what I was thinking when I filed this issue. This is already possible, just by adding the resource to the 'configs' array() in the form builder. I just did it while starting to think about how I would implement it for a pull request. Nevermind!

DougHayward commented 10 years ago

Would you mind showing a little bit of code with your explanation please. I know there is a couple of us having the same problem. Would be greatly appreciated.