Good morning, everyone,
I would like to know if it is possible somehow to pass a variable filter to mjon.
Let me explain better, I already have a "static" filter that works fine:
PHP
$editor->join(
Mjoin::inst( 'attrezzature' )
->link( 'attrconper.per_id', 'attrconper_tipo.per_id' )
->link( 'attrezzature.atr_id', 'attrconper_tipo.atr_id' )
->order( 'atr_descr asc' )
->fields(
Field::inst( 'atr_id' )
->validator( Validate::required() )
->options( Options::inst()
->table( 'attrezzature' )
->value( 'atr_id' )
->label( 'atr_descr' )
->order( 'atr_descr ASC' )
->where( function ($q) {
$q->where( 'atr_az',$_SESSION['azienda'],'=');
---> second filter?
} )
),
Field::inst( 'atr_id' ),
Field::inst( 'atr_descr' )
)
);
What I would like to do is to add another "dynamic" filter based on the value of another field in the editor.
Basically in a field I select a product category and I would like to be able to select with mjoin one or more products belonging to the category selected before.
Is it possible to do this somehow?
Thanks for your patience...
Giuseppe