-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathexample.php
More file actions
88 lines (76 loc) · 2.66 KB
/
example.php
File metadata and controls
88 lines (76 loc) · 2.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
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
<!-- Example CI
Load library pada controller
-->
<div class="col-md-5 mt-4">
<?php
$form = array(
// url pada action form
'url' => base_url('test-proses'),
// input form
'input' => array(
1 => array(
'type' => 'text',
'label' => 'Nama Lengkap',
'nameid' => 'nama',
'value' => 'Sakti',
'attribut' => ['required','readonly'],
),
2 => array(
'type' => 'dropdown',
'label' => 'Jenis Kelamin',
'nameid' => 'jekel',
'attribut' => ['required'],
'value' => 'p',
// tambahan untuk type dropdown
'data' => array(
// value => Label
'l' => 'Laki-Laki',
'p' => 'Perempuan',
)
),
),
//membuat tampilan button
// 1. Label button 2.name button 3.warna button (sesuai bootstrap)
'button' => 'SIMPAN,simpan,success',
);
$this->bsform->display($form);
?>
</div>
<!-- Example Native -->
<div class="col-md-5 mt-4">
<?php
inlcude('Bsform.php');
$bsform = new Bsform();
$form = array(
// url pada action form
'url' => base_url('test-proses'),
// input form
'input' => array(
1 => array(
'type' => 'text',
'label' => 'Nama Lengkap',
'nameid' => 'nama',
'value' => 'Sakti',
'attribut' => ['required','readonly'],
),
2 => array(
'type' => 'dropdown',
'label' => 'Jenis Kelamin',
'nameid' => 'jekel',
'attribut' => ['required'],
'value' => 'p',
// tambahan untuk type dropdown
'data' => array(
// value => Label
'l' => 'Laki-Laki',
'p' => 'Perempuan',
)
),
),
//membuat tampilan button
// 1. Label button 2.name button 3.warna button (sesuai bootstrap)
'button' => 'SIMPAN,simpan,success',
);
$bsform->display($form);
?>
</div>