php - How can I show a value from a table/Model using the form helper? -
i trying show list of checkboxes table, value of checkbox being table id , text being label. want using form helper.
example output:
<select> <option value="1">first label</option> <option value="2">second label</option> <option value="3">and third</option> </select>
my view looks like:
echo $this->form->input('addoncategories.add_on_category_id', array( 'type' => 'select', 'multiple' => 'checkbox' ));
this produces:
<select> <option value="1">1</option> <option value="2">2</option> <option value="3">3</option> </select>
so, how amend label? field name add_on_category_name
change displayfield of model column want show label, showed in this post or here
public $displayfield = 'add_on_category_name';
Comments
Post a Comment