filter parameter for ajax source
filter parameter for ajax source
I realise there must be documentation on this, but I am unable to find it,
The ajax source for my editor / datatables instance loads fine, but it is from a table of about 2500 rows
What i want to do is pass a parameter, eg ID=1 from the datatables instance, so I get only the rows i need
in my ajax source for editor, I can filter my data easily enough by adding a fixed value
$data = Editor::inst( $db, 'tablename' )
->field(
Field::inst( 'ID' ),
...
)
->where('ID', 1)
but how can i pass a parameter to achieve the same thing ?
This discussion has been closed.
Answers
FIXED IT !
Here's one way of doing it...
On the datatables instance add a get parameter to the ajax url
on the ajax json source, edit the where condition