Repository navigation
Expand file tree
/
Copy pathIndex.php
More file actions
61 lines (51 loc) · 1.66 KB
/
Copy pathIndex.php
File metadata and controls
61 lines (51 loc) · 1.66 KB
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
54
55
56
57
58
59
60
61
<?php
require_once './SimpleForm.php';
require_once './SearchBox/SearchBox.php';
/* ----------------------------------------------------------------------
* SimpleForm
* ----------------------------------------------------------------------
*/
$sf = new SimpleForm\SimpleForm();
/* these options for dropdown method */
$options = [
'Tehran' ,
'Pecan' ,
'Tokuo' ,
'kabol' ,
];
/* this array for submit method */
$submits = [
'subSave green' => 'Save' ,
'http://www.google.com red' => 'Google' ,
];
$form = $sf->Heading ('New Form')
->text ('txt1' , 'Name:' , '111111' , 'Your Name')
->email ('txt2' , 'Email:' , '222222' , 'Your Email')
->password ('txtPass' , 'Pass:' , 'Password' , 'Your Password')
->textarea ('txtAddress' , 'Address' , 'ADDR' , 'Your Address')
->radio ('rdo1' , 'Iran' , 'iran' , true)
->radio ('rdo1' , 'American' , 'american' , false)
->checkbox ('chk1' , 'PHP' , 'php' , true)
->checkbox ('chk2' , 'python' , 'python' , false)
->checkbox ('chk3' , 'js' , 'js' , false)
->dropdown ('drop1' , 'Provinces: ' , $options , 'kabol')
->hidden ('hide1' , 2222)
->submit ($submits)
->get_form ();
/* ----------------------------------------------------------------------
* SearchBox
* ----------------------------------------------------------------------
*/
$sb = new SimpleForm\SearchBox\SearchBox();
$searchBox = $sb->create_searchbox ();
?>
<html>
<head>
<title>Simple Form</title>
<link rel="stylesheet" href="./w3.css/w3.css"/>
</head>
<body>
<?= $form?>
<?= $searchBox?>
</body>
</html>