-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathform.html
341 lines (305 loc) · 13.6 KB
/
form.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
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Bank</title>
<!-- Bootstrap -->
<link href="css/bootstrap.min.css" rel="stylesheet">
<link href="css/style.css" rel="stylesheet">
<link rel="stylesheet" href="css/nice-select.css">
<link rel="stylesheet" type="text/css" href="css/ionicons.min.css"/>
<link rel="apple-touch-icon" sizes="180x180" href="apple-touch-icon.png">
<link rel="icon" type="image/png" href="favicon-32x32.png" sizes="32x32">
<link rel="icon" type="image/png" href="favicon-16x16.png" sizes="16x16">
<!-- HTML5 shim and Respond.js for IE8 support of HTML5 elements and media queries -->
<!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
<!--[if lt IE 9]>
<script src="https://oss.maxcdn.com/html5shiv/3.7.3/html5shiv.min.js"></script>
<script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
<![endif]-->
</head>
<body>
<!--<div class="top-bar">
<div class="container">
<p><strong>Opening Hours:</strong> Mon-Fri 8.30 am - 6.30pm </p>
<ul class="pull-right">
<li><a href="#">SUPPORT</a></li>
<li><a href="#">PRIVACY</a></li>
</ul>
</div>
</div>-->
<header>
<div class="container">
<a href="index.html" class="logo">eLending Capital</a>
<div class="pull-right">
<div class="contact-box">
<span class="circle-icon"><span class="ion-ios-telephone"></span></span>
<p>858-34LOANS (858-345-6267)</p>
<p class="small-text">[email protected]</p>
</div>
<div class="contact-box">
<span class="circle-icon"><span class="ion-navigate"></span></span>
<p>861 6th Avenue,</p>
<p class="small-text">Suite 612, 92101 San Diego, CA</p>
</div>
<ul class="social-media-top">
<li><a href="#"><span class="socicon-facebook"></span></a></li>
<li><a href="#"><span class="socicon-twitter"></span></a></li>
<li><a href="#"><span class="socicon-linkedin"></span></a></li>
<li><a href="#"><span class="socicon-googleplus"></span></a></li>
</ul>
</div>
<a href="#" class="font-change increase-size">+</a>
<a href="#" class="font-change decrease-size">-</a>
</div>
</header>
<div class="main-content">
<div class="container">
<div class="menu subpage-menu">
<ul>
<li><a href="index.html">HOME</a></li>
<li><a href="index.html#accepted-assets">ASSETS WE ACCEPT</a></li>
<li><a href="about.html">ABOUT US</a></li>
<li><a href="faq.html">FAQ</a></li>
<li><a href="contact.html">CONTACT US</a></li>
</ul>
<a href="contact.html" class="consultation-button pull-right">GET A FREE CONSULTATION</a>
</div>
</div>
<div class="subpage-header">
<h1>HOW TO APPLY</h1>
</div>
<div class="container form-container">
<div class="center">
<h2>APPLICATION FORM</h2>
</center>
<form type="submit" id="formLead" method="post" enctype="multipart/form-data">
<div class="row">
<div class="col-sm-5 col-sm-offset-1">
<label>YOUR NAME:
<input type="text" id="name" name="name" />
</label>
<label>EMAIL:
<input type="text" id="email" name="email" />
</label>
<label>ASSET CONDITION
<div class="radio-box">
<input type="radio" name="assetCondition" id="assetCondition1" value="Yes" class="css-checkbox" checked>
<label for="assetCondition1" class="css-label radGroup1">MINT</label>
<input type="radio" name="assetCondition" id="assetCondition2" value="No" class="css-checkbox">
<label for="assetCondition2" class="css-label radGroup1">EXCELLENT</label>
<input type="radio" name="assetCondition" id="assetCondition3" value="No" class="css-checkbox">
<label for="assetCondition3" class="css-label radGroup1">AVERAGE BELOW AVERAGE POOR</label>
</div>
</label>
<label>AMOUNT YOU WISH TO BORROW:
<input type="text" name="requestedLoanAmount" id="requestedLoanAmount" />
</label>
<label>UPLOAD PHOTOGRAPHS (AT LEAST 3 PHOTOS OF 3 DIFFERENT ANGLES)
<input type="file" id="photos" name="photos" class="nice" onchange="previewFiles()" multiple />
</label>
<label>TYPE OF LOAN
<div class="radio-box">
<input type="radio" name="loanType" id="type1" value="Bridge Loan" class="css-checkbox" checked>
<label for="type1" class="css-label radGroup1">Bridge Loan</label>
<input type="radio" name="loanType" id="type2" value="Sales Advance" class="css-checkbox">
<label for="type2" class="css-label radGroup1">Sales Advance</label>
<input type="radio" name="loanType" id="type3" value="Term Loan" class="css-checkbox">
<label for="type3" class="css-label radGroup1">Term Loan</label>
</div>
</label>
<div id="preview"></div>
</div>
<div class="col-sm-5">
<label>PHONE:
<input type="text" id="phone" name="phone" />
</label>
<label>SELECT:</label>
<select name="whatIsThisLoanFor">
<option value="Jewelry">Jewelry</option>
<option value="Watches">Watches</option>
<option value="Gold & Precious Metals">Gold & Precious Metals</option>
<option value="Select Autos">Select Autos</option>
<option value="Art & Collectibles">Art & Collectibles</option>
<option value="Real Estate">Real Estate</option>
<option value="High End Purses">High End Purses</option>
<option value="Antiques">Antiques</option>
</select>
<label>ESTIMATED VALUE
<input type="text" name="assetCondition" id="assetCondition" />
</label>
<label>ORIGINAL PACKAGING AVAILABLE
<div class="radio-box">
<input type="radio" name="originalPackaging" id="originalPackaging" value="Yes" class="css-checkbox" checked>
<label for="originalPackaging" class="css-label radGroup1">YES</label>
<input type="radio" name="originalPackaging" id="originalPackaging2" value="No" class="css-checkbox">
<label for="originalPackaging2" class="css-label radGroup1">NO</label>
</div>
</label>
<label>BRAND (if applicable)
<input type="text" name="assetBrand" id="assetBrand" />
</label>
<label>YEAR PURCHASED
<input type="text" name="yearPurchased" id="yearPurchased" />
</label>
</div>
<div class="col-sm-12 center">
<button type="submit">APPLY NOW</button>
</div>
</div>
</form>
</div>
</div>
<footer>
<div class="container">
<div class="row">
<div class="col-sm-3">
<a href="#" class="logo-footer">eLending Capital</a>
<p>eLENDING lends money against your valuables with no credit checks, no income verification, and no tax returns. Unleash the power of your equity now. Safe and Discreet.</p>
</div>
<div class="col-sm-3">
<h3>Explore</h3>
<ul>
<li><a href="#">How It Works</a></li>
<li><a href="#">Sales Advance Loans</a></li>
<li><a href="#">Bridge Loans </a></li>
<li><a href="#">Term Loans</a></li>
<li><a href="#">About Us</a></li>
</ul>
</div>
<div class="col-sm-3">
<h3>Assets We Accept</h3>
<ul>
<li><a href="#">Jewelry</a></li>
<li><a href="#">Watches</a></li>
<li><a href="#">Gold & Precious Metals</a></li>
<li><a href="#">Select Autos</a></li>
<li><a href="#">Art & Collectible</a></li>
<li><a href="#">Real Estate</a></li>
<li><a href="#">High End Purse</a></li>
<li><a href="#">Antiques</a></li>
</ul>
</div>
<div class="col-sm-3">
<h3>Contact Us</h3>
<p>861 6th Avenue, <br />
Suite 612, 92101 San Diego, CA <br /><br />
E-Mail: [email protected] <br /><br />
CALL US - 858-34LOANS (858-345-6267) <br />
Mon-Fri: 8:30am - 6:00pm <br /><br />
VISIT US <br />
Mon-Fri: 8:30am - 6:00pm</p>
</div>
</div>
<div class="col-sm-12 footer-content">
<p class="pull-left">Copyright 2016 - Elending Capital</p>
<ul class="pull-right">
<li><a href="#"><span class="socicon-facebook"></span></a></li>
<li><a href="#"><span class="socicon-twitter"></span></a></li>
<li><a href="#"><span class="socicon-linkedin"></span></a></li>
<li><a href="#"><span class="socicon-youtube"></span></a></li>
<li><a href="#"><span class="socicon-googleplus"></span></a></li>
</ul>
</div>
</div>
</footer>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.12.4/jquery.min.js"></script>
<script src="js/jquery.nice-select.min.js"></script>
<script src="js/bootstrap.min.js"></script>
<script src="js/jquery.nicefileinput.min.js"></script>
<script src="js/jquery.mask.js"></script>
<script type="text/javascript">
function getFormData($form){
var unindexed_array = $form.serializeArray();
var indexed_array = {};
$.map(unindexed_array, function(n, i){
if(n['value'] == "true") n['value'] = true;
if(n['value'] == "false") n['value'] = false;
indexed_array[n['name']] = n['value'];
});
return indexed_array;
}
function previewFiles() {
var preview = document.querySelector('#preview');
var files = document.querySelector('input[type=file]').files;
function readAndPreview(file) {
// Make sure `file.name` matches our extensions criteria
if ( /\.(jpe?g|png|gif)$/i.test(file.name) ) {
var reader = new FileReader();
reader.addEventListener("load", function () {
var image = new Image();
image.height = 100;
image.title = file.name;
image.src = this.result;
var currentData = $( "body" ).data( "images");
currentData.push(this.result);
$( "body" ).data( "images", currentData);
preview.appendChild( image );
}, false);
reader.readAsDataURL(file);
}
}
if (files) {
[].forEach.call(files, readAndPreview);
}
}
$(document).ready(function() {
$(".decrease-size").hide();
$(".increase-size").click(function(){
$(this).hide();
$(".decrease-size").show();
$("body").addClass("big-font");
});
$(".decrease-size").click(function(){
$(this).hide();
$(".increase-size").show();
$("body").removeClass("big-font");
});
$('select').niceSelect();
$("input[type=file]").nicefileinput({
label : '<img src="images/file-upload.png" />' // Spanish label
});
$( "body" ).data( "images", [] );
$('#requestedLoanAmount').mask('000,000,000,000,000', {reverse: true});
$('#phone').mask('(000) 000-0000', {placeholder: "(___) ___-____"});
$( "form").submit(function( event ) {
event.preventDefault();
var dataString = getFormData($("#formLead"));
dataString.leadDomain = "elendinginc.com";
dataString.leadType = "Web";
dataString.leadStatus = "Lead";
dataString.brokerOrBorrower = "Borrower";
dataString.assetImages = $( "body" ).data( "images");
// todo : serializeArray not returning all fields
var nameArray = dataString.name.split(' ');
dataString.firstName = nameArray[0];
if(typeof nameArray[1] !== "undefined") dataString.lastName = nameArray[1];
else dataString.lastName = nameArray[0];
dataString.phone = dataString.phone.replace(/-/g, '').replace(/\(|\)/g, '').replace(/ /g, '');
dataString.requestedLoanAmount = dataString.requestedLoanAmount.replace(/,/g, '');
console.log(dataString);
if(dataString.firstName && dataString.phone && dataString.email) {
console.log('all set');
} else {
alert('Please fill in all required fields.');
return false;
}
var postUrl = "http://crm-staging.elendinginc.com/methods/createLead";
//var postUrl = "http://localhost:3000/methods/createLead";
$.ajax({
method: "post",
url: postUrl,
data: JSON.stringify(dataString),
contentType: "application/json",
success: function (data) {
console.log(data); // 6
alert('Your information has been forwarded to our agent. Someone will be in contact with you as soon as possible.');
}
});
});
});
</script>
</body>
</html>