Form Builder PHP Class 3.1 发布

jopen 12年前

PFBC是一个面向对象的PHP类,用于构建HTML表单。它包括Ajax支持,jQuery, reCAPTCHA, TinyMCE, 和 CKEditor。它还能与Bootstrap集成(一个来自推ter的前端框架。它还支持HTML表单元素和属性。

此版本增加了大量的错误修正和集成包的更新(包括
bootstrap, tinymce, ckeditor等)。它完全向后兼容3.0。示例代码:

<?php  //PFBC 3.x PHP 5 >= 5.3  session_start();  include($_SERVER["DOCUMENT_ROOT"] . "/PFBC/Form.php");  $form = new PFBC\Form("GettingStarted");  $form->addElement(new PFBC\Element\Textbox("My Textbox:", "MyTextbox"));  $form->addElement(new PFBC\Element\Select("My Select:", "MySelect", array(     "Option #1",     "Option #2",     "Option #3"  )));  $form->addElement(new PFBC\Element\Button);  $form->render();    //PFBC 3.x PHP 5  session_start();  include($_SERVER["DOCUMENT_ROOT"] . "/PFBC/Form.php");  $form = new Form("GettingStarted");  $form->addElement(new Element_Textbox("My Textbox:", "MyTextbox"));  $form->addElement(new Element_Select("My Select:", "MySelect", array(     "Option #1",     "Option #2",     "Option #3"  )));  $form->addElement(new Element_Button);  $form->render();  ?>