使用yii表格形式构建器

时间:2016-09-06 08:09:47

标签: php yii

我在表格中制作了一个yii,但问题是我无法控制表单元素,尽管有休息但它们仍然跨越整个宽度

这是我的代码

$memberFormConfig = array(
'elements'=>array(
    'household_first_name'=>array(
        'type'=>'text',
        'maxlength'=>40,
    ),
    'household_middle_name'=>array(
        'type'=>'text',
    ),
    'household_surname'=>array(
        'type'=>'text',
        'maxlength'=>40,
    ),
    '<br>',
    'household_gender'=>array(
        'type'=>'dropdownlist',
        'items'=>array(''=>'-',0=>'Male',1=>'Female',),
    ),
    'household_participates_in_agric'=>array(
        'type'=>'dropdownlist',
        'items'=>array(''=>'-',0=>'yes',1=>'no',),
    ),
    'household_has_independent_activities'=>array(
        'type'=>'dropdownlist',
        'items'=>array(''=>'-',0=>'yes',1=>'no',),
    ),
    'household_hhrelation'=>array(
         'type'=>'dropdownlist',
        'items'=>$relations,
   ),
    'household_dob'=>array(
        'type'=>'zii.widgets.jui.CJuiDatePicker',
        'language'=>'de',
        'options'=>array(
            'showAnim'=>'fold',
        ),
    ),

));

这是表单配置

$this->widget('ext.multimodelform.MultiModelForm',array(
//'validatedMembers' => $validatedMembers,
'id' => 'id_member', //the unique widget id
'formConfig' => $memberFormConfig, //the form configuration array
'tableView' => true,
'model' => $farmerform, //instance of the form model
'jsAfterNewId' => MultiModelForm::afterNewIdDatePicker($formConfig['elements']['dob']),
 ));

&GT;

这会产生这样的形式 enter image description here

我希望它是

enter image description here

即添加控件宽度的中断或表单输入..我该怎么做

0 个答案:

没有答案