1. Go to this page and download the library: Download laasti/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/ */
$form->getAction(); //Get form action attribute
$form->getMethod(); //Get form method
$form->getFormAttributes(); //Get form attributes
$form->getAllFields(); //All fields without groups
$form->getFields(); //Just fields without groups
$group = array_shift($form->getGroups()); //Array of first level groups
$group->getLabel();
$group->getAttributes();
$group->getGroups(); //Array of subgroups
$field = array_shift($group->getFields()); //Array of fields in group
$field->getLabel();
$field->getName();
$field->getGroup();
$field->getChoices();
$field->getAttributes();
$field->getContainerAttributes();
//OR you can use magic properties instead of lengthy getters in views
$field->choices;
$field->containerAttributes;
//There are some magic properties as well
$field->isRequired;//Checks if
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.