定制 formagic/formagic 二次开发

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

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

formagic/formagic

最新稳定版本:v1.5.7

Composer 安装命令:

composer require formagic/formagic

包简介

Form generator for PHP 5

README 文档

README

Thank you for your interest in Formagic. The source files within are subject to the new BSD license that is bundled with this package in the file LICENSE.

SYSTEM REQUIREMENTS

There are not many requirements for using Formagic, PHP 5.1 and above will do (PHP 4 is not supported). Formagic will run with any php.ini settings. It is designed to run without errors or warnings down to E_STRICT level.

INSTALLATION

The easiest way to include Formagic into your project is using Composer. This will download the necessary sources and create the autoloader for you, so you can just start using Formagic without further ado.

{
    "require": {
        "formagic/formagic": "1.5.6"
    }
}

You can also just unpack the ZIP-File you can download at GitHub into a directory of your choice and include the Formagic autoloader in your code:

<?php
require_once '/path/to/formagic/src/Formagic/Autoloader/Autoloader.php';
Formagic_Autoloader::register();

USAGE

Please visit http://www.formagic-php.net for examples and How-Tos. Here is a very short example of Formagic to get you started:

<?php

$form = new Formagic();
$form
    ->addItem(
        'input', 
        'myInput', 
        array(
            'label' => 'My first input',
            'rules' => 'mandatory'
            )
        )
    ->addItem(
        'submit', 
        'mySubmit', 
        array(
            'label' => 'Send'
        )
    );

// check if form only contains valid values
if ($form->validate()) {
    echo "submitted and ok<br />";
    $form->setReadonly(true);
}

// displays the form
echo $form->render();

Of course there is much more to Formagic than this, but this will get you a picture how easy it is to create HTML forms with Formagic.

API DOCUMENTATION

The API documentation is created using phpDocumentor. You will find the current API documentation here: http://www.formagic-php.net/docs/api/

FORMAGIC LINKS

You will find the official Formagic project site here: http://www.formagic-php.net

统计信息

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

GitHub 信息

  • Stars: 7
  • Watchers: 3
  • Forks: 3
  • 开发语言: PHP

其他信息

  • 授权协议: BSD-3-Clause
  • 更新时间: 2013-09-23