mynameiszanders / yii-forms
Extensions to Yii's form objects to help with view rendering.
Requires
- php: >=5.3.0
This package is not auto-updated.
Last update: 2022-02-01 12:29:16 UTC
README
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: