Quantcast
Channel: Editor — DataTables forums
Viewing all articles
Browse latest Browse all 3740

retrieve values for select field from ajax?

$
0
0

For one feature on my site I want to use Editor in standalone mode to get from the user arguments for a subsequent URL page access.

My problem is my field select values are dependent on earlier selects. By this I mean after the user selects the first field in the Editor form, the values appropriate for the second field need to be retrieved from the database.

I see the field option has a data suboption where I can specify a function, but it looks like that has to be a synchronous function call. I think it is better for the select be filled in asynchronously, as sync ajax is frowned upon these days. I would retrieve the values outside of Editor, but I don't see an api for field that I can call to set the select options.

Am I missing something?

Note: I also don't quite get http://editor.datatables.net/examples/standalone/simple.html because there is an ajax option -- is that used or necessary for the edit form? Looking at the Ajax data tab, it doesn't look like it is used, but I want to verify what happens when this.submit() is called.


Viewing all articles
Browse latest Browse all 3740

Trending Articles