Populate form with subset

Populate form with subset

nskwortsownskwortsow Posts: 120Questions: 0Answers: 0
edited November 2012 in Editor
Hi Allan,
I want my editor to show only a subset of data for the user.
I.e. I only want to show the patients that belong to the currently logged in doctor (e.g. where f_UID = N)
I don't see any code for this in the examples / tutorials, but it seems to me that this would be a relevant use case.
Please point me in the right direction. Thanks.


  • allanallan Posts: 58,289Questions: 1Answers: 9,326 Site admin
    So basically a where condition on the data that is initially loaded? That can be done with the `where` method :-). http://editor.datatables.net/docs/current/php/class-DataTables.Editor.html#_where


    Editor::inst( $db, 'users' )
    ->where( 'userid', $_SESSION['userid'] )

  • nskwortsownskwortsow Posts: 120Questions: 0Answers: 0
This discussion has been closed.