1. Go to this page and download the library: Download wudege/tforms 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/ */
wudege / tforms example snippets
class UserEditForm extends \TForms\Form
{
const GENDER_MALE = 1;
const GENDER_FEMALE = 0;
public $username;
public $email;
public $age;
public $gender;
public $blog;
/**
*
* @author wudege <[email protected]>
* @return array
*/
public function attributeNames()
{
return [
'username',
'email',
'age',
'gender',
'blog',
];
}
public function attributeLabels()
{
return [
'username',
'email',
'age',
'gender',
'blog',
];
}
public function rules()
{
return [
['username, email, age, gender, blog', '
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.