定制 form-manager/bootstrap 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

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
  • 点击次数: 1
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 2
  • Watchers: 1
  • Forks: 2
  • 开发语言: PHP

其他信息

  • 授权协议: AGPL-3.0
  • 更新时间: 2014-09-14