I have a field a store as letters A P V
Instead of showing A P V I would like to show the real name. This is not store in another table for lookup. Can I do it without adding a lookup table?
Hi,
Yes. You can use static values for dropdown. With these values “key:value;key:value;key:value”.
e.g.
$col[“edittype”] = “select”;
$col[“editoptions”] = array(“value”=>’10:$10;20:$20;30:$30;40:$40;50:$50′);
I have already tried that and it didnt work $col = array(); $col[\\\”title\\\”] = \\\”Game Type\\\”; $col[\\\”name\\\”] = \\\”gametype\\\”; $col[\\\”edittype\\\”] = \\\”select\\\”; $col[\\\”editoptions\\\”] = array(\\\”value\\\”=>\\\’p:pinball;v:Arcade;c:Custom\\\’); $cols[] = $col; I am still seeing p v and c in the table http://gameroom.gameatl.com/admin/test6.php
You need to set formatter as well. Apologies, Should have told earlier.
$col["formatter"] = "select";