Quantcast
Channel: Recent Discussions — DataTables forums
Viewing all articles
Browse latest Browse all 81990

Select2 ad Editor

$
0
0

It would be possible for Editor users to have a complete example to use select2 instead of select especially in edit?.
Using select2 instead of edit without modifying php works perfectly but in the edit mode does not preserve the value of the field...

Field::inst( 'clienti.cli_naz' )
    ->options( Options::inst()
        ->table( 'nazioni' )
        ->value( 'naz_cod' )
        ->label( ['naz_nome','naz_cod'] )
        ->render( function ( $row ) {
            return $row['naz_nome'].' ('.$row['naz_cod'].')';
        } )             
        ->order( 'naz_nome ASC' )
    )   
{
    label: "Nazione",
    name: "clienti.cli_naz",
    type: "select2",
    opts: {
        // placeholder: "",
        allowClear: false,
        initialValue: true,
    },
    // type: "select",
    // def: "IT",
    // placeholderDisabled: true
},          

Thank you,
Giuseppe


Viewing all articles
Browse latest Browse all 81990

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>