承接 elao/form-bundle 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

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

elao/form-bundle

最新稳定版本:v2.1.1

Composer 安装命令:

composer require elao/form-bundle

包简介

Various Form improvements

README 文档

README

Best served with Elao/form.js!

Tools & enhancements for Symfony 2 forms

Installation:

Add ElaoFormBundle to your composer.json:

$ composer require "elao/form-bundle":"~2.1"

Enable the bundle in the kernel:

<?php
// app/AppKernel.php

public function registerBundles()
{
    $bundles = array(
        // ...
        new Elao\Bundle\FormBundle\ElaoFormBundle(),
    );
}

Usage:

Use the provided form template, globally:

# Twig Configuration
twig:
    form_themes:
        - "@ElaoForm/Form/form_elao_layout.html.twig"

Or on a specific form:

{% form_theme form '@ElaoForm/Form/form_elao_layout.html.twig' %}

Features:

Collections:

Provide support for collection:

$('[data-collection]').collection();

Note: For more details, see Elao/form.js collection documentation.

Help:

Provide an help option that automatically adds an help block to the field. Use as below:

$builder->add('email', EmailType::class, array('help' => "A valid email address"));

Note: The help string is gonna be translated by default just like the label of the field.

Buttons:

Provide sortcut for adding submit and reset buttons: All form have now an optional option "submit" and "reset", setting it to true adds a default submit/reset button

$form = $this->createForm(PostType::class, $post, array('submit' => true, 'reset' => true));

统计信息

  • 总下载量: 40.08k
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 6
  • 点击次数: 0
  • 依赖项目数: 0
  • 推荐数: 2

GitHub 信息

  • Stars: 6
  • Watchers: 23
  • Forks: 1
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2014-04-28