PHP code example of neondigital / forma
1. Go to this page and download the library: Download neondigital/forma 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/ */
neondigital / forma example snippets
use Forma\Forma;
$forma = new Forma();
echo $forma->email('email')->id('inputEmail')->
Forma::populate($user);
Forma::open('user','GET')->class('glenn')->class('bob')->attr('id','sweet');
Forma::open_secure('article')->files();
Forma::text('first_name','glenn<$@£$T£!^;')->class('form-control')->attr('id','first_name');
Forma::text('last_name')->id('inputLast')->forceEmpty();
Forma::email('email')->id('inputEmail')->;
Forma::checkbox('confirm')->id('sweeeetID')->withLabel('Please Confirm');
Forma::input('color')->type('color')->id('inputColor')->withLabel('Pick a color');
Forma::checkbox('confirm')->id('inputConfirm')->wrap('Option One',array('class'=>'checkbox'));
Forma::hidden('secret','thing');
Forma::token(); // Laravel only
Forma::textarea('secret','thi>ng<dd')->rows(10);
Forma::radio('choice')->id('inputChoice')->wrap('Option One',array('class'=>'radio'));
Forma::file('image')->id('inputFile')->wrap('Select Image');
Forma::text('last_name')->id('inputLast')->placeholder('Enter last name');
Forma::text('last_name')->id('inputLast')->placeholder('auth.login_failed');
Forma::label('auth.login_failed');
Forma::label('<i class="fa fa-pound"></i> Price')->rawText();
Forma::select('country')->option('- Please Select -')->option('UK',1,true)->withLabel('Select Country');
Forma::select('country')->options(array('1' => 'United Kingdom', '2' => 'France', '3' => 'USA' ));
Forma::select('town', array('1' => 'Chelmsford', '2' => 'Brentwood', '3' => 'Colchester' ), 2);
Forma::checkbox('cake',1);
Forma::button('Click me!!', 'submit')->class('btn btn-primary');
Forma::submit('submit_btn','Save Changes');
Forma::close();