php - Cakephp adding option field with array values -
i trying create drop down menu (option) , fill drop down have sent array list view:
$country = $this->country_list; $this->set(compact('country'));
now question cake have buildin method me set input field using ($this->form->input()
) data of array list?
take example
$sizes = array( 's' => 'small', 'm' => 'medium', 'l' => 'large' ); echo $this->form->input('size', array('options' => $sizes, 'default' => 'm'));
Comments
Post a Comment