Skip to content

Instantly share code, notes, and snippets.

@subdesign
Created July 10, 2012 09:03
Show Gist options
  • Save subdesign/3082150 to your computer and use it in GitHub Desktop.
Save subdesign/3082150 to your computer and use it in GitHub Desktop.
James Rainaldi's twitter bootstrap helper example
<?php
$this->load->helper('twitter_bootstrap');
$this->load->view('header');
echo form_open($this->uri->uri_string(),
array('class'=>'form-horizontal well',
'method'=>'post'
));
echo form_error('login');
echo control_group('Login',
array(form_input('login',set_value('login'),'id="login" ')),
array('help-inline'=>'inline help text goes here')
);
echo control_group('Password',
array(form_input('password',set_value('password'), 'id="password"')),
array('help-inline'=>'more inline help'));
echo control_group('',
array(form_button(array(
'name' => 'button',
'id' => 'login-btn',
'class' => 'btn-primary',
'type' => 'button',
'content' => 'Login'
))));
echo form_close();
$this->load->view('footer');
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment