Add fields to show and search in select dropdown

Sorry for being a blockhead, but I am not able to figure out how to do this and I’ve tried for weeks now - I think I may have already tripped on it but didnt realize that it was the solution. If someone could point me to the right direction/file that would be great.

What I want to do:
In my own module, when adding something on card.php, I have a dropdown with content from another module like this:
integer:ObjectClass:PathToClass[:AddCreateButtonOrNot[:Filter[:Sortfield]]]
So far, so good.
But it only shows the ref. And I am only able to search that ref. How do I add other fields (label, whatever) into this? I kinda looked everywhere for the solution and Im confused now. I started to create an own formclass for the module, but Im sure the solution is way more simple.

Thanks!

Unbelieveable, searching for weeks and being desperate enough to ask here, I finally found the solution.

I just had the wrong name for what I want. It is combobox. In the classfile of the module, just add 'showoncombobox'=>'true'

Now I just need to find out how to add a separator between fields, but thats a minor thing :slight_smile:

2 Likes

Hello, did you find out how to add a separator?
Thanks for the reply

its like rowid|lastname|firstname just a vertical line.