SOVED - Editor + Select2 (on update doesn' t show the previous value)

SOVED - Editor + Select2 (on update doesn' t show the previous value)

arasaarasa Posts: 11Questions: 3Answers: 0
edited February 2016 in Select

I'm traying to use Editor with Select2, everything looks good, but, when I try to update/edit, the Select show me all the list from the beginning of the list, not with the previous selected value.

Script - editor

 "fields": [             
           {
               "label": "Proveedor",
                "name": "cargo.provider",
                "type": "select2",
           },
 ]

Server side

->fields(
        Field::inst( 'cargo.provider' )->options( 'providers', 'providers.id', 'name' ),

        Field::inst( 'providers.name' )                                 
    )

How can I get the selected value?

PS: Using "type": "select", works fine, but I need the search feature of Select2

Replies

This discussion has been closed.