1. Go to this page and download the library: Download bupy7/php-html-form library. Choose the download type require.
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
// Attributes can be set with attribute(...)
// <input type="text" name="foobar" min="4">
<?= $builder->text('foobar')->attribute('min', 4);
$builder->setErrorStore($myErrorStore);
// Check if the form has an error for an element
$builder->hasError('email');
// Retrieve the error message for an element
$builder->getError('email');