hello yii frindes
I hope you can help me
I built a form (Activity._form) which can be accessed in 3 ways.
- main calender
echo CHtml::button('create', array('onclick' => 'js:document.location.href="index.php?r=activity/create&time_code='.$timecode.'"'));
the $timecode Represents time and day
- Updating
using exsisting $model
- Creation - with no $timecode that sent
the _form is
<div class="row">
<?php echo $form->textField($model,'timetable_code',array('id'=>'timecode','tabindex'=>3,'value'=>$_GET['time_code'], 'readonly' => 'true')); ?>
<?php echo $form->error($model,'timetable_code'); ?>
</div>
It works great on a 1 but when I try the others it’s not because missing variable $time_code
Is there a way to use the same form in three cases, or should I create a new form for each of them
?