19 lines
415 B
PHP
Executable File
19 lines
415 B
PHP
Executable File
<?php
|
|
use phpformbuilder\Form;
|
|
session_start();
|
|
include_once '../../phpformbuilder/Form.php';
|
|
$json = json_decode($_POST['data']);
|
|
foreach ($json as $var => $val) {
|
|
${$var} = $val;
|
|
}
|
|
|
|
$form = new Form('fg-element', 'horizontal');
|
|
if (!empty($helper)) {
|
|
$form->addHelper($helper, $name);
|
|
}
|
|
if (empty($label)) {
|
|
$form->setCols(0, 12);
|
|
}
|
|
$form->addTextarea($name, $value, $label, $attr);
|
|
echo $form->html;
|