missing server script from example

missing server script from example

nlooijenlooije Posts: 60Questions: 14Answers: 1

I am trying to debug a problem with a nested editor not selecting the values in the datatable like in the Nested editing - multiple selection example.
I noticed the server script is missing, could you correct this?

This question has an accepted answers - jump to answer

Answers

  • allanallan Posts: 65,686Questions: 1Answers: 10,924 Site admin

    It is:

    <?php
    
    // DataTables PHP library
    include( "../lib/DataTables.php" );
    
    // Alias Editor classes so they are easy to use
    use
        DataTables\Editor,
        DataTables\Editor\Field;
    
    Editor::inst( $db, 'permission' )
        ->field( 
            Field::inst( 'id' )->set(false),
            Field::inst( 'name' )
        )
        ->process($_POST)
        ->json();
    

    It is included in the download packages. Not sure why it isn't showing up on the site - thank for letting me know about that, I'll have a look.

    Allan

  • nlooijenlooije Posts: 60Questions: 14Answers: 1

    I can't find it in the download packages, maybe i am not looking in the right place.
    The code you posted is for permissions.php, can you also share for joinArray.php?
    Thanks

  • nlooijenlooije Posts: 60Questions: 14Answers: 1
    Answer ✓

    nevermind, i see now that its in the Editor download package under folder 'controllers'

  • allanallan Posts: 65,686Questions: 1Answers: 10,924 Site admin

    Yup, exactly that :).

    Allan

Sign In or Register to comment.