-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
76 lines (65 loc) · 3.09 KB
/
index.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
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
<!doctype html>
<html>
<head>
<title>Generate Multiple Input Fields Dynamically</title>
<link rel="stylesheet" href="styles.css" />
<link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.7.0/css/all.css">
<!-- Bootstrap core CSS -->
<link href="css/bootstrap.min.css" rel="stylesheet">
<!-- Material Design Bootstrap -->
<link href="css/mdb.min.css" rel="stylesheet">
</head>
<body ng-app="multipleInputs" class="users-container" ng-controller="multipleInputsCtrl">
<button ng-click="addUser()" class="add-user">Add User</button>
<article ng-repeat="user in users" class="mb-2 mt-2">
<div class="card" style="width: 300px;">
<article class="card-header info-color white-text text-center py-4" ng-click='toggle($index)'>
<article class="row">
<span class="col-md-2 text-white">{{ $index + 1 }}</span>
<a class="col-md-2 offset-8" style="color: red; font-weight: bold; "
ng-if="users.length > 1" ng-click="removeUser(user)">X</a>
</article>
</article>
<form class="border border-light p-3"ng-model ="user.open" ng-show="user.open">
<!-- first -->
<div class="md-form mt-3">
<input id="materialSubscriptionFormPasswords" class="form-control mb-4" ng-model="user.colour"
type="text" />
<label for="materialSubscriptionFormPasswords">Vehicle Colour</label>
</div>
<!-- next -->
<div class="md-form mt-3">
<input class="form-control mb-4" id="make" ng-model="user.make[$index+1]" type="text" />
<label for="make">Make: Eg Toyota</label>
</div>
<!-- next -->
<div class="md-form mt-3">
<input class="form-control mb-4" id="make" ng-model="user.model" type="text" />
<label for="model">Model: Eg Camry</label>
</div>
<!-- next -->
<div class="md-form mt-3">
<input class="form-control mb-4" id="date" ng-model="user.date" type="text" />
<label for="date">Manufacturer Date</label>
</div>
<!-- next -->
<div class="md-form mt-3">
<input class="form-control mb-4" id="mileage" ng-model="user.mileage" type="text" />
<label for="mileage">Mileage</label>
</div>
<!-- next -->
</form>
</div>
</article>
{{users}}
<!-- JQuery -->
<script type="text/javascript" src="js/jquery-3.3.1.min.js"></script>
<!-- Bootstrap tooltips -->
<script type="text/javascript" src="js/popper.min.js"></script>
<!-- Bootstrap core JavaScript -->
<script type="text/javascript" src="js/bootstrap.min.js"></script>
<!-- MDB core JavaScript -->
<script src="lib/angular.min.js"></script>
<script src="./app.js"></script>
</body>
</html>