Skip to content

matthewaprice/BS-Forms

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 

Repository files navigation

BS-Forms

PHP Class for Implementing Twitter Bootstrap 3 Forms

Fact: Writing endless HTML containers for Bootstrap 3 forms is boring and time consuming.

You could have some shortcuts in your code editor that will draw them quick enough, but even that still displays a lot of junk on your templates and views.

Also, if you have all that html on your pages and want to add more functionality, you have to add that html to every single page that will use that new feature.

BS Forms to the rescue!

Full Documentation at: http://bs-forms.com

Basic Example Usage:

$form = new BS_Form();
$form->start(
	'post',
	'/form-processor',
	array( 'class' => 'form_class', 'id' => 'form_id' )
);
$form->text(
	array(
		'name' => 'first_name',
		'id' => 'first_name',
		'class' => 'form-control',
		'label' => 'First Name'
	)
);
$form->text(
	array(
		'name' => 'last_name',
		'id' => 'last_name',
		'class' => 'form-control',
		'label' => 'Last Name'
	)
);
$form->text(
	array(
		'name' => 'email',
		'id' => 'email',
		'class' => 'form-control',
		'label' => 'Email Address'
	)
);
$form->submit_button(
	array(
		'name' => 'submit',
		'id' => 'submit',
		'class' => 'btn btn-success',
		'display' => 'Submit'
	)
);
$form->end();

About

PHP Class for Implementing Twitter Bootstrap 3 Forms

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published