Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/wyntonfranklin/lazy-yii
A automated form handler using models for yii.
https://github.com/wyntonfranklin/lazy-yii
forms yii yii-extension yii-widgets
Last synced: 1 day ago
JSON representation
A automated form handler using models for yii.
- Host: GitHub
- URL: https://github.com/wyntonfranklin/lazy-yii
- Owner: wyntonfranklin
- Created: 2018-05-28T00:59:13.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2018-05-31T22:05:41.000Z (over 6 years ago)
- Last Synced: 2024-11-06T08:47:04.712Z (about 2 months ago)
- Topics: forms, yii, yii-extension, yii-widgets
- Language: PHP
- Homepage:
- Size: 8.79 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# lazy-yii
An automated form creator for yii. Create forms easily form you models.
## Getting Started
Copy the folder and place in your extensions folder in your yii project. This is
a YII extension so you would need the whole framework for this to work.### Prerequisites
* Yii
### Usage
To use with a project just add the following code
`$this->widget('application.extensions.LazyModel.LazyModel', array(
'model' => $model));`
This will generated a layout of text boxes for your model.
To gain more control of your form you need to add more configurations.
### PropertiesA list of the properties of the widget
* model - A CActiveRecord Class
* formId - The id of the form element
* cssClass - The class of the form element
* elements - An array of attributes for you model
* buttons - An array of attributes for your buttons### Elements
A list of Attributes for your elements
* name - The label of the element
* cssClass - The class of the element
* elementId - The id of the element
* elementStyle - A string containing styles
* type - The Type of element
* text
* textarea
* number
* file
* dropdown
* checkboxlist
* date
* datetime
* dropDownData - the data for a dropdown field
* rows - Rows for a text area type element
* cols - Columns for a text are type element
### Buttons
A List of attributes for your button elements
* btnName - The name of your button
* btnValue - The value of you button
* btnType - The type of your button ( default: submit)
* btnStyle - Styling for your buttons