Download the PHP package bupy7/php-html-form without Composer

On this page you can find all versions of the php package bupy7/php-html-form. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package php-html-form

php-html-form

This is fork of adamwathan/form. There is just HTML-elements builder without any framework support. Extension are supporting PHP from 5.6 to 8.x!

Stable Version Build status Coverage Status Total Downloads License

Boring name for a boring package. Builds form HTML with a fluent-ish, hopefully intuitive syntax.

Installation

You can install this package via Composer by running this command in your terminal in the root of your project:

Basic Usage

Getting Started

First, instantiate a FormBuilder...

Next, use the FormBuilder to build an element. For example:

Opening a Form

Text and Password Fields

Text and password fields share the same interface.

Other available methods:

Textareas

Textareas share the same interface as regular text fields, with a couple of extra useful methods.

Checkboxes and Radio Buttons

Selects

Buttons

Hidden Inputs

Labels

Basic Label

Wrapping another element

Setting Attributes

Error Messages

FormBuilder also allows you to easily retrieve error messages for your form elements. To do so, just implement the ErrorStoreInterface and pass it to the FormBuilder:

You can also supply a format parameter to getError() to cleanup your markup. Instead of doing this:

...you can simply do this, which will display the formatted message if it exists, or nothing otherwise.

CSRF Protection

Assuming you set a CSRF token when instantiating the FormBuilder, add a CSRF token to your form easily like so:

Data Binding

Sometimes you might have a form where all of the fields match properties on some sort of object or array in your system, and you want the user to be able to edit that data. Data binding makes this really easy by allowing you to bind an object or array to your form that will be used to automatically provide all of the default values for your fields.

Note: Be sure to bind before creating any other form elements.

Testing

Run tests:

Run tests with coverage:

HTML coverage path: build/coverage/index.html

Code style

To fix code style, run:

You have to install PHP CS Fixer at first, if you don't use build-in Docker image:

License

php-html-form is released under the MIT License.


All versions of php-html-form with dependencies

PHP Build Version
Package Version
Requires php Version >=5.6
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package bupy7/php-html-form contains the following files

Loading the files please wait ....