Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- /* @var $this FormatoVideoController */
- /* @var $model FormatoVideo */
- /* @var $form CActiveForm */
- ?>
- <div class="form">
- <?php $form=$this->beginWidget('CActiveForm', array(
- 'id'=>'video-form',
- //'enableAjaxValidation'=>true,
- //'enableClientValidation'=>false,
- //'clientOptions'=>array('validateOnSubmit'=>true),
- 'focus'=>'input:visible:enabled:first',
- 'htmlOptions' => array('enctype' => 'multipart/form-data'),
- )); ?>
- <p class="note">Los siguientes campos que tenga <span class="required">*</span> son requeridos.</p>
- <?php
- $items=array(1,2);
- foreach($numero as $i=>$item): ?>
- <div class="row">
- <?php //if($uploaded):?>
- <p>El archivo a sido subido. Verficado <?php //echo $dir?>.</p>
- <?php //endif ?>
- <?php echo $form->labelEx($model,'url_arc');?>
- <?php $this->widget('CMultiFileUpload', array(
- 'name' => 'url_arc',
- 'accept' => 'jpeg|jpg|gif|png',
- 'duplicate' => 'Archivo esta duplicado!',
- 'denied' => 'Invalido tipo de archivo',
- 'max'=>'1',
- 'remove'=> 'REMOVER',
- ));
- ?>
- <?php echo $form->error($model, 'url_arc'); ?>
- </div>
- <?php endforeach; ?>
- <div class="row buttons">
- <?php echo CHtml::submitButton($model->isNewRecord ? 'Guardar' : 'Save'); ?>
- </div>
- <?php $this->endWidget(); ?>
- </div><!-- form -->
- for($i;$i<=5;$i++)
- {
- if(isset($_POST['personas'[$i]]))
- {
- $model=new personas;
- $model->attributes=($_POST['personas'][$i]);
- $model->save();
- }
- }
- en el formulario
- $form->textField($model,'[$i]nombre')..
- wiki/362/how to use multiple instances of the same model in the same form
- 7
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement