Dynamic Editor Select type values
Dynamic Editor Select type values
Hello! Looking through the API docs I am unable to figure out how to change the available options for a select field. What I need to have happen is when an editor is actioned I will make an ajax call to determine which select values should be allowed based upon some other record value then I need to update the editor with the available options.
This discussion has been closed.
Answers
Hi,
To change the options, you would use the
update()field method of theselect()type. For example:editor.field( 'myField' ).update( ...options... );.You might want to take a look at the
dependent()method which can help reduce the boilerplate code for that kind of thing.Allan