Skip to content

Instantly share code, notes, and snippets.

@rvbhute
Last active December 15, 2015 15:39
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save rvbhute/5283428 to your computer and use it in GitHub Desktop.
Save rvbhute/5283428 to your computer and use it in GitHub Desktop.
<div class="control-group ">
<label for="Duration_used_by_customer" class="control-label">Used By Customer</label>
<div class="controls">
<?php $radio = $this->beginWidget('zii.widgets.jui.CJuiButton', array(
'name' => 'btnradio',
'buttonType' => 'buttonset'
)); ?>
<input type="radio" id="radio1" name="Duration[used_by_customer]" value="Yes" <?php if ($model->used_by_customer == 'Yes') echo 'checked="checked"' ?> /><label for="radio1">Yes</label>
<input type="radio" id="radio2" name="Duration[used_by_customer]" value="No" <?php if ($model->isNewRecord || $model->used_by_customer == 'No') echo 'checked="checked"' ?> /><label for="radio2">No</label>
<?php $this->endWidget();?>
<span style="display: none" id="Duration_used_by_customer_em_" class="help-inline error"></span>
</div>
</div>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment