1. Go to this page and download the library: Download flextype-components/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/ */
flextype-components / form example snippets
use Flextype\Component\Form\Form;
// Registering a Form macro
Form::macro('my_field', function() {
return '<input type="text" name="my_field">';
});
// Calling a custom Form macro
echo Form::my_field();
// Registering a Form macro with parameters
Form::macro('my_field', function($value = '') {
return '<input type="text" name="my_field" value="'.$value.'">';
});
// Calling a custom Form macro with parameters
echo Form::my_field('Flextype');
// Form will submit back to the current page using POST
echo Form::open();
// Form will submit to 'search' using GET
echo Form::open('search', array('method' => 'get'));
// When "file" inputs are present, you must