forms - How to integrate a non-model radio button element to a CActiveForm in Yii? -


in yii application, i'm working on, there simple cactiveform, elements model related , this:

<div class="row">     <?php echo $form->labelex($model, 'foo'); ?>     <?php echo $form->textfield($model, 'foo', array(/* html options */)); ?>     <?php echo $form->error($model, 'foo'); ?> </div> 

now want implement following case:

the should radio button element bar 2 options. depending on selected option different form elements should displayed (a dropdown list existing bar-entries oder set of field create new one). in controller want analyze field bar and, if needed (means e.g. if bar == 1) use provided field set create new table entry.

cactiveform#radiobutton(...) needs model input. case model not relevant -- radio button need should contain/provide information, how data has processed. there yii conform way implement requirement , create "non-model" form element yii cactiveform?


Comments

Popular posts from this blog

toolbar - How to add link to user registration inside toobar in admin joomla 3 custom component -

linux - disk space limitation when creating war file -

How to provide Authorization & Authentication using Asp.net, C#? -