Hi, I'm new Siverstripe, and I have some doubts about the management of complextablefield.
I'm trying to add a filter, but I am unable to make it work ...
The result I want is that only appear in the CMS data for each project, rather than data from across the table.
I tried with a filter inside complexTablefield, and I've tried to create a record with the ID of the project within the rows and then create a filter based on this information, but I am unable to work.
My code:
class arqnProyecto extends Page {
static $many_many = array(
'datosProyecto' => 'arqnDatos'
);
getCMSFields function () {
$ fields = parent:: getCMSFields ();
$ table = new ComplexTableField (
$ this,
'datosProyecto'
'arqnDatos'
array (
'Details' => 'Details'
'Location' => 'Location',
'Thumb' => 'Image'
), 'GetCMSfields_forPopup'
"arqnDatos = '$ this -> ID'" / / FILTER, BUT NO WORKS
/ / null,
/ / null,
"arqnDatos.Proyecto", $ this-> ID / / SAVE ID FROM PROJECT BUT ALSO NO WORKS :(
);
Any help is good.
Thank you very much!
Carlos