2014-02-11 36 views
0

我在下面的CakePHP创建了一个下拉列表:创建名称数组中CakePHP的下拉列表中

$city_list = $form->select("GalStore.gal_location_id", $gal_locations,null,$city_attributes); 

现在我需要发送列表的名称的阵列,即在<select name="mylist[]">格式。

我试图把[]在上述变量:

$city_list = $form->select("GalStore.gal_location_id[]", $gal_locations,null,$city_attributes); 

但其生产HTML为:

<select name="data[GalStore][gal_location_id[]]"> 

我怎样才能实现呢?

+0

你的意思是你需要一个多重选择?或者你有多个'$ form-> select'?如果你有多个表格 - >选择,他们之间有什么区别? – cornelb

回答

0

我不确定你到底在找什么,但是这会给你一个总的想法。根据需要更改0