1. Go to this page and download the library: Download joomla/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/ */
joomla / form example snippets
use Joomla\Form\Form;
use Joomla\Form\Form;
$clientForm = new Form('client');
$customer = new array('first_name'=>'John','last_name'=>'Smith', ...);
$clientForm->bind($customer);
$fields = $customForm->getGroup('');
foreach ($fields as $field) {
echo $field->label;
echo $field->input;
}
namespace Joomla\Form\Field;
class CustomField extends \Joomla\Form\Field
{
// Override this function
public function getInput()
{
return 'field\'s html string.';
}
}
namespace Bar\Form\Field;
class FooField extends \Joomla\Form\Field
{
// Override this function
public function getInput()
{
return 'field\'s html string.';
}
}
namespace Joomla\Form\Field\Bar;
class FooField extends \Joomla\Form\Field
{
// Override this function
public function getInput()
{
return 'field\'s html string.'
}
}
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.