Selectbox with multiple columns or additional option-IDs

Is it possible to separate the displayed options from the returned value in a selectbox? Like passing a list of tuples as options like
((option1, return1),(option2, return2),…)
The selectbox displays option1, option2, etc. but when e.g. option1 is selected the value return1 is returned by the widget.
Alternatively, I would like to define multiple columns in a selectbox and decide which one to use as the return value and which ones to be visible.
Of course I can translate the selected option afterwards. But may be there is a better way.

Take a look at the format_func argument.

Looks like this is what I am looking for.
Thanks.

Also some helpful links:

1 Like

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.