Module development extrafields select from table

Hi I’m trying to build a module with an extrafield and i need to select from table like c_typent:libelle:id::filtersql but i can’t find any documentation on this.
Can please someone point me in the right direction?

Hello,

I don’t think a documentation exist for that, and you already have the syntax to be followed :

@ksar
Hello again,
Creating the extrafield from the gui is pretty straight forward with c_typent:libelle:id::filtersql
but I’m working with Modulebuilder and in modMyModule.class.php everything I’ve tried failed so far and this is were I’m at the moment.

$result1=$extrafields->addExtraField(‘Type’, “type”, ‘sellist’, 101, ‘’, ‘facture’, 0, 1, 1, param, 1, ‘’, 1, 1, ‘’, ‘1’, ‘’, ‘’);

I’m missing the param part for it to work. I don’t need to feed me the answer but as i said point me in the right direction.
Any help will be greatly appreciated as this would be a free module for the community.
Thank you.

Posting here the solution as a reference for everyone

$p = array();
$p['options']['c_typent:libelle:id::active=1'] = '';
$result1=$extrafields->addExtraField('series', "type", 'type', 210, '', 'facture',   0, 1, '', $p, 1, '', 1, 0, '', '1', '', '');

Thank you.

3 Likes