public function formBuilder($request)
 {
     $fb = new FormBuilder();
     $form = new Form();
     if (!empty($request['select_input_type'])) {
         $fb->inputBuilder($request);
     } else {
         if (!empty($request['add_attr'])) {
             $fb->inputBuilder($request);
         } else {
             if (!empty($request['add_radio'])) {
                 $fb->inputBuilder($request);
             } else {
                 if (!empty($request['clear_form'])) {
                     $form->clearForm($request['form_name']);
                 } else {
                     if (!empty($request['save_form'])) {
                         echo $form->saveForm($request);
                     }
                 }
             }
         }
     }
 }
Ejemplo n.º 2
0
<?php

require '../classes/FormBuilder.class.php';
$fb = new FormBuilder();
$fb->inputBuilder('text');
Ejemplo n.º 3
0
<?php

require_once dirname(__FILE__) . '/../classes/FormBuilder.class.php';
require_once dirname(__FILE__) . '/../classes/Form.class.php';
$fb = new FormBuilder();
$form = new Form();
if (!empty($_REQUEST['select_input_type'])) {
    $fb->inputBuilder($_REQUEST);
} else {
    if (!empty($_REQUEST['add_attr'])) {
        $fb->inputBuilder($_REQUEST);
    } else {
        if (!empty($_REQUEST['clear_form'])) {
            $form->clearForm($_REQUEST['form_name']);
        } else {
            if (!empty($_REQUEST['save_form'])) {
                echo $form->saveForm($_REQUEST);
            }
        }
    }
}