PHP code example of bootpress / form

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

    

bootpress / form example snippets




use BootPress\Form\Component as Form;

$form = new Form('form', 'post');

// Create some menus
$form->menu('gender', array(
    'M' => 'Male',
    'F' => 'Female',
));

$form->menu('remember', array('Y' => 'Remember Me'));

// Set the default values
$form->set('values', array(
    'name' => 'Daniel',
    'email' => '[email protected]',
    'gender' => 'M',
));

$form->validator->set(array(
    'name' => 'r' => 'ace',
    'confirm' => ' = $form->validator->certified()) {
    echo '<pre>'.print_r($vars, true).'</pre>';
    // $form->eject();
}

echo $form->header();
echo $form->fieldset('Form', array(
    $form->text('name', array('class' => 'form-control')),
    $form->text('email', array('placeholder' => 'Email Address')),
    $form->radio('gender'),
    $form->password('password'),
    $form->password('confirm'),
    $form->textarea('feedback'),
    $form->checkbox('remember'),
    $form->input('submit', array('name' => 'Submit')),
));
echo $form->close();