Help With The Multimodelform (form design)
Yii Framework good community with my problem is that I can not MultimodelForm and sort my text boxes for my application
if anyone can help me with some code and I've tried everything with no solution
I would like to sort my boxes and on top of my application
Annex code for my views:
to store and update I have no problem but I only need to sort the boxes if anyone has an idea how to order they are grateful .. thanks
Yii Framework good community with my problem is that I can not MultimodelForm and sort my text boxes for my application
if anyone can help me with some code and I've tried everything with no solution
I would like to sort my boxes and on top of my application
Annex code for my views:
$memberFormConfig = array( 'showErrorSummary' => true, 'elements'=>array( 'asociado_id'=>array( 'type'=>'text', 'size'=>'20', 'maxlength'=>'40', //'STYLE'=>'text-align:center', 'id'=>'asociado_id', //'style'=>'color:white; background-color:LightSlateGray; font-size: small', //'size'=>105, 'class'=>'form', ), 'dependecia'=>array( 'type'=>'text', 'size'=>'20', 'maxlength'=>'50', 'id'=>'dependecia', ), 'direccion_trabajo'=>array( 'type'=>'text', 'id'=>'direccion_trabajo', 'maxlength'=>100, ), 'ubicacion_admin'=>array( 'type'=>'text', 'id'=>'ubicacion_admin', 'size'=>'20', 'maxlength'=>40, ), 'estado_id'=>array( 'type'=>'dropdownlist', //'items'=>array(''=>'Seleccione',1=>'Distrito Capital',2=>'Miranda',3=>'Sucre'), /// valor=>campo 'items'=>CHtml::listData(CahorEstado::model()->findAll(),'id','Estado'), 'prompt'=>'--please select--', 'ajax'=>array( 'type'=>'POST', 'url'=>CController::createUrl('dynamicestado'), 'update'=>'#ciudad_id',//.CHtml::activeId($modelb,'ciudad_id'), 'data'=>array('estado_id'=>'js:this.value'), ) //'id'=>'estado_id', // 'size'=>'20', //'maxlength'=>40, ), 'ciudad_id'=>array( 'type'=>'dropdownlist', 'items'=> CHtml::listData(CahorCiudad::model()->findAll(),'id','ciudad'), /// valor=>campo 'id'=>'ciudad_id', 'prompt'=>'Selecione', 'ajax'=>array( 'type'=>'POST', //'update'=>'#'.CHtml::activeId($modelb,'estado_id'), ) //'data'=>array('ciudad_id'=>'js:this.value'), // 'size'=>'20', //'maxlength'=>40, ), 'zona'=>array( 'type'=>'text', 'id'=>'zona', 'size'=>'20', 'maxlength'=>40, ), 'cargo'=>array( 'type'=>'text', 'id'=>'cargo', 'size'=>'20', 'maxlength'=>40, ), 'tipo_id'=>array( 'type'=>'text', 'id'=>'tipo_id', 'size'=>'20', 'max length'=>40, ), 'fecha_ingr_cahor'=>array( 'type'=>'zii.widgets.jui.CJuiDatePicker', 'id'=>'fecha_ingr_cahor', 'language'=>'es', 'options'=>array( 'value'=>$modelb->fecha_ingr_cahor, 'showAnim'=>'fold', // 'size'=>'20', //'maxlength'=>40, )) , 'sueldo_salario_men'=>array( 'type'=>'text', 'id'=>'sueldo_salario_men', 'size'=>'20', 'max length'=>20, ), 'telefono'=>array( 'type'=>'text', 'id'=>'telefono', 'size'=>'20', 'maxlength'=>20, 'style'=>'height:80px;' ), )); $this->widget('ext.multimodelform.MultiModelForm',array( 'id' => 'id_CahorDatoslaboasociado', //the unique widget id 'tableView' => false, 'formConfig' =>$memberFormConfig , //the form configuration array 'model' => $modelb, //instance of the form model 'hideCopyTemplate'=>true, //Mantiene Abierto la mitad del formulario 'addItemText'=>'Añadir Datos laborales del Asociado', 'removeText'=> 'Borrar', 'removeConfirm' => '¿Seguro desea borrar el Registro?', 'options'=>array('clearInputs'=>true), //if submitted not empty from the controller, //the form will be rendered with validation errors 'validatedItems' => $validatedCahorDatoslaboasociado, //'showAddItemOnError' => true, //array of member instances loaded from db 'data' => $modelb->findAll('id=:id', array(':id'=>$model->id)), )); ?>
to store and update I have no problem but I only need to sort the boxes if anyone has an idea how to order they are grateful .. thanks