Skip to content

korobkadima/CFormGenerator

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 

Repository files navigation

CFormGenerator

Small library for simple and fast generate HTML form with CodeIgniter

Example

require_once('CFormGenerator.php');

$f = new CFormGenerator();
	
$list = array(

	array(
		'name' => 'name',
		'text' => 'Name of smt.',
		'type' => 'input'
	),
	
	array(
		'name' => 'hiddenname',
		'type' => 'hidden'
	),
	
	array(
		'name' => 'text',
		'text' => 'Description',
		'type' => 'textarea'
	),
	
	array(
		'name' => 'select',
		'text' => 'Option',
		'type' => 'select',
		'table' => 'selecttable'
	)
);

#set list of options
$f->set_info($list);

#set data from array or database result like array
$f->set_data($data);

#print form
print $g->generate_form();

About

CFormGenerator PHP Library for CodeIgniter

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages