-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathp.forms.html
43 lines (38 loc) · 1.73 KB
/
p.forms.html
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
<!DOCTYPE html>
<html>
<head>
<title>Inputs plugin</title>
<link rel="stylesheet" type="text/css" href="style.css">
<link rel="stylesheet" type="text/css" href="library/style.css">
</head>
<body>
<img src="logo.png" width="400" />
<ul>
<li><a href="index-old.html">Return</a></li>
</ul>
<span id="form-msg"></span>
<form action="https://libraries.weblabor.mx/easy-js-library/send.php" method="POST" data-type="ajax" id="form">
<h1>Forms and inputs</h1>
<h2>Multiple</h2>
<h3>Email Type</h3>
<input type="text" data-type="amultipleInput" name="hola">
<p>In jquery get the multiples values with commas, in the server you get an array with the same name. The name and type attribute are mandatory. You can apply styles to the input and it will work all right</p>
<code data-type="codeeditor" data-lang="html"><input type="text" data-type="multiple" name="hola"></code>
<h2>Send form in Ajax</h2>
<p>Demo can be seen in this form, the form is send via ajax and not in php direct. The id is needed. With id+"-msg" the data is print. If the php file returns a url it will redirect to there.</p>
<code data-type="codeeditor" data-lang="html"><span id="form-msg"></span>
<form action="send.php" method="POST" data-type="ajax" id="form">
// Content
</form></code>
<br /><br />
<input type="submit" value="Click aqui" />
</form>
<script type="text/javascript" src="library/jquery.min.js"></script>
<script type="text/javascript" src="library/script.js"></script>
<script type="text/javascript">
function loadEveryTime() {
console.log($('input[name="shipment.weight_costs[0][costo]"]').val());
}
</script>
</body>
</html>