<?php include 'FormMaker.php'; ?>
<?php
/**
* @file
* Form maker
*
* @copyright Copyright (C) 2015 OSb Web Solutions
* @author Ovidiu S Bokar <contact@osbwebsolutions.com>
* @date 24/02/2015
*
*/
/*
The below code will create:
<form method="POST" name="Lipsum" class"form-class" id="form-id">
*/
$formOptions = array(
'method' => 'POST',
'name' => 'Lipsum',
'class' => 'form-class',
'id' => 'form-id',
);
FormMaker::getInstance()->form_open($formOptions);
/*
The below code will create:
<label class="my-label-class">My Label Name</label>
*/
$labelName = "My Label Name";
$optionLabel = array(
"class" => "my-label-class"
);
FormMaker::getInstance()->form_open($labelName,$optionLabel);
/*
The below code will create:
<input name="input-name" class="my-input-class">
*/
$optionInput = array(
"name" => "input-name",
"class" => "my-input-class",
);
FormMaker::getInstance()->form_input($opstionInput);
/*
The below code will create:
<textarea rows="5" cols="60" class="my-textarea-class"></textarea>
*/
$optionTextarea = array(
"rows" => 5,
"cols" =>60,
"class" => "my-textarea-class",
);
FormMaker::getInstance()->form_textarea($optionTextarea);
/*
The below code will create:
<button class="my-button-class">Click here!</button>
*/
$buttonName = "Click here!";
$optionButton = array(
"class" => "my-button-class",
);
FormMaker::getInstance()->form_button($buttonName,$optionTextarea);
/*
The below code will create:
</form>
*/
FormMaker::getInstance()->form_close();
|