form-manager/bootstrap
最新稳定版本:v2.0.2
Composer 安装命令:
composer require form-manager/bootstrap
包简介
FormManager extension to create bootstrap like forms
关键字:
README 文档
README
Created by Oscar Otero http://oscarotero.com oom@oscarotero.com
Requirements:
- PHP 5.4
- Composer or any PSR-4 autoloader
This is a extension of FormManager library to generate bootstrap forms easily
Usage
use FormManager\Bootstrap; $myForm = Bootstrap::form([ 'name' => Bootstrap::text()->label('Your name'), 'email' => Bootstrap::email()->label('Your email') ]); echo $myForm;
You can generate horizontal forms and inline forms:
use FormManager\Bootstrap; $myHorizontalForm = Bootstrap::formHorizontal($fields); $myInlineForm = Bootstrap::formInline($fields);
Use set method to customize each field. The available properties:
- size: (sm|lg) To create small/large fields
- addon-before: To insert an addon before the input
- addon-after: To insert an addon after the input
- help: To insert a help block before the input
use FormManager\Bootstrap; $myForm = Bootstrap::form([ 'name' => Bootstrap::text()->label('Your name')->set('size', 'lg'), 'email' => Bootstrap::email()->label('Your email')->set([ 'addon-before' => '@', 'help' => 'Insert here your email' ]) ]); echo $myForm;
More information:
统计信息
- 总下载量: 7.95k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 2
- 点击次数: 2
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: AGPL-3.0
- 更新时间: 2014-09-14