How to keep the current value in select input type while adding other options

How to keep the current value in select input type while adding other options

e8416o8e8416o8 Posts: 25Questions: 9Answers: 1

If I make a field type as "select", then the current value for that field got lost in edit window.
Which way would be the best way to keep the current value but add new values as options?

Thanks,
Karen

This question has an accepted answers - jump to answer

Answers

  • e8416o8e8416o8 Posts: 25Questions: 9Answers: 1
    Answer ✓

    I added the following codes in open/edit event. It seems to work as I wanted.

            $.ajax ({
                type: 'POST',
                url: '/myPayers/GetInsCoLst',
                dataType: 'json',
                success: function (data) {            
                    editor.field('insCo').update(data.options.insCo);
                }          
            });
    
                if (data.insCo.val != NULL) {
                    editor.field('insCo').update(data.options.insCo);
                }
    
    
This discussion has been closed.