PHP code example of chomenko / extra-form

1. Go to this page and download the library: Download chomenko/extra-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/ */

    

chomenko / extra-form example snippets




	//......
	
	/**
	 * @return ExtraForm
	 */
	public function create(): ExtraForm
	{
		$form = $this->createForm();
		
		$form->addText('name', 'Name')
			->setRequired();
		
		$form->addText('surname', 'Surname')
			->setRequired();
		
		$form->addPassword('password', 'Password')
			->setRequired();
		
		$form->addSubmit('send', 'Sign in');
		
		$builder = $form->builder();
		
		$row = $builder->addRow();
		$row->addColMd(6, "name");
		$row->addColMd(6, ["surname"]);
		
		return $form;
	}
	
	//......