PHP code example of mati-core / form
1. Go to this page and download the library: Download mati-core/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/ */
mati-core / form example snippets
final class *Presenter extends BasePresenter
{
use FormFactoryTrait;
}
final class *Presenter extends BasePresenter{
use FormFactoryTrait;
public function createComponentMyForm(): Form
{
$form = $this->formFactory->create();
$form->addText('myText', 'My text');
$form->onSuccess[] = function (Form $form, ArrayHash $values): void {
$text = $values->myText;
};
return $form;
}
}