<commit_before>[![Build status](https://travis-ci.org/ValkSystems/bootbuilder.svg)](https://travis-ci.org/ValkSystems/bootbuilder)

# BootBuilder

Bootstrap Form Building made easy in PHP.

## More ideas
* Customized elements, append HTML
* Hover label
* Bootstrap help text
* Adding validation states (for server-side validation)

## Installation

You can install the package with Composer, check out composer on http://getcomposer.org

Add the following to the required in the composer.json:
```
"valksystems/bootbuilder": "dev-master"
```

## Usage

Checkout the demo folder for demo's with the controls and different styles of forms

### Forms

First of all, you have to create a Form object. There are 2 options right now. Just a normal form and a horizontal form (look at bootstrap page for more information).

To create a form use:
```php
$form = BootBuilder::open();

// Horizontal Form
$horizontal = BootBuilder::openHorizontal();
```

On the form object you can set the properties of a normal form with the following methods:
```php
setAction($action) // Set the action attribute
setClass($class) // set class (this will replace current class)
setId($id) // set the id of the form
setMethod($method) // set the method, either get or post
```

To add controls or panes to the form, use:
```php
$form->add($control);

// Or when adding multiple controls/panes at the same time:<commit_msg>Change the version in the require for composer to use most recent versions<commit_after>[![Build status](https://travis-ci.org/ValkSystems/bootbuilder.svg)](https://travis-ci.org/ValkSystems/bootbuilder)

# BootBuilder

Bootstrap Form Building made easy in PHP.

## More ideas
* Customized elements, append HTML
* Hover label
* Bootstrap help text
* Adding validation states (for server-side validation)

## Installation

You can install the package with Composer, check out composer on http://getcomposer.org

Add the following to the required in the composer.json:
```
"valksystems/bootbuilder": ">=1.0.0"
```

## Usage

Checkout the demo folder for demo's with the controls and different styles of forms

### Forms

First of all, you have to create a Form object. There are 2 options right now. Just a normal form and a horizontal form (look at bootstrap page for more information).

To create a form use:
```php
$form = BootBuilder::open();

// Horizontal Form
$horizontal = BootBuilder::openHorizontal();
```

On the form object you can set the properties of a normal form with the following methods:
```php
setAction($action) // Set the action attribute
setClass($class) // set class (this will replace current class)
setId($id) // set the id of the form
setMethod($method) // set the method, either get or post
```

To add controls or panes to the form, use:
```php
$form->add($control);

// Or when adding multiple controls/panes at the same time:
{'fraction_non_alphanumeric': 0.10063113604488079, 'fraction_numerical': 0.0017531556802244039, 'mean_word_length': 4.572265625, 'pattern_counts': {'":': 2, '<': 3, '<?xml version=': 0, '>': 6, 'https://': 4, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5638304', 'n_tokens_mistral': 812, 'n_tokens_neox': 779, 'n_words': 363}