bhl-forms 0.6.15 → 0.7.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/bhl-forms.es.js +1757 -1759
- package/dist/bhl-forms.iife.js +4 -4
- package/dist/bhl-forms.modern.es.js +2804 -2811
- package/dist/bhl-forms.modern.iife.js +6 -6
- package/dist/bhl-forms.modern.umd.js +6 -6
- package/dist/bhl-forms.umd.js +4 -4
- package/dist/forms/accidentsAndInjuries.es.js +278 -215
- package/dist/forms/accidentsAndInjuries.iife.js +1 -1
- package/dist/forms/accidentsAndInjuries.json +1 -1
- package/dist/forms/appraisals.es.js +16 -7
- package/dist/forms/appraisals.iife.js +1 -1
- package/dist/forms/business.es.js +288 -226
- package/dist/forms/business.iife.js +1 -1
- package/dist/forms/business.json +1 -1
- package/dist/forms/childAndFamily.es.js +271 -214
- package/dist/forms/childAndFamily.iife.js +1 -1
- package/dist/forms/childAndFamily.json +1 -1
- package/dist/forms/childAndFamilySingle.es.js +614 -545
- package/dist/forms/childAndFamilySingle.iife.js +1 -1
- package/dist/forms/childAndFamilySingle.json +1 -1
- package/dist/forms/civilLawsuit.es.js +608 -541
- package/dist/forms/civilLawsuit.iife.js +1 -1
- package/dist/forms/civilLawsuit.json +1 -1
- package/dist/forms/coins.es.js +16 -7
- package/dist/forms/coins.iife.js +1 -1
- package/dist/forms/contracts.es.js +275 -217
- package/dist/forms/contracts.iife.js +1 -1
- package/dist/forms/contracts.json +1 -1
- package/dist/forms/criminal.es.js +631 -562
- package/dist/forms/criminal.iife.js +1 -1
- package/dist/forms/criminal.json +1 -1
- package/dist/forms/divorce.es.js +614 -545
- package/dist/forms/divorce.iife.js +1 -1
- package/dist/forms/divorce.json +1 -1
- package/dist/forms/employmentAndWorkplace.es.js +555 -496
- package/dist/forms/employmentAndWorkplace.iife.js +1 -1
- package/dist/forms/employmentAndWorkplace.json +1 -1
- package/dist/forms/generalHomeImprovement.es.js +3224 -0
- package/dist/forms/generalHomeImprovement.iife.js +1 -0
- package/dist/forms/generalHomeImprovement.json +1 -0
- package/dist/forms/generalLegal.es.js +274 -216
- package/dist/forms/generalLegal.iife.js +1 -1
- package/dist/forms/generalLegal.json +1 -1
- package/dist/forms/generalLegalJustAnswer.es.js +4534 -0
- package/dist/forms/generalLegalJustAnswer.iife.js +1 -0
- package/dist/forms/generalLegalJustAnswer.json +1 -0
- package/dist/forms/generalLegalPopUnder.es.js +275 -217
- package/dist/forms/generalLegalPopUnder.iife.js +1 -1
- package/dist/forms/generalLegalPopUnder.json +1 -1
- package/dist/forms/generalLegalPopUnderSingle.es.js +645 -573
- package/dist/forms/generalLegalPopUnderSingle.iife.js +1 -1
- package/dist/forms/generalLegalPopUnderSingle.json +1 -1
- package/dist/forms/generalLegalSingle.es.js +645 -573
- package/dist/forms/generalLegalSingle.iife.js +1 -1
- package/dist/forms/generalLegalSingle.json +1 -1
- package/dist/forms/generalLegalThankYou.es.js +137 -130
- package/dist/forms/generalLegalThankYou.iife.js +1 -1
- package/dist/forms/generalLegalThankYouConsultation.es.js +645 -573
- package/dist/forms/generalLegalThankYouConsultation.iife.js +1 -1
- package/dist/forms/generalLegalThankYouConsultation.json +1 -1
- package/dist/forms/harassmentAndDiscrimination.es.js +271 -214
- package/dist/forms/harassmentAndDiscrimination.iife.js +1 -1
- package/dist/forms/harassmentAndDiscrimination.json +1 -1
- package/dist/forms/landlordTenant.es.js +287 -230
- package/dist/forms/landlordTenant.iife.js +1 -1
- package/dist/forms/landlordTenant.json +1 -1
- package/dist/forms/malpractice.es.js +276 -217
- package/dist/forms/malpractice.iife.js +1 -1
- package/dist/forms/malpractice.json +1 -1
- package/dist/forms/mechanics.es.js +171 -165
- package/dist/forms/mechanics.iife.js +1 -1
- package/dist/forms/mechanics.json +1 -1
- package/dist/forms/patentsAndIP.es.js +617 -548
- package/dist/forms/patentsAndIP.iife.js +1 -1
- package/dist/forms/patentsAndIP.json +1 -1
- package/dist/forms/realEstate.es.js +272 -215
- package/dist/forms/realEstate.iife.js +1 -1
- package/dist/forms/realEstate.json +1 -1
- package/dist/forms/repossession.es.js +275 -217
- package/dist/forms/repossession.iife.js +1 -1
- package/dist/forms/repossession.json +1 -1
- package/dist/forms/ssdi.es.js +139 -138
- package/dist/forms/ssdi.iife.js +1 -1
- package/dist/forms/ssdi.json +1 -1
- package/dist/forms/testForm.es.js +55 -52
- package/dist/forms/testForm.iife.js +1 -1
- package/dist/forms/testRedirects.es.js +28 -22
- package/dist/forms/testRedirects.iife.js +1 -1
- package/dist/forms/vets.es.js +16 -7
- package/dist/forms/vets.iife.js +1 -1
- package/dist/forms/willsAndTrusts.es.js +272 -213
- package/dist/forms/willsAndTrusts.iife.js +1 -1
- package/dist/forms/willsAndTrusts.json +1 -1
- package/package.json +3 -3
|
@@ -6,14 +6,97 @@ function LegalRedirectUrl() {
|
|
|
6
6
|
return 'https://listings.ziplawyer.com/api/v1/redirect?zone_id=4&vertical=Legal&category=${properties.Type_Of_Legal_Problem}&Degree_Of_Interest=${properties.Degree_Of_Interest}&zip_code=${properties.Zip}&sub_id=${properties.vid}'
|
|
7
7
|
}
|
|
8
8
|
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
const
|
|
12
|
-
const
|
|
13
|
-
const
|
|
14
|
-
const
|
|
15
|
-
const
|
|
16
|
-
const
|
|
9
|
+
const DEFAULT_COMMENTS_PLACEHOLDER_DYNAMIC_LEGAL = '$getKey($meta, "commentsPlaceholders." + $get(Type_Of_Legal_Problem).value, $meta.defaultCommentsPlaceholder)';
|
|
10
|
+
const DEFAULT_COMMENTS_LABEL_LEGAL = 'Please briefly describe your legal issue in a few words:';
|
|
11
|
+
const DEFAULT_FINAL_HEADLINE_LEGAL = 'Submit Your Case';
|
|
12
|
+
const DEFAULT_FINAL_HEADLINE_DYNAMIC_LEGAL = '$getKey($meta, "finalHeadlines." + $get(Type_Of_Legal_Problem).value, $meta.defaultFinalHeadline)';
|
|
13
|
+
const DEFAULT_FINAL_SUBHEADLINE_LEGAL = 'You may benefit from speaking with a legal professional. Please verify your contact information.';
|
|
14
|
+
const DEFAULT_FINAL_SUBHEADLINE_DYNAMIC_LEGAL = '$getKey($meta, "finalSubHeadlines." + $get(Type_Of_Legal_Problem).value, $meta.defaultFinalSubHeadline)';
|
|
15
|
+
const TCPA_LANGUAGE_LEGAL = "By checking this box, I a) agree to the Terms of Use, and b) consent to be contacted by lawyers, lawyer networks, and partners of this website using live, autodialed, pre-recorded, or artificial voice calls, as well as text messages. Your consent is not required as a condition of purchasing any goods or services. To submit this request without this consent, call 878-213-4937.";
|
|
16
|
+
const defaultLegalImprovementCrossSells = {
|
|
17
|
+
'Auto and Car Accidents': 'Injured in a Car Accident',
|
|
18
|
+
'Personal Injury': 'Personal or Workplace Injury',
|
|
19
|
+
'DUI and DWI': 'Involved in a DUI/DWI',
|
|
20
|
+
'Wills and Trusts': 'Need a Will or Trust',
|
|
21
|
+
'Power of Attorney': 'Update Power of Attorney',
|
|
22
|
+
'Social Security Disability and Insurance': 'Interest in Disability Benefits',
|
|
23
|
+
};
|
|
24
|
+
const CROSS_SELL_OPTION_MAP_LEGAL = {
|
|
25
|
+
// Values can be a list or a map of value -> display value
|
|
26
|
+
'Auto and Car Accidents': {
|
|
27
|
+
'Social Security Disability and Insurance': 'Interest in Disability Benefits',
|
|
28
|
+
'Wills and Trusts': 'Need a Will or Trust',
|
|
29
|
+
'Workers Compensation': 'Workplace Injury',
|
|
30
|
+
'Power of Attorney': 'Update Power of Attorney',
|
|
31
|
+
'Divorce and Separation': 'Need a Divorce or Separation',
|
|
32
|
+
'Child Custody': 'Need help with Child Custody',
|
|
33
|
+
},
|
|
34
|
+
"Personal Injury": {
|
|
35
|
+
'DUI and DWI': 'Involved in a DUI/DWI',
|
|
36
|
+
'Wills and Trusts': 'Need a Will or Trust',
|
|
37
|
+
'Power of Attorney': 'Update Power of Attorney',
|
|
38
|
+
'Divorce and Separation': 'Need a Divorce or Separation',
|
|
39
|
+
'Child Custody': 'Need help with Child Custody',
|
|
40
|
+
// TODO add one more?
|
|
41
|
+
},
|
|
42
|
+
"Workers Compensation": {
|
|
43
|
+
'DUI and DWI': 'Involved in a DUI/DWI',
|
|
44
|
+
'Wills and Trusts': 'Need a Will or Trust',
|
|
45
|
+
'Power of Attorney': 'Update Power of Attorney',
|
|
46
|
+
'Divorce and Separation': 'Need a Divorce or Separation',
|
|
47
|
+
'Child Custody': 'Need help with Child Custody',
|
|
48
|
+
// TODO add one more?
|
|
49
|
+
},
|
|
50
|
+
"DUI and DWI": {
|
|
51
|
+
'Personal Injury': 'Personal or Workplace Injury',
|
|
52
|
+
'Wills and Trusts': 'Need a Will or Trust',
|
|
53
|
+
'Social Security Disability and Insurance': 'Interest in Disability Benefits',
|
|
54
|
+
'Power of Attorney': 'Update Power of Attorney',
|
|
55
|
+
'Divorce and Separation': 'Need a Divorce or Separation',
|
|
56
|
+
'Child Custody': 'Need help with Child Custody',
|
|
57
|
+
},
|
|
58
|
+
"Wills and Trusts": {
|
|
59
|
+
'Auto and Car Accidents': 'Injured in a Car Accident',
|
|
60
|
+
'Personal Injury': 'Personal or Workplace Injury',
|
|
61
|
+
'DUI and DWI': 'Involved in a DUI/DWI',
|
|
62
|
+
'Social Security Disability and Insurance': 'Interest in Disability Benefits',
|
|
63
|
+
'Divorce and Separation': 'Need a Divorce or Separation',
|
|
64
|
+
'Child Custody': 'Need help with Child Custody',
|
|
65
|
+
},
|
|
66
|
+
"Probate and Estates": {
|
|
67
|
+
'Auto and Car Accidents': 'Injured in a Car Accident',
|
|
68
|
+
'Personal Injury': 'Personal or Workplace Injury',
|
|
69
|
+
'DUI and DWI': 'Involved in a DUI/DWI',
|
|
70
|
+
'Social Security Disability and Insurance': 'Interest in Disability Benefits',
|
|
71
|
+
'Divorce and Separation': 'Need a Divorce or Separation',
|
|
72
|
+
'Child Custody': 'Need help with Child Custody',
|
|
73
|
+
},
|
|
74
|
+
"Power of Attorney": {
|
|
75
|
+
'Auto and Car Accidents': 'Injured in a Car Accident',
|
|
76
|
+
'Personal Injury': 'Personal or Workplace Injury',
|
|
77
|
+
'DUI and DWI': 'Involved in a DUI/DWI',
|
|
78
|
+
'Social Security Disability and Insurance': 'Interest in Disability Benefits',
|
|
79
|
+
'Divorce and Separation': 'Need a Divorce or Separation',
|
|
80
|
+
'Child Custody': 'Need help with Child Custody',
|
|
81
|
+
},
|
|
82
|
+
"Long Term Disability": {
|
|
83
|
+
'Auto and Car Accidents': 'Injured in a Car Accident',
|
|
84
|
+
'DUI and DWI': 'Involved in a DUI/DWI',
|
|
85
|
+
'Wills and Trusts': 'Need a Will or Trust',
|
|
86
|
+
'Power of Attorney': 'Update Power of Attorney',
|
|
87
|
+
'Divorce and Separation': 'Need a Divorce or Separation',
|
|
88
|
+
'Child Custody': 'Need help with Child Custody',
|
|
89
|
+
},
|
|
90
|
+
"Social Security Disability and Insurance": {
|
|
91
|
+
'Auto and Car Accidents': 'Injured in a Car Accident',
|
|
92
|
+
'DUI and DWI': 'Involved in a DUI/DWI',
|
|
93
|
+
'Wills and Trusts': 'Need a Will or Trust',
|
|
94
|
+
'Power of Attorney': 'Update Power of Attorney',
|
|
95
|
+
'Divorce and Separation': 'Need a Divorce or Separation',
|
|
96
|
+
'Child Custody': 'Need help with Child Custody',
|
|
97
|
+
},
|
|
98
|
+
'*': defaultLegalImprovementCrossSells,
|
|
99
|
+
};
|
|
17
100
|
|
|
18
101
|
// ------ Common Base Settings
|
|
19
102
|
|
|
@@ -177,6 +260,73 @@ const sbsDate = (updates) => {
|
|
|
177
260
|
return date(updates)
|
|
178
261
|
};
|
|
179
262
|
|
|
263
|
+
const email = (scope) => sbsText({
|
|
264
|
+
$formkit: 'email',
|
|
265
|
+
name: scope ? scope + ':' + 'Email' : 'Email',
|
|
266
|
+
label: 'Email Address:',
|
|
267
|
+
placeholder: 'email@domain.com',
|
|
268
|
+
autocomplete: 'email',
|
|
269
|
+
'data-tf-sensitive': 'false',
|
|
270
|
+
validation: 'required|email',
|
|
271
|
+
validationMessages: {
|
|
272
|
+
required: 'Email is required',
|
|
273
|
+
email: 'Invalid Email'
|
|
274
|
+
}
|
|
275
|
+
});
|
|
276
|
+
|
|
277
|
+
const firstName = (scope) => sbsText({
|
|
278
|
+
label: 'First Name:',
|
|
279
|
+
placeholder: 'First',
|
|
280
|
+
name: scope ? scope + ':' + 'First_Name' : 'First_Name',
|
|
281
|
+
autocomplete: "given-name",
|
|
282
|
+
validationMessages: {
|
|
283
|
+
required: 'First Name is required'
|
|
284
|
+
}
|
|
285
|
+
});
|
|
286
|
+
|
|
287
|
+
const lastName = (scope) => sbsText({
|
|
288
|
+
label: 'Last Name:',
|
|
289
|
+
placeholder: 'Last',
|
|
290
|
+
name: scope ? scope + ':' + 'Last_Name' : 'Last_Name',
|
|
291
|
+
autocomplete: "family-name",
|
|
292
|
+
validationMessages: {
|
|
293
|
+
required: 'Last Name is required'
|
|
294
|
+
}
|
|
295
|
+
});
|
|
296
|
+
|
|
297
|
+
const phone = (scope) => sbsText({
|
|
298
|
+
$formkit: 'tel',
|
|
299
|
+
name: scope ? scope + ':' + 'Primary_Phone' : 'Primary_Phone',
|
|
300
|
+
label: 'Phone Number:',
|
|
301
|
+
placeholder: '###-###-####',
|
|
302
|
+
maxlength: 12,
|
|
303
|
+
help: '10-digit phone number, hyphens optional',
|
|
304
|
+
autocomplete: 'tel-national',
|
|
305
|
+
'data-tf-sensitive': 'false',
|
|
306
|
+
validation: 'required|matches:/^[0-9]{3}-?[0-9]{3}-?[0-9]{4}$/|valid_phone',
|
|
307
|
+
validationMessages: {
|
|
308
|
+
required: 'Field is required',
|
|
309
|
+
matches: 'Invalid Phone Format, use ###-###-####',
|
|
310
|
+
valid_phone: 'Invalid Phone Number'
|
|
311
|
+
},
|
|
312
|
+
helpClass: "t-mt-2.5 md:t-text-right md:t-mt-[-2px]"
|
|
313
|
+
});
|
|
314
|
+
|
|
315
|
+
|
|
316
|
+
const zipcode = (scope) => sbsText({
|
|
317
|
+
label: 'Zip Code:',
|
|
318
|
+
placeholder: '#####',
|
|
319
|
+
name: scope ? scope + ':' + 'Zip' : 'Zip',
|
|
320
|
+
maxlength: 5,
|
|
321
|
+
inputmode: "numeric",
|
|
322
|
+
autocomplete: 'postal-code',
|
|
323
|
+
validation: 'required|matches:/^[0-9]{5}$/',
|
|
324
|
+
validationMessages: {
|
|
325
|
+
required: 'Zip Code is required',
|
|
326
|
+
matches: 'Invalid Zip Code'
|
|
327
|
+
}
|
|
328
|
+
});
|
|
329
|
+
|
|
180
330
|
const applicantAge = (scope) => sbsText({
|
|
181
331
|
name: scope ? scope + ':' + 'Applicant_Age' : 'Applicant_Age',
|
|
182
332
|
label: 'Age of Applicant?',
|
|
@@ -318,20 +468,6 @@ const doctorTreatment = (scope) => sbsYesNoRadio({
|
|
|
318
468
|
label: 'Have You Recently Been Treated by a Doctor, Hospital or Clinic?',
|
|
319
469
|
});
|
|
320
470
|
|
|
321
|
-
const email = (scope) => sbsText({
|
|
322
|
-
$formkit: 'email',
|
|
323
|
-
name: scope ? scope + ':' + 'Email' : 'Email',
|
|
324
|
-
label: 'Email Address:',
|
|
325
|
-
placeholder: 'email@domain.com',
|
|
326
|
-
autocomplete: 'email',
|
|
327
|
-
'data-tf-sensitive': 'false',
|
|
328
|
-
validation: 'required|email',
|
|
329
|
-
validationMessages: {
|
|
330
|
-
required: 'Email is required',
|
|
331
|
-
email: 'Invalid Email'
|
|
332
|
-
}
|
|
333
|
-
});
|
|
334
|
-
|
|
335
471
|
const estateLegalServicesNeeded = (scope) => sbsSelect({
|
|
336
472
|
name: scope ? scope + ':' + 'Estate_Legal_Services_Needed' : 'Estate_Legal_Services_Needed',
|
|
337
473
|
label: "Legal Services Needed for Your Estate:",
|
|
@@ -345,17 +481,6 @@ const estateLegalServicesNeeded = (scope) => sbsSelect({
|
|
|
345
481
|
]
|
|
346
482
|
});
|
|
347
483
|
|
|
348
|
-
const firstName = (scope) => sbsText({
|
|
349
|
-
$formkit: 'text',
|
|
350
|
-
label: 'First Name:',
|
|
351
|
-
placeholder: 'First',
|
|
352
|
-
name: scope ? scope + ':' + 'First_Name' : 'First_Name',
|
|
353
|
-
autocomplete: "given-name",
|
|
354
|
-
validationMessages: {
|
|
355
|
-
required: 'First Name is required'
|
|
356
|
-
}
|
|
357
|
-
});
|
|
358
|
-
|
|
359
484
|
const haveAttorney = (scope) => sbsYesNoRadio({
|
|
360
485
|
name: scope ? scope + ':' + 'Have_Attorney' : 'Have_Attorney',
|
|
361
486
|
label: 'Already Working with An Attorney?'
|
|
@@ -371,17 +496,6 @@ const incidentDate = (scope) => sbsDate({
|
|
|
371
496
|
label: 'Date of Incident:',
|
|
372
497
|
});
|
|
373
498
|
|
|
374
|
-
const lastName = (scope) => sbsText({
|
|
375
|
-
$formkit: 'text',
|
|
376
|
-
label: 'Last Name:',
|
|
377
|
-
placeholder: 'Last',
|
|
378
|
-
name: scope ? scope + ':' + 'Last_Name' : 'Last_Name',
|
|
379
|
-
autocomplete: "family-name",
|
|
380
|
-
validationMessages: {
|
|
381
|
-
required: 'Last Name is required'
|
|
382
|
-
}
|
|
383
|
-
});
|
|
384
|
-
|
|
385
499
|
const lawyerPaymentMethod = (scope) => sbsSelect({
|
|
386
500
|
name: scope ? scope + ':' + 'Lawyer_Payment_Method' : 'Lawyer_Payment_Method',
|
|
387
501
|
label: 'How Will You Pay for Legal Fees if You Hire a Lawyer?',
|
|
@@ -402,69 +516,7 @@ const legalCrossSells$1 = () => col2Checkbox({
|
|
|
402
516
|
help: 'Just hit "Next" if none apply',
|
|
403
517
|
helpClass: 't-text-center !t-text-sm',
|
|
404
518
|
validation: null,
|
|
405
|
-
options:
|
|
406
|
-
if: '$getVal($get(form), "Type_Of_Legal_Problem") === "Auto and Car Accidents"',
|
|
407
|
-
then: {
|
|
408
|
-
'Social Security Disability and Insurance': 'Interest in Disability Benefits',
|
|
409
|
-
'Wills and Trusts': 'Need a Will or Trust',
|
|
410
|
-
'Workers Compensation': 'Workplace Injury',
|
|
411
|
-
'Power of Attorney': 'Update Power of Attorney',
|
|
412
|
-
'Divorce and Separation': 'Need a Divorce or Separation',
|
|
413
|
-
'Child Custody': 'Need help with Child Custody',
|
|
414
|
-
},
|
|
415
|
-
else: {
|
|
416
|
-
if: '$getVal($get(form), "Type_Of_Legal_Problem") === "Personal Injury" || $getVal($get(form), "Type_Of_Legal_Problem") === "Workers Compensation"',
|
|
417
|
-
then: {
|
|
418
|
-
'DUI and DWI': 'Involved in a DUI/DWI',
|
|
419
|
-
'Wills and Trusts': 'Need a Will or Trust',
|
|
420
|
-
'Power of Attorney': 'Update Power of Attorney',
|
|
421
|
-
'Divorce and Separation': 'Need a Divorce or Separation',
|
|
422
|
-
'Child Custody': 'Need help with Child Custody',
|
|
423
|
-
// TODO add one more?
|
|
424
|
-
},
|
|
425
|
-
else: {
|
|
426
|
-
if: '$getVal($get(form), "Type_Of_Legal_Problem") === "DUI and DWI"',
|
|
427
|
-
then: {
|
|
428
|
-
'Personal Injury': 'Personal or Workplace Injury',
|
|
429
|
-
'Wills and Trusts': 'Need a Will or Trust',
|
|
430
|
-
'Social Security Disability and Insurance': 'Interest in Disability Benefits',
|
|
431
|
-
'Power of Attorney': 'Update Power of Attorney',
|
|
432
|
-
'Divorce and Separation': 'Need a Divorce or Separation',
|
|
433
|
-
'Child Custody': 'Need help with Child Custody',
|
|
434
|
-
},
|
|
435
|
-
else: {
|
|
436
|
-
if: '$getVal($get(form), "Type_Of_Legal_Problem") === "Wills and Trusts" || $getVal($get(form), "Type_Of_Legal_Problem") === "Probate and Estates" || $getVal($get(form), "Type_Of_Legal_Problem") === "Power of Attorney"',
|
|
437
|
-
then: {
|
|
438
|
-
'Auto and Car Accidents': 'Injured in a Car Accident',
|
|
439
|
-
'Personal Injury': 'Personal or Workplace Injury',
|
|
440
|
-
'DUI and DWI': 'Involved in a DUI/DWI',
|
|
441
|
-
'Social Security Disability and Insurance': 'Interest in Disability Benefits',
|
|
442
|
-
'Divorce and Separation': 'Need a Divorce or Separation',
|
|
443
|
-
'Child Custody': 'Need help with Child Custody',
|
|
444
|
-
},
|
|
445
|
-
else: {
|
|
446
|
-
if: '$getVal($get(form), "Type_Of_Legal_Problem") === "Long Term Disability" || $getVal($get(form), "Type_Of_Legal_Problem") === "Social Security Disability and Insurance"',
|
|
447
|
-
then: {
|
|
448
|
-
'Auto and Car Accidents': 'Injured in a Car Accident',
|
|
449
|
-
'DUI and DWI': 'Involved in a DUI/DWI',
|
|
450
|
-
'Wills and Trusts': 'Need a Will or Trust',
|
|
451
|
-
'Power of Attorney': 'Update Power of Attorney',
|
|
452
|
-
'Divorce and Separation': 'Need a Divorce or Separation',
|
|
453
|
-
'Child Custody': 'Need help with Child Custody',
|
|
454
|
-
},
|
|
455
|
-
else: {
|
|
456
|
-
'Auto and Car Accidents': 'Injured in a Car Accident',
|
|
457
|
-
'Personal Injury': 'Personal or Workplace Injury',
|
|
458
|
-
'DUI and DWI': 'Involved in a DUI/DWI',
|
|
459
|
-
'Wills and Trusts': 'Need a Will or Trust',
|
|
460
|
-
'Power of Attorney': 'Update Power of Attorney',
|
|
461
|
-
'Social Security Disability and Insurance': 'Interest in Disability Benefits',
|
|
462
|
-
}
|
|
463
|
-
}
|
|
464
|
-
}
|
|
465
|
-
}
|
|
466
|
-
}
|
|
467
|
-
}
|
|
519
|
+
options: '$getCrossSellOptions($get(form), $getVal($get(form), "Type_Of_Legal_Problem"))',
|
|
468
520
|
});
|
|
469
521
|
|
|
470
522
|
const maritalStatus = (scope) => sbsSelect({
|
|
@@ -485,24 +537,6 @@ const pendingCharges = (scope) => sbsYesNoRadio({
|
|
|
485
537
|
label: 'Do you currently have any pending charges?'
|
|
486
538
|
});
|
|
487
539
|
|
|
488
|
-
const phone = (scope) => sbsText({
|
|
489
|
-
$formkit: 'tel',
|
|
490
|
-
name: scope ? scope + ':' + 'Primary_Phone' : 'Primary_Phone',
|
|
491
|
-
label: 'Phone Number:',
|
|
492
|
-
placeholder: '###-###-####',
|
|
493
|
-
maxlength: 12,
|
|
494
|
-
help: '10-digit phone number, hyphens optional',
|
|
495
|
-
autocomplete: 'tel-national',
|
|
496
|
-
'data-tf-sensitive': 'false',
|
|
497
|
-
validation: 'required|matches:/^[0-9]{3}-?[0-9]{3}-?[0-9]{4}$/|valid_phone',
|
|
498
|
-
validationMessages: {
|
|
499
|
-
required: 'Field is required',
|
|
500
|
-
matches: 'Invalid Phone Format, use ###-###-####',
|
|
501
|
-
valid_phone: 'Invalid Phone Number'
|
|
502
|
-
},
|
|
503
|
-
helpClass: "t-mt-2.5 md:t-text-right md:t-mt-[-2px]"
|
|
504
|
-
});
|
|
505
|
-
|
|
506
540
|
const primaryInjury = (scope) => sbs2ColRadio({
|
|
507
541
|
name: scope ? scope + ':' + 'Primary_Injury' : 'Primary_Injury',
|
|
508
542
|
label: 'Primary Injury:',
|
|
@@ -599,21 +633,6 @@ const valueOfAssets = (scope) => sbsSelect({
|
|
|
599
633
|
]
|
|
600
634
|
});
|
|
601
635
|
|
|
602
|
-
const zipcode = (scope) => sbsText({
|
|
603
|
-
label: 'Zip Code:',
|
|
604
|
-
placeholder: '#####',
|
|
605
|
-
name: scope ? scope + ':' + 'Zip' : 'Zip',
|
|
606
|
-
maxlength: 5,
|
|
607
|
-
inputmode: "numeric",
|
|
608
|
-
autocomplete: 'postal-code',
|
|
609
|
-
validation: 'required|matches:/^[0-9]{5}$/',
|
|
610
|
-
validationMessages: {
|
|
611
|
-
required: 'Zip Code is required',
|
|
612
|
-
matches: 'Invalid Zip Code'
|
|
613
|
-
}
|
|
614
|
-
});
|
|
615
|
-
|
|
616
|
-
|
|
617
636
|
// ------ Question Groups
|
|
618
637
|
|
|
619
638
|
// NOTE: name must be unique within a form!
|
|
@@ -923,13 +942,20 @@ function crossSellQuestionsStepSubHeadline(updates) {
|
|
|
923
942
|
function commentsStepHeadline(updates) {
|
|
924
943
|
return {
|
|
925
944
|
$el: 'h3',
|
|
926
|
-
children: updates.headline || 'Additional
|
|
945
|
+
children: updates.headline || 'Additional Details',
|
|
927
946
|
attrs: {
|
|
928
947
|
class: 't-flex t-justify-center t-text-center t-text-2xl t-font-bold t-text-blue-500 t-pb-5 t-pt-0 t-px-1' + ' ' + (updates.headlineClass || '')
|
|
929
948
|
}
|
|
930
949
|
}
|
|
931
950
|
}
|
|
932
951
|
|
|
952
|
+
function commentsStepHeadlineLegal(updates) {
|
|
953
|
+
return commentsStepHeadline({
|
|
954
|
+
headline: updates.headline || 'Additional Case Details',
|
|
955
|
+
headlineClass: updates.headlineClass
|
|
956
|
+
})
|
|
957
|
+
}
|
|
958
|
+
|
|
933
959
|
function firstAndLastStepHeadline(updates) {
|
|
934
960
|
return {
|
|
935
961
|
$el: 'h3',
|
|
@@ -953,7 +979,7 @@ function legalCrossSellsStepHeadline(updates) {
|
|
|
953
979
|
function contactStepHeadline(updates) {
|
|
954
980
|
return {
|
|
955
981
|
$el: 'h3',
|
|
956
|
-
children: updates.headline ||
|
|
982
|
+
children: updates.headline || DEFAULT_FINAL_HEADLINE_DYNAMIC_LEGAL,
|
|
957
983
|
attrs: {
|
|
958
984
|
class: 't-flex t-justify-center t-text-center t-text-2xl t-font-bold t-text-blue-500 t-pb-3 t-pt-0 t-px-1' + ' ' + (updates.headlineClass || '')
|
|
959
985
|
}
|
|
@@ -963,7 +989,7 @@ function contactStepHeadline(updates) {
|
|
|
963
989
|
function contactStepSubHeadline(updates) {
|
|
964
990
|
return {
|
|
965
991
|
$el: 'h5',
|
|
966
|
-
children: updates.subheadline ||
|
|
992
|
+
children: updates.subheadline || DEFAULT_FINAL_SUBHEADLINE_DYNAMIC_LEGAL,
|
|
967
993
|
attrs: {
|
|
968
994
|
class: 't-flex t-justify-center t-text-center !t-text-lg t-font-semibold t-pb-7 t-pt-0 t-px-3' + ' ' + (updates.subheadlineClass || '')
|
|
969
995
|
}
|
|
@@ -1003,10 +1029,16 @@ const stepDefaults = (step, stepKey) => ({
|
|
|
1003
1029
|
}
|
|
1004
1030
|
});
|
|
1005
1031
|
|
|
1006
|
-
function step(name, inputs,
|
|
1007
|
-
|
|
1008
|
-
nextOnEnter = true
|
|
1009
|
-
|
|
1032
|
+
function step(name, inputs, updates = {}) {
|
|
1033
|
+
const {
|
|
1034
|
+
nextOnEnter = true,
|
|
1035
|
+
nextOnInput = false,
|
|
1036
|
+
stepKey = undefined,
|
|
1037
|
+
nextStepMap = undefined,
|
|
1038
|
+
triggerRedirectMap = undefined,
|
|
1039
|
+
autoFocus = undefined,
|
|
1040
|
+
} = updates;
|
|
1041
|
+
|
|
1010
1042
|
if (inputs && inputs.length && (nextOnEnter || nextOnInput)) {
|
|
1011
1043
|
const lastInput = findLastInput(inputs[inputs.length - 1]);
|
|
1012
1044
|
if (lastInput && nextOnEnter === true) {
|
|
@@ -1026,6 +1058,7 @@ function step(name, inputs, nextOnEnter = true, nextOnInput = false, stepKey = u
|
|
|
1026
1058
|
id: name,
|
|
1027
1059
|
name: name,
|
|
1028
1060
|
nextStepMap: nextStepMap,
|
|
1061
|
+
triggerRedirectMap: triggerRedirectMap,
|
|
1029
1062
|
autoFocus: autoFocus,
|
|
1030
1063
|
children: inputs
|
|
1031
1064
|
}
|
|
@@ -1034,6 +1067,33 @@ function step(name, inputs, nextOnEnter = true, nextOnInput = false, stepKey = u
|
|
|
1034
1067
|
)
|
|
1035
1068
|
}
|
|
1036
1069
|
|
|
1070
|
+
function contactInfo(updates = {}) {
|
|
1071
|
+
return step(
|
|
1072
|
+
'contactInfo',
|
|
1073
|
+
[
|
|
1074
|
+
contactStepHeadline(updates),
|
|
1075
|
+
contactStepSubHeadline(updates),
|
|
1076
|
+
trustedFormScript(),
|
|
1077
|
+
email(updates.scope),
|
|
1078
|
+
phone(updates.scope),
|
|
1079
|
+
TCPAConsent(updates.scope),
|
|
1080
|
+
secureIcon()
|
|
1081
|
+
],
|
|
1082
|
+
{ nextOnEnter: false }
|
|
1083
|
+
)
|
|
1084
|
+
}
|
|
1085
|
+
|
|
1086
|
+
function firstAndLastV2(updates = {}) {
|
|
1087
|
+
return step(
|
|
1088
|
+
'firstAndLast',
|
|
1089
|
+
[
|
|
1090
|
+
firstAndLastStepHeadline(updates),
|
|
1091
|
+
firstName(),
|
|
1092
|
+
lastName()
|
|
1093
|
+
],
|
|
1094
|
+
updates
|
|
1095
|
+
)
|
|
1096
|
+
}
|
|
1037
1097
|
|
|
1038
1098
|
function childAndFamilyTOLPAndZip(updates = {}) {
|
|
1039
1099
|
return step(
|
|
@@ -1042,10 +1102,7 @@ function childAndFamilyTOLPAndZip(updates = {}) {
|
|
|
1042
1102
|
childAndFamilyTOLP(),
|
|
1043
1103
|
zipcode()
|
|
1044
1104
|
],
|
|
1045
|
-
updates
|
|
1046
|
-
updates.nextOnInput,
|
|
1047
|
-
updates.stepKey,
|
|
1048
|
-
updates.nextStepMap
|
|
1105
|
+
updates
|
|
1049
1106
|
)
|
|
1050
1107
|
}
|
|
1051
1108
|
|
|
@@ -1053,10 +1110,10 @@ function commentsWithBankruptcy(updates = {}) {
|
|
|
1053
1110
|
return step(
|
|
1054
1111
|
'commentsWithBankruptcy',
|
|
1055
1112
|
[
|
|
1056
|
-
|
|
1113
|
+
commentsStepHeadlineLegal(updates),
|
|
1057
1114
|
comments({
|
|
1058
|
-
label: typeof updates.label === 'undefined' ?
|
|
1059
|
-
placeholder: updates.placeholder ||
|
|
1115
|
+
label: typeof updates.label === 'undefined' ? DEFAULT_COMMENTS_LABEL_LEGAL : updates.label,
|
|
1116
|
+
placeholder: updates.placeholder || DEFAULT_COMMENTS_PLACEHOLDER_DYNAMIC_LEGAL,
|
|
1060
1117
|
inputClass: typeof updates.inputClass === 'undefined' ? '!t-h-32' : updates.inputClass,
|
|
1061
1118
|
}, updates.scope),
|
|
1062
1119
|
// TODO: needs scope support
|
|
@@ -1073,39 +1130,10 @@ function commentsWithBankruptcy(updates = {}) {
|
|
|
1073
1130
|
],
|
|
1074
1131
|
}
|
|
1075
1132
|
],
|
|
1076
|
-
false
|
|
1077
|
-
)
|
|
1078
|
-
}
|
|
1079
|
-
|
|
1080
|
-
function contactInfo(updates = {}) {
|
|
1081
|
-
return step(
|
|
1082
|
-
'contactInfo',
|
|
1083
|
-
[
|
|
1084
|
-
contactStepHeadline(updates),
|
|
1085
|
-
contactStepSubHeadline(updates),
|
|
1086
|
-
trustedFormScript(),
|
|
1087
|
-
email(updates.scope),
|
|
1088
|
-
phone(updates.scope),
|
|
1089
|
-
TCPAConsent(updates.scope),
|
|
1090
|
-
secureIcon()
|
|
1091
|
-
],
|
|
1092
|
-
false, // nextOnEnter
|
|
1093
|
-
)
|
|
1094
|
-
}
|
|
1095
|
-
|
|
1096
|
-
function firstAndLastV2(updates = {}) {
|
|
1097
|
-
return step(
|
|
1098
|
-
'firstAndLast',
|
|
1099
|
-
[
|
|
1100
|
-
firstAndLastStepHeadline(updates),
|
|
1101
|
-
firstName(),
|
|
1102
|
-
lastName()
|
|
1103
|
-
],
|
|
1104
|
-
updates.nextOnEnter
|
|
1133
|
+
{ nextOnEnter: false }
|
|
1105
1134
|
)
|
|
1106
1135
|
}
|
|
1107
1136
|
|
|
1108
|
-
|
|
1109
1137
|
function autoAndCarAccidentCrossSellQuestions(updates = {}) {
|
|
1110
1138
|
return step(
|
|
1111
1139
|
'autoAndCarAccidentCrossSellQuestions',
|
|
@@ -1122,7 +1150,7 @@ function autoAndCarAccidentCrossSellQuestions(updates = {}) {
|
|
|
1122
1150
|
'CrossSell:Auto_and_Car_Accidents'
|
|
1123
1151
|
)
|
|
1124
1152
|
],
|
|
1125
|
-
updates
|
|
1153
|
+
updates
|
|
1126
1154
|
)
|
|
1127
1155
|
}
|
|
1128
1156
|
|
|
@@ -1141,7 +1169,7 @@ function duiAndDWICrossSellQuestions(updates = {}) {
|
|
|
1141
1169
|
'CrossSell:DUI_and_DWI'
|
|
1142
1170
|
)
|
|
1143
1171
|
],
|
|
1144
|
-
updates
|
|
1172
|
+
updates
|
|
1145
1173
|
)
|
|
1146
1174
|
}
|
|
1147
1175
|
|
|
@@ -1161,7 +1189,7 @@ function ssdiCrossSellQuestions(updates = {}) {
|
|
|
1161
1189
|
'CrossSell:Social_Security_Disability_and_Insurance'
|
|
1162
1190
|
)
|
|
1163
1191
|
],
|
|
1164
|
-
updates
|
|
1192
|
+
updates
|
|
1165
1193
|
)
|
|
1166
1194
|
}
|
|
1167
1195
|
|
|
@@ -1181,7 +1209,7 @@ function personalInjuryCrossSellQuestions(updates = {}) {
|
|
|
1181
1209
|
'CrossSell:Personal_Injury'
|
|
1182
1210
|
)
|
|
1183
1211
|
],
|
|
1184
|
-
updates
|
|
1212
|
+
updates
|
|
1185
1213
|
)
|
|
1186
1214
|
}
|
|
1187
1215
|
|
|
@@ -1200,7 +1228,7 @@ function powerOfAttorneyCrossSellQuestions(updates = {}) {
|
|
|
1200
1228
|
'CrossSell:Power_of_Attorney'
|
|
1201
1229
|
)
|
|
1202
1230
|
],
|
|
1203
|
-
updates
|
|
1231
|
+
updates
|
|
1204
1232
|
)
|
|
1205
1233
|
}
|
|
1206
1234
|
|
|
@@ -1219,7 +1247,7 @@ function willsAndTrustsCrossSellQuestions(updates = {}) {
|
|
|
1219
1247
|
'CrossSell:Wills_and_Trusts'
|
|
1220
1248
|
)
|
|
1221
1249
|
],
|
|
1222
|
-
updates
|
|
1250
|
+
updates
|
|
1223
1251
|
)
|
|
1224
1252
|
}
|
|
1225
1253
|
|
|
@@ -1237,21 +1265,20 @@ function childAndFamilyTOLPQuestions(updates = {}) {
|
|
|
1237
1265
|
DivorceQuestions(),
|
|
1238
1266
|
NotSureOrOtherQuestions()
|
|
1239
1267
|
],
|
|
1240
|
-
updates
|
|
1268
|
+
updates
|
|
1241
1269
|
)
|
|
1242
1270
|
}
|
|
1243
1271
|
|
|
1244
1272
|
function legalCrossSells(updates = {}) {
|
|
1273
|
+
updates.nextOnInput = false;
|
|
1274
|
+
updates.stepKey = '$get(Type_Of_Legal_Problem).value';
|
|
1245
1275
|
return step(
|
|
1246
1276
|
'legalCrossSells',
|
|
1247
1277
|
[
|
|
1248
1278
|
legalCrossSellsStepHeadline(updates),
|
|
1249
1279
|
legalCrossSells$1(),
|
|
1250
1280
|
],
|
|
1251
|
-
updates
|
|
1252
|
-
false,
|
|
1253
|
-
// Note: we should probably scope this stepKey to this step name
|
|
1254
|
-
'$get(Type_Of_Legal_Problem).value'
|
|
1281
|
+
updates
|
|
1255
1282
|
)
|
|
1256
1283
|
}
|
|
1257
1284
|
|
|
@@ -1394,9 +1421,7 @@ function formProps(updates) {
|
|
|
1394
1421
|
return props
|
|
1395
1422
|
}
|
|
1396
1423
|
|
|
1397
|
-
const metaDefaults = {
|
|
1398
|
-
tcpaLanguage: TCPA_LANGUAGE
|
|
1399
|
-
};
|
|
1424
|
+
const metaDefaults = {};
|
|
1400
1425
|
|
|
1401
1426
|
function metaProps(updates) {
|
|
1402
1427
|
const data = merge(
|
|
@@ -1409,7 +1434,7 @@ function metaProps(updates) {
|
|
|
1409
1434
|
}
|
|
1410
1435
|
}
|
|
1411
1436
|
|
|
1412
|
-
function
|
|
1437
|
+
function defaultMetaPropsLegal(tolps = null) {
|
|
1413
1438
|
let commentsPlaceholders = TOLPCommentsPlaceholders;
|
|
1414
1439
|
let finalHeadlines = TOLPFinalHeadlines;
|
|
1415
1440
|
let finalSubHeadlines = TOLPFinalSubHeadlines;
|
|
@@ -1419,12 +1444,13 @@ function defaultMetaProps(tolps = null) {
|
|
|
1419
1444
|
finalSubHeadlines = filterMapByKey(TOLPFinalSubHeadlines, tolps);
|
|
1420
1445
|
}
|
|
1421
1446
|
return metaProps({
|
|
1422
|
-
|
|
1447
|
+
tcpaLanguage: TCPA_LANGUAGE_LEGAL,
|
|
1448
|
+
defaultCommentsPlaceholder: DEFAULT_COMMENTS_PLACEHOLDER_DYNAMIC_LEGAL,
|
|
1423
1449
|
commentsPlaceholders: commentsPlaceholders,
|
|
1424
|
-
defaultFinalHeadline:
|
|
1450
|
+
defaultFinalHeadline: DEFAULT_FINAL_HEADLINE_LEGAL,
|
|
1425
1451
|
finalHeadlines: finalHeadlines,
|
|
1426
|
-
defaultFinalSubHeadline:
|
|
1427
|
-
finalSubHeadlines: finalSubHeadlines
|
|
1452
|
+
defaultFinalSubHeadline: DEFAULT_FINAL_SUBHEADLINE_LEGAL,
|
|
1453
|
+
finalSubHeadlines: finalSubHeadlines
|
|
1428
1454
|
})
|
|
1429
1455
|
}
|
|
1430
1456
|
|
|
@@ -1655,23 +1681,53 @@ const TOLPFinalSubHeadlines = {
|
|
|
1655
1681
|
// 'Non-Workplace Discrimination': '',
|
|
1656
1682
|
};
|
|
1657
1683
|
|
|
1658
|
-
|
|
1659
1684
|
const nextStepsMapLegalLegacy = {
|
|
1660
|
-
|
|
1661
|
-
'
|
|
1662
|
-
|
|
1663
|
-
|
|
1664
|
-
|
|
1665
|
-
|
|
1666
|
-
|
|
1685
|
+
values: {
|
|
1686
|
+
'*': [
|
|
1687
|
+
'TOLPQuestions',
|
|
1688
|
+
'commentsWithBankruptcy',
|
|
1689
|
+
'legalCrossSells',
|
|
1690
|
+
'firstAndLast',
|
|
1691
|
+
'contactInfo',
|
|
1692
|
+
]
|
|
1693
|
+
}
|
|
1667
1694
|
};
|
|
1668
1695
|
|
|
1669
|
-
const
|
|
1696
|
+
const nextStepsMapLegalCrossSells = {
|
|
1697
|
+
values: {
|
|
1698
|
+
'Legal_CrossSells': {
|
|
1699
|
+
'Auto and Car Accidents': ['autoAndCarAccidentCrossSellQuestions'],
|
|
1700
|
+
'Personal Injury': ['personalInjuryCrossSellQuestions'],
|
|
1701
|
+
'Workers Compensation': ['workersCompensationCrossSellQuestions'],
|
|
1702
|
+
'DUI and DWI': ['duiAndDWICrossSellQuestions'],
|
|
1703
|
+
'Long Term Disability': ['longTermDisabilityCrossSellQuestions'],
|
|
1704
|
+
'Social Security Disability and Insurance': ['ssdiCrossSellQuestions'],
|
|
1705
|
+
'Bankruptcy': ['bankruptcyCrossSellQuestions'],
|
|
1706
|
+
'Power of Attorney': ['powerOfAttorneyCrossSellQuestions'],
|
|
1707
|
+
'Wills and Trusts': ['willsAndTrustsCrossSellQuestions'],
|
|
1708
|
+
'Divorce and Separation': ['divorceAndSeparationCrossSellQuestions'],
|
|
1709
|
+
'Child Custody': ['childCustodyCrossSellQuestions'],
|
|
1710
|
+
},
|
|
1711
|
+
'*': ['firstAndLast', 'contactInfo'],
|
|
1712
|
+
},
|
|
1713
|
+
|
|
1714
|
+
// NOTE: this assumes a certain placement of the cross sell question
|
|
1715
|
+
// in the form flow.
|
|
1716
|
+
appendSteps: ['firstAndLast', 'contactInfo'],
|
|
1717
|
+
matchesAllowed: 1,
|
|
1718
|
+
};
|
|
1719
|
+
|
|
1720
|
+
const legalCrossSellOptionMap = CROSS_SELL_OPTION_MAP_LEGAL;
|
|
1721
|
+
|
|
1722
|
+
const meta = defaultMetaPropsLegal();
|
|
1670
1723
|
|
|
1671
1724
|
meta.data.dynamicSchema = [
|
|
1672
1725
|
childAndFamilyTOLPQuestions(),
|
|
1673
1726
|
commentsWithBankruptcy(),
|
|
1674
|
-
legalCrossSells(
|
|
1727
|
+
legalCrossSells({
|
|
1728
|
+
headlineClass: '!t-text-dark',
|
|
1729
|
+
nextStepMap: nextStepsMapLegalCrossSells,
|
|
1730
|
+
}),
|
|
1675
1731
|
// Note: this is purposefully limited to a subset of values
|
|
1676
1732
|
// that could show up in the Legal_CrossSells input because
|
|
1677
1733
|
// this form only allows a handful of TOLPs on stage 1!
|
|
@@ -1691,7 +1747,8 @@ const schema = [
|
|
|
1691
1747
|
$cmp: 'FormKit',
|
|
1692
1748
|
props: formProps({
|
|
1693
1749
|
formId: 'childAndFamily',
|
|
1694
|
-
redirectMap: legalRedirectMap()
|
|
1750
|
+
redirectMap: legalRedirectMap(),
|
|
1751
|
+
crossSellOptionMap: legalCrossSellOptionMap
|
|
1695
1752
|
}),
|
|
1696
1753
|
children: [
|
|
1697
1754
|
headline({
|