Yii 1.1: uni-form

Yii Uni-Form integration

This extension helps to integrate Uni-Form (http://sprawsm.com/uni-form/) framework that standardizes form markup and styles it with CSS.




  • Yii 1.0 or above


  • Extract the release file under protected/components


See the following code example:

<?php $this->widget('application.components.UniForm'); ?>
<?php echo CUFHtml::beginForm(); ?>
<?php echo CUFHtml::errorSummary($authitem); ?>
<?php echo CUFHtml::openTag('fieldset', array('class'=>'inlineLabels')); ?>
<?php echo CUFHtml::openActiveCtrlHolder($authitem,'name'); ?>
<?php echo CUFHtml::activeLabelEx($authitem,'name'); ?>
<?php echo CUFHtml::activeTextField($authitem, 'name', array('maxlength'=>64)); ?>
<?php echo CUFHtml::closeCtrlHolder(); ?>
<?php echo CUFHtml::openActiveCtrlHolder($authitem,'type'); ?>
<?php echo CUFHtml::activeLabelEx($authitem,'type'); ?>
<?php echo CUFHtml::activeDropDownList($authitem, 'type', AuthItem::model()->typeOptions); ?>
<?php echo CUFHtml::closeCtrlHolder(); ?>
<?php echo CUFHtml::openActiveCtrlHolder($authitem,'description'); ?>
<?php echo CUFHtml::activeLabelEx($authitem,'description'); ?>
<?php echo CUFHtml::activeTextArea($authitem,'description',array('rows'=>3, 'cols'=>50)); ?>
<?php echo CUFHtml::closeCtrlHolder(); ?>
<?php echo CUFHtml::openActiveCtrlHolder($authitem,'bizrule'); ?>
<?php echo CUFHtml::activeLabelEx($authitem,'bizrule'); ?>
<?php echo CUFHtml::activeTextArea($authitem,'bizrule',array('rows'=>3, 'cols'=>50)); ?>
<?php echo CUFHtml::closeCtrlHolder(); ?>
<?php echo CUFHtml::openActiveCtrlHolder($authitem,'data'); ?>
<?php echo CUFHtml::activeLabelEx($authitem,'data'); ?>
<?php echo CUFHtml::activeTextArea($authitem,'data',array('rows'=>2, 'cols'=>50)); ?>
<?php echo CUFHtml::closeCtrlHolder(); ?>
<?php echo CUFHtml::closeTag('fieldset'); ?>
<div class="buttonHolder">
<?php echo CUFHtml::resetButton(Yii::t('general', 'Reset')); ?>
<?php echo CUFHtml::submitButton($update ? Yii::t('general', 'Save') : Yii::t('general', 'Create')); ?>
<?php echo CUFHtml::endForm(); ?>

Change Log

September 6, 2009

  • Small fixes

April 21, 2009

  • Initial release.

Total 3 comments

#2689 report it
Trejder at 2011/01/29 09:58am
Thank you

Thank you very much! That's clears everything! :] Have a nice weekend...

#2687 report it
fduch at 2011/01/29 05:21am
There was description

When I published extension, description was here :) Looks like it was lost while convert site to new design/form. Anyway - I updated description.

#2680 report it
Trejder at 2011/01/27 06:18am
Extension description...

Would be nice, if you could write at least one-two line description of what this extension is for or what does it do? Leaving just "This extension is ..." and letting user guess isn't the best approach after all...

Leave a comment

Please to leave your comment.

Create extension
  • Yii Version: 1.1
  • License: New BSD License
  • Developed by: fduch
  • Category: User Interface
  • Votes: +5
  • Downloaded: 1,214 times
  • Created on: Apr 21, 2009
  • Last updated: Jan 29, 2011