Radio List Reflects a simple form by submitting a process. If you have the following list implementation e.g.
<div class="form">
<?php echo CHtml::beginForm(); ?>
<div class="row">
<?php
echo CHtml::radioButtonList(
'registerMode',
'consumer',
array(
'consumer'=>'I am a FOODIE ',
'staff'=>'I want to give Services ',
),
array('template'=>'<div class="rb">{input}</div><div class="rb">{label}</div><div class="clear"> </div>')
);
?>
</div>
<div class="row">
<?php echo CHtml::submitButton('Register',array('class'=>'submit')); ?>
</div>
<?php echo CHtml::endForm(); ?>
</div>
when the next input is sent
array
(
'registerMode' => 'consumer'
'yt0' => 'Register'
)
it represents the name or index of the selected option
the following code can get the values
if(isset($_POST['registerMode']))
CVarDumper::Dump($_POST['registerMode'],100,true);
Luck
source
share