Hello again
Now I have a question with forms and CTabView
I have the following create view:
<div class="yiiForm">
<?php echo CHtml::form(); ?>
<?php echo CHtml::errorSummary($estimate); ?>
<?php echo CHtml::errorSummary($repetition); ?>
<div class="simple">
<?php echo CHtml::activeLabelEx($estimate,'description'); ?>
<?php echo CHtml::activeTextField($estimate,'description',array('size'=>60,'maxlength'=>255)); ?>
</div>
<div class="simple">
<?php echo CHtml::activeLabelEx($estimate,'cash'); ?>
<?php echo CHtml::activeTextField($estimate,'cash',array('size'=>10,'maxlength'=>10)); ?>
</div>
<hr />
<h3>Repetition</h3>
<?php
$Tabs = array(
'UNIQUE'=>array('title'=>'Unique','view'=>'/repetition/_formUnique'),
'YEAR'=>array('title'=>'Year','view'=>'/repetition/_formYear'),
'MOTH'=>array('title'=>'Month','view'=>'/repetition/_formMonth'),
'WEEK'=>array('title'=>'Week','view'=>'/repetition/_formWeek'),
'DAILY'=>array('title'=>'Daily','view'=>'/repetition/_formDaily'),
'DAY'=>array('title'=>'Day','view'=>'/repetition/_formDay')
);
$viewData = array('repetition'=>$repetition);
$this->widget('CTabView', array('tabs'=>$Tabs, 'viewData'=>$viewData));
?>
<hr />
<div class="action">
<?php echo CHtml::submitButton('Save'); ?> <?php echo CHtml::resetButton('Reset'); ?>
</div>
<?php echo CHtml::closeTag('form'); ?>
</div><!-- yiiForm -->
Each one of '/repetition/_formUnique', '/repetition/_formYear', etc, are different (the ask for different thinks for $repetition, or in some different way).
Now: How can I ask in my controller wich one of the tabs is the one selected at submit time?
So in my actionCreate I can validate just the $repetition depending on the selected tab.
All works fine, except that point, that I don't know how know the selected tab.