PHP code example of nf / form
1. Go to this page and download the library: Download nf/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/ */
nf / form example snippets
$form = Form::open(['url' => 'foo/bar', 'method' => 'post', 'files' => true]);
$form .= Form::close();
echo $form;
{!! Form::open(['url' => 'foo/bar', 'method' => 'post', 'files' => true]) !!}
//
{!! Form::close() !!}
echo Form::label('email', 'E-Mail Address');
echo Form::label('email', 'E-Mail Address', ['class' => 'awesome']);
echo Form::text('username');
echo Form::text('email', '[email protected] ');
echo Form::password('password', ['class' => 'awesome']);
echo Form::email($name, $value = null, $attributes = []);
echo Form::file($name, $attributes = []);
echo Form::checkbox('name', 'value');
echo Form::radio('name', 'value');
echo Form::checkbox('name', 'value', true);
echo Form::radio('name', 'value', true);
echo Form::number('name', 'value');
echo Form::date('name', \Carbon\Carbon::now());
echo Form::file('image');
echo Form::select('size', ['L' => 'Large', 'S' => 'Small']);
echo Form::select('size', ['L' => 'Large', 'S' => 'Small'], 'S');
echo Form::select('size', ['L' => 'Large', 'S' => 'Small'], null, ['placeholder' => 'Pick a size...']);
echo Form::select('animal',[
'Cats' => ['leopard' => 'Leopard'],
'Dogs' => ['spaniel' => 'Spaniel'],
]);
echo Form::selectRange('number', 10, 20);
echo Form::selectMonth('month');
echo Form::year('year', 1990, 2018);
echo Form::submit('Click Me!');