PHP code example of mvccore / ext-form-field-text

1. Go to this page and download the library: Download mvccore/ext-form-field-text 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/ */

    

mvccore / ext-form-field-text example snippets


$form = (new \MvcCore\Ext\Form($controller))->SetId('demo');
...
$username = new \MvcCore\Ext\Forms\Fields\Text();
$username
	->SetName('username')
	->SetPlaceHolder('User');
$password = new \MvcCore\Ext\Forms\Fields\Password([
	'name'			=> 'password',
	'placeHolder'	=> 'Password',
	'validators'	=> ['Password'],
]);
...
$form->AddFields($username, $password);