Skip to content

zanbaldwin/yii-forms

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

23 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Yii Forms

Version: 2.0.1

A collection of component classes for Yii forms to provide cross-theme rendering of form inputs, without having to know the types of inputs that were defined in form configuration files. Since version 2.0.0 this repository is a Composer library package installable via Packagist. Simply add it as a dependancy of your projects with composer require mynameiszanders/yii-forms:2.* or add the following to your composer.json configuration file:

"require": {
    "mynameiszanders/yii-forms": "2.*"
},

To use, simply use application\components\Form rather than CForm when creating an instance of the form builder. You might also want to read the dummies guide for building forms with the new classes. It's not great, and that's because I hate writing documentation (source comments, baby!) and managed to knock this out in 4 hours.

If you want to rename application\components\ActiveForm, make sure to update the reference in application\components\Form::activeForm.

Changes

It adds the methods:

  • application\components\ActiveForm::input()
  • application\components\ActiveForm::button()
  • application\components\ActiveForm::hint()

And extends the methods:

About

A collection of components classes to provide cross-theme rendering of inputs, without requiring knowledge of the input types from the form configuration files.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages