Forms 未在post中提交yii dropdownlist

Forms 未在post中提交yii dropdownlist,forms,post,yii,html-select,Forms,Post,Yii,Html Select,我有下面的代码,它没有多大意义 <td style='width: 233px'><?php if (!empty($jobsprocesscompleteArr)){ echo CHtml::DropDownList("Jobsprocesscomplete[$i]lookupprocess_id",$jobsprocesscompleteArr[$i]->lookupprocess_id,$processstages,

我有下面的代码,它没有多大意义

<td style='width: 233px'><?php 
        if (!empty($jobsprocesscompleteArr)){
                echo CHtml::DropDownList("Jobsprocesscomplete[$i]lookupprocess_id",$jobsprocesscompleteArr[$i]->lookupprocess_id,$processstages,array('id'=>'Jobsprocesscomplete_'.$i.'_lookupprocess_id','style'=>'width:230px','onchange'=>'createjobprocesscomplete('.$item['JOBNO'].',this,'.$i.')'));
            }else{
                echo CHtml::activeHiddenField($jobsprocesscompleteempty,"[$i]JOBNO");
                echo CHtml::DropDownList("Jobsprocesscomplete[$i]lookupprocess_id",0,$processstages,array('id'=>'Jobsprocesscomplete_'.$i.'_lookupprocess_id', 'style'=>'width:230px','onchange'=>'createjobprocesscomplete('.$item['JOBNO'].',this,'.$i.')' ) );
            }
            ?>
        </td>
        <td class=th3>
            <?php 
            if (!empty($jobsprocesscompleteArr)){
                echo CHtml::activeHiddenField($jobsprocesscompleteArr[$i],"[$i]jobsprocesscomplete_id" , array('value'=>$jobsprocesscompleteArr[$i]->jobsprocesscomplete_id) );
                echo CHtml::activeHiddenField($jobsprocesscompleteArr[$i],"[$i]JOBNO",array('value'=>$jobsprocesscompleteArr[$i]->JOBNO, 'id' => "Jobsprocesscomplete_".$i."_JOBNO"));
                //echo CHtml::activeHiddenField($jobsprocesscompleteArr[$i],"[$i]JOBNO",array('value'=>$jobsprocesscompleteArr[$i]->JOBNO, 'id' => "Jobsprocesscomplete_".$i."_JOBNO"));
            }
最初,我在if语句中的dropdownlist上方有两个隐藏字段,但没有出现在post中。当我将它们移动到下面的
td
时,它会出现在post中,但是我无法移动下拉列表,并且dropdownlist不会出现在post中。我做错了什么

HTML

以下是在
$\u POSTS['Jobsprocessco complete']

<td style="width: 233px">
<select id="Jobsprocesscomplete_0_lookupprocess_id" name="Jobsprocesscomplete[0]lookupprocess_id" onchange="createjobprocesscomplete(13022020,this,0)" style="width:230px">
<option value="533">25 NA</option>
<option value="13059">35 1st Pass Velocity Analysis</option>
<option value="13061">75 3rd Pass Velocity Analysis</option>
<option value="13063">100 DBS</option>
<option selected="selected" value="0">Select</option>
</select>
</td>

我认为下拉列表的名称应该是
Jobsprocesscomplete[$I][lookupprocess\u id]
,因为您正在处理数组。这个值应该存储到
$\u POST['Jobsprocesscomplete'][0]['lookupprocess\u id']

你应该为POST表单生成显示html我知道的不多,但是你能试着将Jobsprocesscomplete[$i]lookupprocess\u id更改为Jobsprocesscomplete[$i]我认为下拉列表的名称应该是
Jobsprocesscomplete[$i][lookupprocess\u id]
因为您正在处理数组。该值应该存储到
$\u POST['Jobsprocesscomplete'][0]['lookupprocess\u id']
@i缺少方括号。谢谢
<td style="width: 233px">
<select id="Jobsprocesscomplete_0_lookupprocess_id" name="Jobsprocesscomplete[0]lookupprocess_id" onchange="createjobprocesscomplete(13022020,this,0)" style="width:230px">
<option value="533">25 NA</option>
<option value="13059">35 1st Pass Velocity Analysis</option>
<option value="13061">75 3rd Pass Velocity Analysis</option>
<option value="13063">100 DBS</option>
<option selected="selected" value="0">Select</option>
</select>
</td>
<td class="th3">
<input id="hidden_Jobsprocesscomplete_0_lookupprocess_id" type="hidden" name="Jobsprocesscomplete[0][lookupprocess_id]">
<input id="Jobsprocesscomplete_0_JOBNO" type="hidden" name="Jobsprocesscomplete[0][JOBNO]" value="13022020">
<input id="Jobsprocesscomplete_0_datedone" class="hasDatepicker" type="text" name="Jobsprocesscomplete[0][datedone]" style="width:80px;">
</td>