Skip to content

Commit

Permalink
Update readme
Browse files Browse the repository at this point in the history
  • Loading branch information
andyexeter committed Aug 23, 2024
1 parent ae3a011 commit b2e9480
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,8 @@
[![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/) and [hCaptcha](https://www.hcaptcha.com/) support, plus other goodies.

## Requirements

Expand All @@ -33,6 +32,7 @@ npm install @palmtree/form
```php
use Palmtree\Form\FormBuilder;
use Palmtree\Form\Captcha\GoogleRecaptcha;
use Palmtree\Form\Captcha\HCaptcha;

$builder = (new FormBuilder('my_form'))
->add('name', 'text', ['error_message' => 'Please enter your name'])
Expand All @@ -45,6 +45,7 @@ $builder = (new FormBuilder('my_form'))
])
->add('recaptcha', 'captcha', [
'captcha' => new GoogleRecaptcha('<site_key>', '<secret>'),
//'captcha' => new HCaptcha('<site_key>', '<secret>'),
]);

$builder->add('send_message', 'submit');
Expand Down

0 comments on commit b2e9480

Please sign in to comment.