Using Chosen Plug-In with a Left Join to Populate Selections
Using Chosen Plug-In with a Left Join to Populate Selections
I would like to use the Chosen plug-in to manage the select list. I have the plug in code and all the files.
I am performing a Left Join from the server-side (php) code that will populate my field called "rrrecipeingredientunit.IngredientUnitID." Console gives an error at this line:
initComplete: function ( settings, json ) {
// Populate the site select list with the data available in the
// database on load
editor.field( 'rrrecipeingredientunit.IngredientUnitID' ).update( json.rringredient );
Console gives me an "Uncaught TypeError: undefined is not a function" and I am sure this piece of code needs to be augmented to accommodate the Chosen plugin. And I just don't know enough javascript to figure it out.
Answers
OK, I tried this too. The select list just says 'undefined.'
So can I populate the Chosen field type with "ipOpts" or is it better to use the "initComplete: function ( settings, json ) " with an update function?
Either way, I would still need to know the proper syntax.
I am really hoping someone can help me out. Please. :)
I am following this example here:
http://editor.datatables.net/manual/php/joins
But I want to use the Chosen plug-in on my populated drop down select list. I can get Chosen to work if I manually enter the select field using "ipOps" but that won't work for me long-term.
I am sure someone else has used the Chosen plug-in to do this. I just need a little help, guidance, suggestions.
I'm a moron. :(
The Select plug-in is much more suited to this. That's all I needed to do.
Anyone else who finds this thread . . . . use the Select plugin instead.
Good to hear you got it sorted out :-)
Allan