-
Notifications
You must be signed in to change notification settings - Fork 0
/
help.php
82 lines (80 loc) · 2.67 KB
/
help.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
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
<?php
include_once('lib/head.php');
include_once('lib/include.php');
?>
<body>
<?php include_once('lib/navbar.php');?>
<!-- Page Content -->
<div class="container">
<div class="row">
<div class="col-md-12">
<div class="well">
<h2>Create a form</h2>
<p>
Start with add new form on the form page.<br>
All forms need to start with <b>formStart("Formname");</b> in the beginning.
<p>
To create input fields just fill in the form field with one of the following.
<br>
<br>
<h4><b>Text input:</b></h4> First argument is the variable that will be replaced in the template. Second argument is to know what to add. Third argument is a placeholder for a example how it should be.
<br>
<b>textInput("SNMP_HOSTNAME","Hostname","www-server1");</b>
<br>
<br>
<h4><b>Select input:</b></h4> Argument is the same as for a textInput but you can add how many RoomX you want to have more to choose from.
<br>
<b>selectInput("SNMP_SYSLOC_ROOM","Room","Room1","Room2");</b>
<br>
<br>
<h4><b>End form:</b></h4> This need to be added in the end of the form else it wont work.
<br>
<b>formEnd();</b>
<br>
<br>
<h4><b>Example form:</b></h4>
formStart("Formname");<br>
textInput("SNMP_HOSTNAME","Hostname","www-server1");<br>
textInput("SNMP_HOSTNAME","IP-Address","192.168.1.200/24");<br>
textInput("SNMP_HOSTNAME","Gateway","192.168.1.1");<br>
selectInput("SNMP_SYSLOC_ROOM","Room","Room1","Room2");<br>
formEnd();<br>
<br>
Will give you:<br>
<form class="form-horizontal">
<fieldset>
<div class="form-group">
<label class="col-md-2 control-label" for="textinput">Hostname</label>
<div class="col-md-3">
<input id="textinput" name="textinput" type="text" placeholder="www-server1" class="form-control input-md">
</div>
</div>
<p>
<div class="form-group">
<label class="col-md-2 control-label" for="textinput">IP-Address</label>
<div class="col-md-3">
<input id="textinput" name="textinput" type="text" placeholder="192.168.1.200/24" class="form-control input-md">
</div>
</div>
<p>
<div class="form-group">
<label class="col-md-2 control-label" for="textinput">Gateway</label>
<div class="col-md-3">
<input id="textinput" name="textinput" type="text" placeholder="192.168.1.1" class="form-control input-md">
</div>
</div>
<p>
<div class="form-group">
<label class="col-md-2 control-label" for="selectbasic">Select Basic</label>
<div class="col-md-3">
<select id="selectbasic" name="selectbasic" class="form-control">
<option value="Room1">Room1</option>
<option value="Room2">Room2</option>
</select>
</div>
</div>
</fieldset>
</form>
<!-- Page Content end here -->
</body>
</html>