PHP code example of jayrchamp / simple-php-form-builder
1. Go to this page and download the library: Download jayrchamp/simple-php-form-builder 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/ */
jayrchamp / simple-php-form-builder example snippets
$form->field( 'text' )
->label('What is your name?')
->name('name')
->placeholder('ie.: John Doe')
->id('text_id')
->class('text_class1')->class(['text_class2', 'text_class3'])
->attr(['data-text' => 'text-data'])
->attr('
$form->field('submit')->value('Send')->build();
$form->close();
$form->field('select')
->label('Where do you want to go?')
->placeholder('Select')
->addOption('To the beach')
->addOption('Las vegas')
->addOption('Planet Mars')
->build();