forked from oscarotero/form-manager-bootstrap
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdemo.php
53 lines (49 loc) · 1.43 KB
/
demo.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
<?php
require 'vendor/autoload.php';
use FormManager\Bootstrap;
$form = Bootstrap::form([
'name' => Bootstrap::text()->label('O teu nome')->set(['size' => 'lg']),
'email' => Bootstrap::email()->label('Email')->set([
'addon-after' => '@',
//'size' => 'sm',
'help' => 'Helping text'
]),
'private' => Bootstrap::checkbox()->label('Private'),
'private2' => Bootstrap::checkbox()->label('Private2')->disabled(),
'names' => Bootstrap::select()->label('Names')->options([
1 => 'Laura',
2 => 'Oscar'
]),
'date' => Bootstrap::group([
'day' => Bootstrap::number()->min(1)->max(31)->label('Day'),
'month' => Bootstrap::number()->min(1)->max(12)->label('Month'),
'year' => Bootstrap::number()->min(1900)->max(2013)->label('Year')
])->set([
'columnSizing' => [
'day' => 'col-sm-4 col-md-3',
'month' => 'col-sm-4 col-md-3',
'year' => 'col-sm-4 col-md-3'
]
]),
'colors' => Bootstrap::choose([
'red' => Bootstrap::radio()->label('Red'),
'blue' => Bootstrap::radio()->label('Blue'),
'green' => Bootstrap::radio()->label('Green')
]),
'reset' => Bootstrap::submit()->val('ola')->html('ola'),
'submit' => Bootstrap::submit()->html('Send')
]);
?>
<!DOCTYPE html>
<html>
<head>
<title></title>
<!-- Latest compiled and minified CSS -->
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.4/css/bootstrap.min.css">
</head>
<body>
<div class="container">
<?php echo $form; ?>
</div>
</body>
</html>