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

Popular posts from this blog

linux - xterm copying to CLIPBOARD using copy-selection causes automatic updating of CLIPBOARD upon mouse selection -

c++ - qgraphicsview horizontal scrolling always has a vertical delta -