1- Form
2- ====
1+ php-html-form
2+ ===
33
4- This is fork of [ adamwathan/form] ( https://github.com/adamwathan/form ) . There is only HTML-elements builder
5- without any support frameworks . Extension are supporting PHP from 5.6 to 7 .x!
4+ This is fork of [ adamwathan/form] ( https://github.com/adamwathan/form ) . There is just HTML-elements builder
5+ without any framework support . Extension are supporting PHP from 5.6 to 8 .x!
66
77
8- [ ![ Latest Stable Version] ( https://poser.pugx.org/bupy7/php-html-form/v/stable )] ( https://packagist.org/packages/bupy7/php-html-form )
8+ [ ![ Stable Version] ( https://poser.pugx.org/bupy7/php-html-form/v/stable )] ( https://packagist.org/packages/bupy7/php-html-form )
9+ [ ![ Build status] ( https://github.com/bupy7/php-html-form/actions/workflows/build.yml/badge.svg )] ( https://github.com/bupy7/php-html-form/actions/workflows/build.yml )
10+ [ ![ Coverage Status] ( https://coveralls.io/repos/github/bupy7/php-html-form/badge.svg?branch=master )] ( https://coveralls.io/github/bupy7/php-html-form?branch=master )
911[ ![ Total Downloads] ( https://poser.pugx.org/bupy7/php-html-form/downloads )] ( https://packagist.org/packages/bupy7/php-html-form )
10- [ ![ Latest Unstable Version] ( https://poser.pugx.org/bupy7/php-html-form/v/unstable )] ( https://packagist.org/packages/bupy7/php-html-form )
1112[ ![ License] ( https://poser.pugx.org/bupy7/php-html-form/license )] ( https://packagist.org/packages/bupy7/php-html-form )
12- [ ![ Build Status] ( https://travis-ci.org/bupy7/php-html-form.svg?branch=master )] ( https://travis-ci.org/bupy7/php-html-form )
13- [ ![ Coverage Status] ( https://coveralls.io/repos/bupy7/php-html-form/badge.svg?branch=master&service=github )] ( https://coveralls.io/github/bupy7/php-html-form?branch=master )
1413
1514Boring name for a boring package. Builds form HTML with a fluent-ish, hopefully intuitive syntax.
1615
@@ -21,7 +20,7 @@ Boring name for a boring package. Builds form HTML with a fluent-ish, hopefully
2120- [ Data Binding] ( #data-binding )
2221
2322Installation
24- ------------
23+ ---
2524
2625You can install this package via Composer by running this command in your terminal in the root of your
2726project:
@@ -31,7 +30,7 @@ $ composer require bupy7/php-html-form
3130```
3231
3332Basic Usage
34- -----------
33+ ---
3534
3635- [ Getting Started] ( #getting-started )
3736- [ Opening a Form] ( #opening-a-form )
@@ -45,7 +44,7 @@ Basic Usage
4544- [ Setting Attributes] ( #setting-attributes )
4645
4746Getting Started
48- ---------------
47+ ---
4948
5049First, instantiate a FormBuilder...
5150
@@ -64,7 +63,7 @@ Next, use the FormBuilder to build an element. For example:
6463
6564
6665Opening a Form
67- --------------
66+ ---
6867
6968``` php
7069// <form method =" POST" >
@@ -92,7 +91,7 @@ Opening a Form
9291```
9392
9493Text and Password Fields
95- ------------------------
94+ ---
9695
9796Text and password fields share the same interface.
9897
@@ -119,7 +118,7 @@ Other available methods:
119118- ` enable() `
120119
121120Textareas
122- ---------
121+ ---
123122
124123Textareas share the same interface as regular text fields, with a couple of extra useful methods.
125124
@@ -135,7 +134,7 @@ Textareas share the same interface as regular text fields, with a couple of extr
135134```
136135
137136Checkboxes and Radio Buttons
138- ----------------------------
137+ ---
139138
140139``` php
141140// <input type =" checkbox" name =" terms" value =" 1" >
@@ -158,7 +157,7 @@ Checkboxes and Radio Buttons
158157```
159158
160159Selects
161- -------
160+ ---
162161
163162``` php
164163// <select name =" birth_year" ></select >
@@ -215,7 +214,7 @@ $options = [
215214```
216215
217216Buttons
218- -------
217+ ---
219218
220219``` php
221220// <button type =" button" >Click Me</button >
@@ -232,15 +231,15 @@ Buttons
232231```
233232
234233Hidden Inputs
235- -------------
234+ ---
236235
237236``` php
238237// <input type =" hidden" name =" secret" value =" my-secret-value" >
239238<?= $builder->hidden('secret')->value('my-secret-value'); ?>
240239```
241240
242241Labels
243- ------
242+ ---
244243
245244** Basic Label**
246245``` php
@@ -261,7 +260,7 @@ Labels
261260```
262261
263262Setting Attributes
264- ------------------
263+ ---
265264
266265``` php
267266// Attributes can be set with attribute(...)
@@ -282,7 +281,7 @@ Setting Attributes
282281```
283282
284283Error Messages
285- --------------
284+ ---
286285
287286FormBuilder also allows you to easily retrieve error messages for your form elements. To do so, just
288287implement the ` ErrorStoreInterface ` and pass it to the FormBuilder:
@@ -321,7 +320,7 @@ token to your form easily like so:
321320```
322321
323322Data Binding
324- ------------
323+ ---
325324
326325Sometimes you might have a form where all of the fields match properties on some sort of object or array
327326in your system, and you want the user to be able to edit that data. Data binding makes this really easy by
343342
344343> Note: Be sure to `bind` before creating any other form elements.
345344
346- Run tests
347- ---------
345+ Testing
346+ ---
348347
349- **Using Docker:**
348+ Run tests:
350349
351- ```bash
352- $ docker-compose up -d
353- $ docker-compose exec php sh
354- $ composer test:run
350+ ```
351+ $ ./vendor/bin/phpunit --no-coverage
355352```
356353
357- **Any another way:**
354+ Run tests with coverage:
358355
359- ```bash
360- $ composer test:run
361356```
357+ $ XDEBUG_MODE=coverage ./vendor/bin/phpunit
358+ ```
359+
360+ HTML coverage path: `build/coverage/index.html`
362361
363362License
364- -------
363+ ---
365364
366365php-html-form is released under the [MIT License](LICENSE.md).
0 commit comments