https://github.com/yiisoft/form
The package helps with implementing data entry forms
Science Score: 26.0%
This score indicates how likely this project is to be science-related based on various indicators:
-
○CITATION.cff file
-
✓codemeta.json file
Found codemeta.json file -
✓.zenodo.json file
Found .zenodo.json file -
○DOI references
-
○Academic publication links
-
○Committers with academic emails
-
○Institutional organization owner
-
○JOSS paper metadata
-
○Scientific vocabulary similarity
Low similarity (15.7%) to scientific vocabulary
Keywords
Keywords from Contributors
Repository
The package helps with implementing data entry forms
Basic Info
- Host: GitHub
- Owner: yiisoft
- License: bsd-3-clause
- Language: PHP
- Default Branch: master
- Homepage: https://www.yiiframework.com/
- Size: 1.11 MB
Statistics
- Stars: 46
- Watchers: 17
- Forks: 18
- Open Issues: 4
- Releases: 5
Topics
Metadata Files
README.md
Yii Form
The package provides a set of widgets to help with dynamic server-side generation of HTML forms. The following widgets are available out of the box:
- input fields:
Checkbox,CheckboxList,Color,Date,DateTimeLocal,Email,File,Hidden,Image,Number,Password,RadioList,Range,Select,Telephone,Text,Textarea,Time,Url; - buttons:
Button,ResetButton,SubmitButton; - group widgets:
ButtonGroup,Fieldset. - other:
ErrorSummary.
These themes are available out of the box:
- Bootstrap 5 Horizontal,
- Bootstrap 5 Vertical.
Requirements
- PHP 8.1 or higher.
Installation
The package could be installed with composer:
shell
composer require yiisoft/form
General usage
Configure themes (optional):
```php use Yiisoft\Form\ThemeContainer; use Yiisoft\Form\ThemePath;
ThemeContainer::initialize( config: [ 'vertical' => require ThemePath::BOOTSTRAP5VERTICAL, 'horizontal' => require ThemePath::BOOTSTRAP5HORIZONTAL, ], defaultConfig: 'vertical', ); ```
... and use Field helper to create widgets:
```php use Yiisoft\Form\PureField\Field;
echo Field::text('firstName', theme: 'horizontal')->label('First Name')->autofocus(); echo Field::text('lastName', theme: 'horizontal')->label('Last Name'); echo Field::color('favoriteColor')->label('Favorite Color')->value('#3498db'); echo Field::select('sex')->label('Sex')->optionsData(['m' => 'Male', 'f' => 'Female'])->prompt('—'); echo Field::number('age')->label('Age')->hint('Please enter your age.'); echo Field::submitButton('Submit')->buttonClass('primary'); ```
The result of executing the code above will be:
html
<div class="mb-3 row">
<label class="col-sm-2 col-form-label">First Name</label>
<div class="col-sm-10">
<input type="text" class="form-control" name="firstName" autofocus>
</div>
</div>
<div class="mb-3 row">
<label class="col-sm-2 col-form-label">Last Name</label>
<div class="col-sm-10">
<input type="text" class="form-control" name="lastName">
</div>
</div>
<div class="mb-3">
<label class="form-label">Favorite Color</label>
<input type="color" class="form-control" name="favoriteColor" value="#3498db">
</div>
<div class="mb-3">
<label class="form-label">Sex</label>
<select class="form-select" name="sex">
<option value>—</option>
<option value="m">Male</option>
<option value="f">Female</option>
</select>
</div>
<div class="mb-3">
<label class="form-label">Age</label>
<input type="number" class="form-control" name="age">
<div class="form-text">Please enter your age.</div>
</div>
<div class="mb-3">
<button type="submit" class="primary">Submit</button>
</div>
Documentation
If you need help or have a question, the Yii Forum is a good place for that. You may also check out other Yii Community Resources.
Support the project
Follow updates
License
The Yii Form is free software. It is released under the terms of the BSD License.
Please see LICENSE for more information.
Maintained by Yii Software.
Owner
- Name: Yii Software
- Login: yiisoft
- Kind: organization
- Location: Earth
- Website: https://www.yiiframework.com
- Twitter: yiiframework
- Repositories: 203
- Profile: https://github.com/yiisoft
Yii Framework and packages
GitHub Events
Total
- Create event: 7
- Issues event: 5
- Release event: 2
- Watch event: 1
- Delete event: 8
- Issue comment event: 15
- Push event: 27
- Pull request review event: 13
- Pull request review comment event: 5
- Pull request event: 13
Last Year
- Create event: 7
- Issues event: 5
- Release event: 2
- Watch event: 1
- Delete event: 8
- Issue comment event: 15
- Push event: 27
- Pull request review event: 13
- Pull request review comment event: 5
- Pull request event: 13
Committers
Last synced: 8 months ago
Top Committers
| Name | Commits | |
|---|---|---|
| Sergei Predvoditelev | s****i@p****u | 86 |
| Wilmer Arambula | 4****w | 78 |
| Alexander Makarov | s****m@r****u | 29 |
| Alexey Rogachev | a****0@g****m | 19 |
| Dmitriy Derepko | x****z@l****u | 13 |
| dependabot[bot] | 4****] | 11 |
| devanych | m****l@d****u | 8 |
| Arman Poghosyan | a****t | 4 |
| thenotsoft | 4****t | 4 |
| Anton Samoylenko | a****5@g****m | 3 |
| Rustam Mamadaminov | r****v@g****m | 3 |
| Иван | 6****2 | 3 |
| Evgeniy Tkachenko | e****r@g****m | 2 |
| Gerych1984 | 9****4 | 2 |
| Igor Maliy | i****h@g****m | 2 |
| Luiz Marin | 6****n | 2 |
| StyleCI Bot | b****t@s****o | 2 |
| Aleksei Gagarin | r****k@y****u | 1 |
| Alexey Chernousov | i****t@y****u | 1 |
| Daniel Gurev | d****d@g****m | 1 |
| Ihor Sychevskyi | a****3@g****m | 1 |
| Sanka | a****r@a****e | 1 |
| Tomasz Kane | t****e@g****m | 1 |
| Viktor Babanov | v****r@g****m | 1 |
| Иван | T****h | 1 |
Committer Domains (Top 20 + Academic)
Issues and Pull Requests
Last synced: 6 months ago
All Time
- Total issues: 43
- Total pull requests: 188
- Average time to close issues: 6 months
- Average time to close pull requests: 28 days
- Total issue authors: 15
- Total pull request authors: 17
- Average comments per issue: 1.84
- Average comments per pull request: 1.28
- Merged pull requests: 154
- Bot issues: 0
- Bot pull requests: 19
Past Year
- Issues: 5
- Pull requests: 12
- Average time to close issues: 1 day
- Average time to close pull requests: 1 day
- Issue authors: 2
- Pull request authors: 4
- Average comments per issue: 0.0
- Average comments per pull request: 0.83
- Merged pull requests: 12
- Bot issues: 0
- Bot pull requests: 1
Top Authors
Issue Authors
- vjik (16)
- arogachev (10)
- tomaszkane (3)
- olegbaturin (1)
- g-rodigy (1)
- Mister-42 (1)
- hyncica (1)
- Gerych1984 (1)
- ruslansp (1)
- wa1kb0y (1)
- kamilalterpage (1)
- samdark (1)
- terabytesoftw (1)
- Arhell (1)
- armpogart (1)
Pull Request Authors
- vjik (85)
- arogachev (51)
- terabytesoftw (40)
- dependabot[bot] (22)
- xepozz (8)
- luizcmarin (6)
- rustamwin (4)
- armpogart (3)
- githubjeka (3)
- beastbytes (2)
- sankaest (2)
- Arhell (2)
- Gerych1984 (2)
- olegbaturin (1)
- tomaszkane (1)
Top Labels
Issue Labels
Pull Request Labels
Packages
- Total packages: 1
-
Total downloads:
- packagist 81,512 total
- Total dependent packages: 1
- Total dependent repositories: 23
- Total versions: 5
- Total maintainers: 4
packagist.org: yiisoft/form
The package helps with implementing data entry forms.
- Homepage: https://www.yiiframework.com/
- License: BSD-3-Clause
-
Latest release: 1.4.0
published 11 months ago
Rankings
Maintainers (4)
Funding
- url: https://github.com/yiisoft: type: github
- url: https://opencollective.com/yiisoft: type: open_collective
Dependencies
- phpunit/phpunit ^9.5 development
- roave/infection-static-analysis-plugin ^1.18 development
- spatie/phpunit-watcher ^1.23 development
- vimeo/psalm ^4.23 development
- yiisoft/test-support ^1.4 development
- php ^8.0
- yiisoft/friendly-exception ^1.0
- yiisoft/html ^2.4
- yiisoft/http ^1.2
- yiisoft/strings ^2.0
- yiisoft/validator dev-master
- yiisoft/widget ^1.0