label combine fields
label combine fields
nessinits
Posts: 86Questions: 27Answers: 0
I use the following text to generate a option list for a select:
Field::inst( 'wl_contracts.approver' )
->options( Options::inst()
->table( 'persons' )
->value( 'persons_id' )
->label( 'lastname' )
)->validator( 'Validate::dbValues' ),
The problem is that I would like to combine both the lastname and the firstname in the label. Is this possible?
This question has an accepted answers - jump to answer
This discussion has been closed.
Answers
Yes, you can pass an array into the
label
method:You can also use a renderer to format the label output as you need if the standard space separator isn't good enough. Full details about it are available here.
Allan