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

Popular posts from this blog

java.util.scanner - How to read and add only numbers to array from a text file -

rewrite - Trouble with Wordpress multiple custom querystrings -