I created a custom field as below
class JFormFieldPaddyStatus extends JFormFieldList {
protected $type = 'paddystatus';
public function getOptions($id='') {
$options = array();
$options[0] = 'Raw';
$options[1] = 'Dried';
$options[2] = 'Grind';
$options[3] = 'Ready';
return $options;
}
}
In the database it stores the values as 0, 1 etc... When I show the status I want to show the corresponding names instead of its value.
At the moment I show the status as below
<td><?php echo $row->status; ?></td>