Provide a JSON source for select field
Provide a JSON source for select field
Hello,
how can I provide a dynamic JSON source for a select field? I see the ipOpts object structure where I can statically define the options, however these options can change as they relate to another dataset. i.e: I enter a new mobile phone, and when I enter a new customer, I want to see that newly entered phone in the dropdown as a choice to assign to the new customer.
Maybe I am missing something in the documentation.
Our backend is PHP and we must use the existing classes for classic CRUD operation.
Any help is appreciated!
S.G.
how can I provide a dynamic JSON source for a select field? I see the ipOpts object structure where I can statically define the options, however these options can change as they relate to another dataset. i.e: I enter a new mobile phone, and when I enter a new customer, I want to see that newly entered phone in the dropdown as a choice to assign to the new customer.
Maybe I am missing something in the documentation.
Our backend is PHP and we must use the existing classes for classic CRUD operation.
Any help is appreciated!
S.G.
This discussion has been closed.
Replies
[code]
editor.field('dept.id').update( json.dept );
[/code]
This example shows how that can work in action:
http://editor.datatables.net/release/DataTables/extras/Editor/examples/join.html
Regards,
Allan