radioButtonList with concatenated values

Is there a way to show radioButtonList using concatenated attributes from model.

For example, I have model list which contains product records (name, type, etc.).

I need to show radio button list with values: name|type.

You can add a method getNameType() to a model:




public function getNameType()

{

    return $this->name.'|'.$this->type;

}



Then use "nameType" attribute for generating a checkbox list.

Great tip andy_s, thanks!