Skip to content

Commit

Permalink
Update readme
Browse files Browse the repository at this point in the history
  • Loading branch information
andyexeter committed Aug 22, 2024
1 parent cb97c16 commit a434023
Showing 1 changed file with 15 additions and 1 deletion.
16 changes: 15 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,21 +4,32 @@
[![Build](https://img.shields.io/github/actions/workflow/status/palmtreephp/form/build.yaml?branch=master)](https://github.com/palmtreephp/form/actions/workflows/build.yaml)
[![Packagist Version](https://img.shields.io/packagist/v/palmtree/form)](https://packagist.org/packages/palmtree/form)

PHP form builder with [Bootstrap](https://getbootstrap.com/) classes, [validation](docs/constraints.md), [data binding](docs/data-binding.md), [Google Recaptcha](https://www.google.com/recaptcha/intro/) support and other goodies
PHP form builder with [Bootstrap](https://getbootstrap.com/)
classes, [validation](docs/constraints.md), [data binding](docs/data-binding.md), [Google Recaptcha](https://www.google.com/recaptcha/intro/)
support and other goodies

## Requirements

* PHP >= 8.1

## Installation

Use composer to add the package to your dependencies:

```sh
composer require palmtree/form
```

Optional: Install the NPM package for AJAX form submission, CAPTCHA support and form collections:

```sh
npm install @palmtree/form
```

## Usage Example

#### Build

```php
use Palmtree\Form\FormBuilder;
use Palmtree\Form\Captcha\GoogleRecaptcha;
Expand All @@ -44,7 +55,9 @@ $form = $builder->getForm();
```

#### Render

```html

<div class="container">
<?= $form->render(); ?>
</div>
Expand All @@ -54,6 +67,7 @@ $form = $builder->getForm();
```

#### Process

```php
$form->handleRequest();

Expand Down

0 comments on commit a434023

Please sign in to comment.