[html-formfu] Using 2 columns as the element label?

Nigel Metheringham nigel at dotdot.it
Tue Aug 23 10:49:15 GMT 2011


On 23 Aug 2011, at 11:41, Octavian Rasnita wrote:
> The problem is that I would like to use the columns first_name + a space + the column last_name as the label for the select options, and not only the username column.

In the case where I do this, I have the DBIC result class have an
additional method in it:-
  sub name { my $self = shift; 
    return join( ' ', $self->forename || '', $self->surname || '' ); } 

and then use name as the label column

	Nigel.

--
[ Nigel Metheringham ------------------------------ nigel at dotdot.it ]
[                 Ellipsis Intangible Technologies                  ]





More information about the HTML-FormFu mailing list