2017 © Pedro Peláez
 

codeigniter-library codeigniter-form-builder

Easily create form in Codeigniter framework.

image

tuhin18003/codeigniter-form-builder

Easily create form in Codeigniter framework.

  • Monday, March 12, 2018
  • by tuhin18003
  • Repository
  • 1 Watchers
  • 0 Stars
  • 2 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 2 Versions
  • 0 % Grown

The README.md

Codeigniter Form Builder

This is under heavy construction and in early alpha stages. It is an easy way to create form in Codeigniter developement., (*1)

Installation

Bleeding Edge

During your development, you can keep up with the latest changes on the master branch by setting the version requirement for form_builder to dev-master, (*2)

{
   "require": {
      "tuhin18003/codeigniter-form-builder": "dev-master"
   }
}

Via command line:

composer require tuhin18003/codeigniter-form-builder

How to use:

You can use it very easily on your code and easily create bootstrap from without typing html into view file., (*3)

Basic Form Example:

public function index()
{
  $this->load->helper('form');

  $form = new \Cs_form\Cs_form();
  $bootstrap = $form->Bootstrap();

  $inputs = $bootstrap->generate_basic_form(array(
    'action' => 'test',
        'attributes' => array( 'class' => 'formclass', 'id' => 'myform' ),
        'fields' => array(
            array(
                    'type'          => 'text',
                        'label'         => array( 'text' => 'What is your Name', 'id' => 'username', 'attribute' => array( 'class' => '')),
                        'input'          => array(
                            'name'          => 'username',
                            'id'            => 'username',
                            'value'         => 'johndoe',
                            'class'         => 'form-control'
                        )
                    )
                )
            ));

   $this->load->view( 'welcome_message', array( 'inputs' => $inputs ) );
}

Inline Form Example:

 $inputs = $bootstrap->generate_inline_form(array(
    'action' => 'test',
        'attributes' => array( 'id' => 'myform' ),
        'fields' => array(
            array(
                    'type'          => 'text',
                        'label'         => array( 'text' => 'What is your Name', 'id' => 'username', 'attribute' => array( 'class' => '')),
                        'input'          => array(
                            'name'          => 'username',
                            'id'            => 'username',
                            'value'         => 'johndoe',
                            'class'         => 'form-control'
                        )
                    )
                )
            ));

Horizontal Form Example:

$inputs = $bootstrap->generate_horizontal_form(array(
    'action' => 'test',
        'attributes' => array( 'id' => 'myform' ),
        'fields' => array(
            array(
                    'type'          => 'text',
                        'label'         => array( 'text' => 'What is your Name', 'id' => 'username', 'attribute' => array( 'class' => 'col-sm-2 control-label')),
                        'input'          => array(
                            'name'          => 'username',
                            'id'            => 'username',
                            'value'         => 'johndoe',
                            'class'         => 'form-control',
                            'input_wrap_class' => 'col-sm-10'
         )
      )
   )
));

The Versions

12/03 2018

dev-master

9999999-dev https://github.com/tuhin18003/codeigniter-form-builder

Easily create form in Codeigniter framework.

  Sources   Download

MIT

The Requires

  • php >=5.5.0

 

form codeigniter codeigniter form codeigniter bootstrap

12/03 2018

v1.0.0

1.0.0.0 https://github.com/tuhin18003/codeigniter-form-builder

Easily create form in Codeigniter framework.

  Sources   Download

MIT

The Requires

  • php >=5.5.0

 

form codeigniter codeigniter form codeigniter bootstrap