Download the PHP package user-meta/html without Composer

On this page you can find all versions of the php package user-meta/html. 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 html

Html-Form

Lightweight PHP classes to generate html elements.

This package does not have any dependency other than php-5.4

Requirements

Installation

Composer

Composer is a widely used dependency manager for PHP packages. This Html-Form is available on Packagist as user-meta/html and can be installed by running the composer require command. To enable Composer for you project, refer to the project's Getting Started documentation.

To add this dependency using the command, run the following from within your project directory:

Get Started

A quick example of generating text input with Html-Form using composer:

Output:

Almost all types of html element can be used. (e.g: button, email, div, p etc)

Output:

Usage

Basic Usage

Accepted arguments

Most of the element accept two arguments:

For options element like select, radio, it accept third argument as $options

using name, id and class

To assign name, id, class or any other attributes, use second arguments ($attributes)

A text field with default value, name, id and class attributes:

Output:

Add attributes to element

You can also add any attributes into any element:

Output:

using required, readonly and disabled

Output:

Using label

Output:

A div with id and class attributes:

Output:

lebel with label text, id, class and for attributes

Output:

Using checkbox

Simple checkbox with default checked

Output:

Pass first argument as false for default unchecked. echo Html::checkbox(false)

List of checkbox

Create a list of checkboxes with default values

Output

To get array of values by POST or GET method

Output

Using select / radio

Create a select with default value, name and id attributes

Output

Create a list of radio

Output

Using collection

Several elements can be grouped together as collection

Output:

Collection uses Html constructor and accept two parameters.

Form example

Generating a form using collections:

Output:

Nested collections

Generating html template using nested collections:

Using as xml generator

Output

Advanced

It is possible to create any html element by calling their name.

Under the hood, we use Html::input() for input element and Html::tag() for html tag

Create an email input by using input method:

Create h1 by using tag method:

Add html to before and after elements

Output

Enclose with another element.

Output

several way to set options for select / multiselect / radio / checkbox

Output

Mixing several way with one options array

Output

Using numeric value

Output

Security

Escaping Output

Escaping means stripping out unwanted data, like malformed HTML or script tags.

The library apply esc_attr to value attribute. esc_url to href and src attributes.


All versions of html with dependencies

PHP Build Version
Package Version
Requires php Version >=5.4.0
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 user-meta/html contains the following files

Loading the files please wait ....