Hello,
Table(id,name,values_list), where values_list is a string of values (exemple: "1,20,55,6");
is there a way to display this string in the CGridView to look like <span>1</span><span>20</span> …?
thank you
Hello,
Table(id,name,values_list), where values_list is a string of values (exemple: "1,20,55,6");
is there a way to display this string in the CGridView to look like <span>1</span><span>20</span> …?
thank you
or even better:
<input type="text" value="1"><input type="text" value="55"> etc…
hello there you go
// in you gridview
[
'filter' => false,
'name' => 'valueList',
'type' => 'raw',
],
// in your model
public function getValueList()
{
$parts = explode(',', $this->value_list);
$html = '';
foreach ($parts as $part)
$html .= sprintf('<input type="text" value="%s">', $part);
return $html;
}
don’t forget to hit +1