Load values from an api call as "select" options on "New" button click modal
Load values from an api call as "select" options on "New" button click modal
This is surely a solved problem that I am not able to get my head around.
I have a simple New modal that contains couple of "select" controls.
During initialization (for button click event) I make am API call and get an array back. The code like below
action: function (e, dt, node, config) {
$.ajax({
Type: 'GET',
url: '/core/repolist',
dataSrc: ''
}).done(function (result) {
console.log(result);
});
Ho do I get this list to become options in the "select" dropdown?
This question has an accepted answers - jump to answer
Answers
You mean for Editor's
select
field type? Use thefield().update()
method to update the options.Allan
Thank you Allan!