bhl-forms 0.6.14 → 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.
Files changed (94) hide show
  1. package/dist/bhl-forms.es.js +1757 -1759
  2. package/dist/bhl-forms.iife.js +4 -4
  3. package/dist/bhl-forms.modern.es.js +2804 -2811
  4. package/dist/bhl-forms.modern.iife.js +6 -6
  5. package/dist/bhl-forms.modern.umd.js +6 -6
  6. package/dist/bhl-forms.umd.js +4 -4
  7. package/dist/forms/accidentsAndInjuries.es.js +278 -215
  8. package/dist/forms/accidentsAndInjuries.iife.js +1 -1
  9. package/dist/forms/accidentsAndInjuries.json +1 -1
  10. package/dist/forms/appraisals.es.js +16 -7
  11. package/dist/forms/appraisals.iife.js +1 -1
  12. package/dist/forms/business.es.js +288 -226
  13. package/dist/forms/business.iife.js +1 -1
  14. package/dist/forms/business.json +1 -1
  15. package/dist/forms/childAndFamily.es.js +271 -214
  16. package/dist/forms/childAndFamily.iife.js +1 -1
  17. package/dist/forms/childAndFamily.json +1 -1
  18. package/dist/forms/childAndFamilySingle.es.js +614 -545
  19. package/dist/forms/childAndFamilySingle.iife.js +1 -1
  20. package/dist/forms/childAndFamilySingle.json +1 -1
  21. package/dist/forms/civilLawsuit.es.js +608 -541
  22. package/dist/forms/civilLawsuit.iife.js +1 -1
  23. package/dist/forms/civilLawsuit.json +1 -1
  24. package/dist/forms/coins.es.js +16 -7
  25. package/dist/forms/coins.iife.js +1 -1
  26. package/dist/forms/contracts.es.js +275 -217
  27. package/dist/forms/contracts.iife.js +1 -1
  28. package/dist/forms/contracts.json +1 -1
  29. package/dist/forms/criminal.es.js +631 -562
  30. package/dist/forms/criminal.iife.js +1 -1
  31. package/dist/forms/criminal.json +1 -1
  32. package/dist/forms/divorce.es.js +614 -545
  33. package/dist/forms/divorce.iife.js +1 -1
  34. package/dist/forms/divorce.json +1 -1
  35. package/dist/forms/employmentAndWorkplace.es.js +555 -496
  36. package/dist/forms/employmentAndWorkplace.iife.js +1 -1
  37. package/dist/forms/employmentAndWorkplace.json +1 -1
  38. package/dist/forms/generalHomeImprovement.es.js +3224 -0
  39. package/dist/forms/generalHomeImprovement.iife.js +1 -0
  40. package/dist/forms/generalHomeImprovement.json +1 -0
  41. package/dist/forms/generalLegal.es.js +274 -216
  42. package/dist/forms/generalLegal.iife.js +1 -1
  43. package/dist/forms/generalLegal.json +1 -1
  44. package/dist/forms/generalLegalJustAnswer.es.js +4534 -0
  45. package/dist/forms/generalLegalJustAnswer.iife.js +1 -0
  46. package/dist/forms/generalLegalJustAnswer.json +1 -0
  47. package/dist/forms/generalLegalPopUnder.es.js +275 -217
  48. package/dist/forms/generalLegalPopUnder.iife.js +1 -1
  49. package/dist/forms/generalLegalPopUnder.json +1 -1
  50. package/dist/forms/generalLegalPopUnderSingle.es.js +645 -573
  51. package/dist/forms/generalLegalPopUnderSingle.iife.js +1 -1
  52. package/dist/forms/generalLegalPopUnderSingle.json +1 -1
  53. package/dist/forms/generalLegalSingle.es.js +645 -573
  54. package/dist/forms/generalLegalSingle.iife.js +1 -1
  55. package/dist/forms/generalLegalSingle.json +1 -1
  56. package/dist/forms/generalLegalThankYou.es.js +137 -130
  57. package/dist/forms/generalLegalThankYou.iife.js +1 -1
  58. package/dist/forms/generalLegalThankYouConsultation.es.js +647 -575
  59. package/dist/forms/generalLegalThankYouConsultation.iife.js +1 -1
  60. package/dist/forms/generalLegalThankYouConsultation.json +1 -1
  61. package/dist/forms/harassmentAndDiscrimination.es.js +271 -214
  62. package/dist/forms/harassmentAndDiscrimination.iife.js +1 -1
  63. package/dist/forms/harassmentAndDiscrimination.json +1 -1
  64. package/dist/forms/landlordTenant.es.js +287 -230
  65. package/dist/forms/landlordTenant.iife.js +1 -1
  66. package/dist/forms/landlordTenant.json +1 -1
  67. package/dist/forms/malpractice.es.js +276 -217
  68. package/dist/forms/malpractice.iife.js +1 -1
  69. package/dist/forms/malpractice.json +1 -1
  70. package/dist/forms/mechanics.es.js +171 -165
  71. package/dist/forms/mechanics.iife.js +1 -1
  72. package/dist/forms/mechanics.json +1 -1
  73. package/dist/forms/patentsAndIP.es.js +617 -548
  74. package/dist/forms/patentsAndIP.iife.js +1 -1
  75. package/dist/forms/patentsAndIP.json +1 -1
  76. package/dist/forms/realEstate.es.js +272 -215
  77. package/dist/forms/realEstate.iife.js +1 -1
  78. package/dist/forms/realEstate.json +1 -1
  79. package/dist/forms/repossession.es.js +275 -217
  80. package/dist/forms/repossession.iife.js +1 -1
  81. package/dist/forms/repossession.json +1 -1
  82. package/dist/forms/ssdi.es.js +139 -138
  83. package/dist/forms/ssdi.iife.js +1 -1
  84. package/dist/forms/ssdi.json +1 -1
  85. package/dist/forms/testForm.es.js +55 -52
  86. package/dist/forms/testForm.iife.js +1 -1
  87. package/dist/forms/testRedirects.es.js +28 -22
  88. package/dist/forms/testRedirects.iife.js +1 -1
  89. package/dist/forms/vets.es.js +16 -7
  90. package/dist/forms/vets.iife.js +1 -1
  91. package/dist/forms/willsAndTrusts.es.js +272 -213
  92. package/dist/forms/willsAndTrusts.iife.js +1 -1
  93. package/dist/forms/willsAndTrusts.json +1 -1
  94. 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
- var TCPA_LANGUAGE = "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.";
10
-
11
- const DEFAULT_COMMENTS_PLACEHOLDER_DYNAMIC = '$getKey($meta, "commentsPlaceholders." + $get(Type_Of_Legal_Problem).value, $meta.defaultCommentsPlaceholder)';
12
- const DEFAULT_COMMENTS_LABEL = 'Please briefly describe your legal issue in a few words:';
13
- const DEFAULT_FINAL_HEADLINE = 'Submit Your Case';
14
- const DEFAULT_FINAL_HEADLINE_DYNAMIC = '$getKey($meta, "finalHeadlines." + $get(Type_Of_Legal_Problem).value, $meta.defaultFinalHeadline)';
15
- const DEFAULT_FINAL_SUBHEADLINE = 'You may benefit from speaking with a legal professional. Please verify your contact information.';
16
- const DEFAULT_FINAL_SUBHEADLINE_DYNAMIC = '$getKey($meta, "finalSubHeadlines." + $get(Type_Of_Legal_Problem).value, $meta.defaultFinalSubHeadline)';
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
 
@@ -203,6 +286,76 @@ const sbsDate = (updates) => {
203
286
  return date(updates)
204
287
  };
205
288
 
289
+ const email = (scope) => sbsText({
290
+ $formkit: 'email',
291
+ name: scope ? scope + ':' + 'Email' : 'Email',
292
+ label: 'Email Address:',
293
+ placeholder: 'email@domain.com',
294
+ autocomplete: 'email',
295
+ 'data-tf-sensitive': 'false',
296
+ validation: 'required|email',
297
+ validationMessages: {
298
+ required: 'Email is required',
299
+ email: 'Invalid Email'
300
+ }
301
+ });
302
+
303
+ const firstName = (scope) => sbsText({
304
+ label: 'First Name:',
305
+ placeholder: 'First',
306
+ name: scope ? scope + ':' + 'First_Name' : 'First_Name',
307
+ autocomplete: "given-name",
308
+ validationMessages: {
309
+ required: 'First Name is required'
310
+ }
311
+ });
312
+
313
+ const lastName = (scope) => sbsText({
314
+ label: 'Last Name:',
315
+ placeholder: 'Last',
316
+ name: scope ? scope + ':' + 'Last_Name' : 'Last_Name',
317
+ autocomplete: "family-name",
318
+ validationMessages: {
319
+ required: 'Last Name is required'
320
+ }
321
+ });
322
+
323
+ const phone = (scope) => sbsText({
324
+ $formkit: 'tel',
325
+ name: scope ? scope + ':' + 'Primary_Phone' : 'Primary_Phone',
326
+ label: 'Phone Number:',
327
+ placeholder: '###-###-####',
328
+ maxlength: 12,
329
+ help: '10-digit phone number, hyphens optional',
330
+ autocomplete: 'tel-national',
331
+ 'data-tf-sensitive': 'false',
332
+ validation: 'required|matches:/^[0-9]{3}-?[0-9]{3}-?[0-9]{4}$/|valid_phone',
333
+ validationMessages: {
334
+ required: 'Field is required',
335
+ matches: 'Invalid Phone Format, use ###-###-####',
336
+ valid_phone: 'Invalid Phone Number'
337
+ },
338
+ helpClass: "t-mt-2.5 md:t-text-right md:t-mt-[-2px]"
339
+ });
340
+
341
+ const zipcodeCenter = (updates = {}, scope) => text({
342
+ placeholder: '#####',
343
+ help: updates.help ?? "We try to match you with local help",
344
+ name: scope ? scope + ':' + 'Zip' : 'Zip',
345
+ maxlength: 5,
346
+ inputmode: "numeric",
347
+ autocomplete: 'postal-code',
348
+ validation: 'required|matches:/^[0-9]{5}$/',
349
+ validationMessages: {
350
+ required: 'Zip Code is required',
351
+ matches: 'Invalid Zip Code'
352
+ },
353
+ wrapperClass: 't-flex t-justify-center',
354
+ messagesClass: 't-flex t-justify-center',
355
+ inputClass: 't-text-center',
356
+ helpClass: 't-mt-2.5 !t-text-sm t-text-center'
357
+ });
358
+
206
359
  const applicantAge = (scope) => sbsText({
207
360
  name: scope ? scope + ':' + 'Applicant_Age' : 'Applicant_Age',
208
361
  label: 'Age of Applicant?',
@@ -352,20 +505,6 @@ const doctorTreatment = (scope) => sbsYesNoRadio({
352
505
  label: 'Have You Recently Been Treated by a Doctor, Hospital or Clinic?',
353
506
  });
354
507
 
355
- const email = (scope) => sbsText({
356
- $formkit: 'email',
357
- name: scope ? scope + ':' + 'Email' : 'Email',
358
- label: 'Email Address:',
359
- placeholder: 'email@domain.com',
360
- autocomplete: 'email',
361
- 'data-tf-sensitive': 'false',
362
- validation: 'required|email',
363
- validationMessages: {
364
- required: 'Email is required',
365
- email: 'Invalid Email'
366
- }
367
- });
368
-
369
508
  const estateLegalServicesNeeded = (scope) => sbsSelect({
370
509
  name: scope ? scope + ':' + 'Estate_Legal_Services_Needed' : 'Estate_Legal_Services_Needed',
371
510
  label: "Legal Services Needed for Your Estate:",
@@ -379,17 +518,6 @@ const estateLegalServicesNeeded = (scope) => sbsSelect({
379
518
  ]
380
519
  });
381
520
 
382
- const firstName = (scope) => sbsText({
383
- $formkit: 'text',
384
- label: 'First Name:',
385
- placeholder: 'First',
386
- name: scope ? scope + ':' + 'First_Name' : 'First_Name',
387
- autocomplete: "given-name",
388
- validationMessages: {
389
- required: 'First Name is required'
390
- }
391
- });
392
-
393
521
  const haveAttorney$1 = (scope) => sbsYesNoRadio({
394
522
  name: scope ? scope + ':' + 'Have_Attorney' : 'Have_Attorney',
395
523
  label: 'Already Working with An Attorney?'
@@ -408,17 +536,6 @@ const incidentDate = (scope) => sbsDate({
408
536
  label: 'Date of Incident:',
409
537
  });
410
538
 
411
- const lastName = (scope) => sbsText({
412
- $formkit: 'text',
413
- label: 'Last Name:',
414
- placeholder: 'Last',
415
- name: scope ? scope + ':' + 'Last_Name' : 'Last_Name',
416
- autocomplete: "family-name",
417
- validationMessages: {
418
- required: 'Last Name is required'
419
- }
420
- });
421
-
422
539
  const lawyerPaymentMethodCenter = (scope) => col2RadioCenter({
423
540
  name: scope ? scope + ':' + 'Lawyer_Payment_Method' : 'Lawyer_Payment_Method',
424
541
  help: 'No payment necessary to start a consultation.',
@@ -437,69 +554,7 @@ const legalCrossSells$1 = () => col2Checkbox({
437
554
  help: 'Just hit "Next" if none apply',
438
555
  helpClass: 't-text-center !t-text-sm',
439
556
  validation: null,
440
- options: {
441
- if: '$getVal($get(form), "Type_Of_Legal_Problem") === "Auto and Car Accidents"',
442
- then: {
443
- 'Social Security Disability and Insurance': 'Interest in Disability Benefits',
444
- 'Wills and Trusts': 'Need a Will or Trust',
445
- 'Workers Compensation': 'Workplace Injury',
446
- 'Power of Attorney': 'Update Power of Attorney',
447
- 'Divorce and Separation': 'Need a Divorce or Separation',
448
- 'Child Custody': 'Need help with Child Custody',
449
- },
450
- else: {
451
- if: '$getVal($get(form), "Type_Of_Legal_Problem") === "Personal Injury" || $getVal($get(form), "Type_Of_Legal_Problem") === "Workers Compensation"',
452
- then: {
453
- 'DUI and DWI': 'Involved in a DUI/DWI',
454
- 'Wills and Trusts': 'Need a Will or Trust',
455
- 'Power of Attorney': 'Update Power of Attorney',
456
- 'Divorce and Separation': 'Need a Divorce or Separation',
457
- 'Child Custody': 'Need help with Child Custody',
458
- // TODO add one more?
459
- },
460
- else: {
461
- if: '$getVal($get(form), "Type_Of_Legal_Problem") === "DUI and DWI"',
462
- then: {
463
- 'Personal Injury': 'Personal or Workplace Injury',
464
- 'Wills and Trusts': 'Need a Will or Trust',
465
- 'Social Security Disability and Insurance': 'Interest in Disability Benefits',
466
- 'Power of Attorney': 'Update Power of Attorney',
467
- 'Divorce and Separation': 'Need a Divorce or Separation',
468
- 'Child Custody': 'Need help with Child Custody',
469
- },
470
- else: {
471
- 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"',
472
- then: {
473
- 'Auto and Car Accidents': 'Injured in a Car Accident',
474
- 'Personal Injury': 'Personal or Workplace Injury',
475
- 'DUI and DWI': 'Involved in a DUI/DWI',
476
- 'Social Security Disability and Insurance': 'Interest in Disability Benefits',
477
- 'Divorce and Separation': 'Need a Divorce or Separation',
478
- 'Child Custody': 'Need help with Child Custody',
479
- },
480
- else: {
481
- if: '$getVal($get(form), "Type_Of_Legal_Problem") === "Long Term Disability" || $getVal($get(form), "Type_Of_Legal_Problem") === "Social Security Disability and Insurance"',
482
- then: {
483
- 'Auto and Car Accidents': 'Injured in a Car Accident',
484
- 'DUI and DWI': 'Involved in a DUI/DWI',
485
- 'Wills and Trusts': 'Need a Will or Trust',
486
- 'Power of Attorney': 'Update Power of Attorney',
487
- 'Divorce and Separation': 'Need a Divorce or Separation',
488
- 'Child Custody': 'Need help with Child Custody',
489
- },
490
- else: {
491
- 'Auto and Car Accidents': 'Injured in a Car Accident',
492
- 'Personal Injury': 'Personal or Workplace Injury',
493
- 'DUI and DWI': 'Involved in a DUI/DWI',
494
- 'Wills and Trusts': 'Need a Will or Trust',
495
- 'Power of Attorney': 'Update Power of Attorney',
496
- 'Social Security Disability and Insurance': 'Interest in Disability Benefits',
497
- }
498
- }
499
- }
500
- }
501
- }
502
- }
557
+ options: '$getCrossSellOptions($get(form), $getVal($get(form), "Type_Of_Legal_Problem"))',
503
558
  });
504
559
 
505
560
  const maritalStatusCenter = (scope) => col2RadioCenter({
@@ -519,24 +574,6 @@ const pendingCharges = (scope) => sbsYesNoRadio({
519
574
  label: 'Do you currently have any pending charges?'
520
575
  });
521
576
 
522
- const phone = (scope) => sbsText({
523
- $formkit: 'tel',
524
- name: scope ? scope + ':' + 'Primary_Phone' : 'Primary_Phone',
525
- label: 'Phone Number:',
526
- placeholder: '###-###-####',
527
- maxlength: 12,
528
- help: '10-digit phone number, hyphens optional',
529
- autocomplete: 'tel-national',
530
- 'data-tf-sensitive': 'false',
531
- validation: 'required|matches:/^[0-9]{3}-?[0-9]{3}-?[0-9]{4}$/|valid_phone',
532
- validationMessages: {
533
- required: 'Field is required',
534
- matches: 'Invalid Phone Format, use ###-###-####',
535
- valid_phone: 'Invalid Phone Number'
536
- },
537
- helpClass: "t-mt-2.5 md:t-text-right md:t-mt-[-2px]"
538
- });
539
-
540
577
  const primaryInjury = (scope) => sbs2ColRadio({
541
578
  name: scope ? scope + ':' + 'Primary_Injury' : 'Primary_Injury',
542
579
  label: 'Primary Injury:',
@@ -633,25 +670,6 @@ const valueOfAssets = (scope) => sbsSelect({
633
670
  ]
634
671
  });
635
672
 
636
- const zipcodeCenter = (updates = {}, scope) => text({
637
- placeholder: '#####',
638
- help: updates.help ?? "We try to match you with local legal help",
639
- name: scope ? scope + ':' + 'Zip' : 'Zip',
640
- maxlength: 5,
641
- inputmode: "numeric",
642
- autocomplete: 'postal-code',
643
- validation: 'required|matches:/^[0-9]{5}$/',
644
- validationMessages: {
645
- required: 'Zip Code is required',
646
- matches: 'Invalid Zip Code'
647
- },
648
- wrapperClass: 't-flex t-justify-center',
649
- messagesClass: 't-flex t-justify-center',
650
- inputClass: 't-text-center',
651
- helpClass: 't-mt-2.5 !t-text-sm t-text-center'
652
- });
653
-
654
-
655
673
  // ------ Question Groups
656
674
 
657
675
  // NOTE: name must be unique within a form!
@@ -859,13 +877,20 @@ function verticalStepSubHeadline(updates) {
859
877
  function commentsStepHeadline(updates) {
860
878
  return {
861
879
  $el: 'h3',
862
- children: updates.headline || 'Additional Case Details',
880
+ children: updates.headline || 'Additional Details',
863
881
  attrs: {
864
882
  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 || '')
865
883
  }
866
884
  }
867
885
  }
868
886
 
887
+ function commentsStepHeadlineLegal(updates) {
888
+ return commentsStepHeadline({
889
+ headline: updates.headline || 'Additional Case Details',
890
+ headlineClass: updates.headlineClass
891
+ })
892
+ }
893
+
869
894
  function firstAndLastStepHeadline(updates) {
870
895
  return {
871
896
  $el: 'h3',
@@ -889,7 +914,7 @@ function legalCrossSellsStepHeadline(updates) {
889
914
  function contactStepHeadline(updates) {
890
915
  return {
891
916
  $el: 'h3',
892
- children: updates.headline || DEFAULT_FINAL_HEADLINE_DYNAMIC,
917
+ children: updates.headline || DEFAULT_FINAL_HEADLINE_DYNAMIC_LEGAL,
893
918
  attrs: {
894
919
  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 || '')
895
920
  }
@@ -899,7 +924,7 @@ function contactStepHeadline(updates) {
899
924
  function contactStepSubHeadline(updates) {
900
925
  return {
901
926
  $el: 'h5',
902
- children: updates.subheadline || DEFAULT_FINAL_SUBHEADLINE_DYNAMIC,
927
+ children: updates.subheadline || DEFAULT_FINAL_SUBHEADLINE_DYNAMIC_LEGAL,
903
928
  attrs: {
904
929
  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 || '')
905
930
  }
@@ -939,10 +964,16 @@ const stepDefaults = (step, stepKey) => ({
939
964
  }
940
965
  });
941
966
 
942
- function step(name, inputs, nextOnEnter = true, nextOnInput = false, stepKey = undefined, nextStepMap = undefined, autoFocus = undefined) {
943
- if (typeof nextOnEnter === 'undefined') {
944
- nextOnEnter = true;
945
- }
967
+ function step(name, inputs, updates = {}) {
968
+ const {
969
+ nextOnEnter = true,
970
+ nextOnInput = false,
971
+ stepKey = undefined,
972
+ nextStepMap = undefined,
973
+ triggerRedirectMap = undefined,
974
+ autoFocus = undefined,
975
+ } = updates;
976
+
946
977
  if (inputs && inputs.length && (nextOnEnter || nextOnInput)) {
947
978
  const lastInput = findLastInput(inputs[inputs.length - 1]);
948
979
  if (lastInput && nextOnEnter === true) {
@@ -962,6 +993,7 @@ function step(name, inputs, nextOnEnter = true, nextOnInput = false, stepKey = u
962
993
  id: name,
963
994
  name: name,
964
995
  nextStepMap: nextStepMap,
996
+ triggerRedirectMap: triggerRedirectMap,
965
997
  autoFocus: autoFocus,
966
998
  children: inputs
967
999
  }
@@ -972,44 +1004,17 @@ function step(name, inputs, nextOnEnter = true, nextOnInput = false, stepKey = u
972
1004
 
973
1005
  // Single question step
974
1006
  function sqstep(name, input, defaultHeadline, updates = {}) {
1007
+ if (typeof updates.nextOnInput === 'undefined') {
1008
+ updates.nextOnInput = true;
1009
+ }
1010
+
975
1011
  return step(
976
1012
  name,
977
1013
  [
978
1014
  verticalStepHeadline({ headline: updates.headline ?? defaultHeadline, headlineClass: updates.headlineClass }),
979
1015
  ...Array.isArray(input) ? input : [input],
980
1016
  ],
981
- updates.nextOnEnter,
982
- typeof updates.nextOnInput === 'undefined' ? true : updates.nextOnInput,
983
- updates.stepKey,
984
- updates.nextStepMap
985
- )
986
- }
987
-
988
- function commentsWithBankruptcy(updates = {}) {
989
- return step(
990
- 'commentsWithBankruptcy',
991
- [
992
- commentsStepHeadline(updates),
993
- comments({
994
- label: typeof updates.label === 'undefined' ? DEFAULT_COMMENTS_LABEL : updates.label,
995
- placeholder: updates.placeholder || DEFAULT_COMMENTS_PLACEHOLDER_DYNAMIC,
996
- inputClass: typeof updates.inputClass === 'undefined' ? '!t-h-32' : updates.inputClass,
997
- }, updates.scope),
998
- // TODO: needs scope support
999
- bankruptcyCrossSell(),
1000
- {
1001
- $el: 'div',
1002
- if: '$get(CrossSell_Bankruptcy).value == true',
1003
- children: [
1004
- comments({
1005
- label: 'Bankruptcy or debt details:',
1006
- placeholder: 'Please describe your bankrtupcy or debt situation in a few words...',
1007
- inputClass: '!t-h-16'
1008
- }, 'CrossSell:Bankruptcy')
1009
- ],
1010
- }
1011
- ],
1012
- false // nextOnEnter
1017
+ updates
1013
1018
  )
1014
1019
  }
1015
1020
 
@@ -1025,7 +1030,7 @@ function contactInfo(updates = {}) {
1025
1030
  TCPAConsent(updates.scope),
1026
1031
  secureIcon()
1027
1032
  ],
1028
- false, // nextOnEnter
1033
+ { nextOnEnter: false }
1029
1034
  )
1030
1035
  }
1031
1036
 
@@ -1044,10 +1049,46 @@ function firstAndLastV3(updates = {}, scope) {
1044
1049
  firstName(scope),
1045
1050
  lastName(scope)
1046
1051
  ],
1047
- updates.nextOnEnter
1052
+ updates
1053
+ )
1054
+ }
1055
+
1056
+ function zipcode(updates = {}) {
1057
+ return sqstep(
1058
+ 'zipcode',
1059
+ zipcodeCenter(updates, updates.scope),
1060
+ 'Please verify your Zip Code',
1061
+ updates
1048
1062
  )
1049
1063
  }
1050
1064
 
1065
+ function commentsWithBankruptcy(updates = {}) {
1066
+ return step(
1067
+ 'commentsWithBankruptcy',
1068
+ [
1069
+ commentsStepHeadlineLegal(updates),
1070
+ comments({
1071
+ label: typeof updates.label === 'undefined' ? DEFAULT_COMMENTS_LABEL_LEGAL : updates.label,
1072
+ placeholder: updates.placeholder || DEFAULT_COMMENTS_PLACEHOLDER_DYNAMIC_LEGAL,
1073
+ inputClass: typeof updates.inputClass === 'undefined' ? '!t-h-32' : updates.inputClass,
1074
+ }, updates.scope),
1075
+ // TODO: needs scope support
1076
+ bankruptcyCrossSell(),
1077
+ {
1078
+ $el: 'div',
1079
+ if: '$get(CrossSell_Bankruptcy).value == true',
1080
+ children: [
1081
+ comments({
1082
+ label: 'Bankruptcy or debt details:',
1083
+ placeholder: 'Please describe your bankrtupcy or debt situation in a few words...',
1084
+ inputClass: '!t-h-16'
1085
+ }, 'CrossSell:Bankruptcy')
1086
+ ],
1087
+ }
1088
+ ],
1089
+ { nextOnEnter: false }
1090
+ )
1091
+ }
1051
1092
 
1052
1093
  function autoAndCarAccidentCrossSellQuestions(updates = {}) {
1053
1094
  return step(
@@ -1065,7 +1106,7 @@ function autoAndCarAccidentCrossSellQuestions(updates = {}) {
1065
1106
  'CrossSell:Auto_and_Car_Accidents'
1066
1107
  )
1067
1108
  ],
1068
- updates.nextOnEnter
1109
+ updates
1069
1110
  )
1070
1111
  }
1071
1112
 
@@ -1084,7 +1125,7 @@ function duiAndDWICrossSellQuestions(updates = {}) {
1084
1125
  'CrossSell:DUI_and_DWI'
1085
1126
  )
1086
1127
  ],
1087
- updates.nextOnEnter
1128
+ updates
1088
1129
  )
1089
1130
  }
1090
1131
 
@@ -1104,7 +1145,7 @@ function ssdiCrossSellQuestions(updates = {}) {
1104
1145
  'CrossSell:Social_Security_Disability_and_Insurance'
1105
1146
  )
1106
1147
  ],
1107
- updates.nextOnEnter
1148
+ updates
1108
1149
  )
1109
1150
  }
1110
1151
 
@@ -1124,7 +1165,7 @@ function personalInjuryCrossSellQuestions(updates = {}) {
1124
1165
  'CrossSell:Personal_Injury'
1125
1166
  )
1126
1167
  ],
1127
- updates.nextOnEnter
1168
+ updates
1128
1169
  )
1129
1170
  }
1130
1171
 
@@ -1143,7 +1184,7 @@ function powerOfAttorneyCrossSellQuestions(updates = {}) {
1143
1184
  'CrossSell:Power_of_Attorney'
1144
1185
  )
1145
1186
  ],
1146
- updates.nextOnEnter
1187
+ updates
1147
1188
  )
1148
1189
  }
1149
1190
 
@@ -1162,21 +1203,20 @@ function willsAndTrustsCrossSellQuestions(updates = {}) {
1162
1203
  'CrossSell:Wills_and_Trusts'
1163
1204
  )
1164
1205
  ],
1165
- updates.nextOnEnter
1206
+ updates
1166
1207
  )
1167
1208
  }
1168
1209
 
1169
1210
  function legalCrossSells(updates = {}) {
1211
+ updates.nextOnInput = false;
1212
+ updates.stepKey = '$get(Type_Of_Legal_Problem).value';
1170
1213
  return step(
1171
1214
  'legalCrossSells',
1172
1215
  [
1173
1216
  legalCrossSellsStepHeadline(updates),
1174
1217
  legalCrossSells$1(),
1175
1218
  ],
1176
- updates.nextOnEnter,
1177
- false,
1178
- // Note: we should probably scope this stepKey to this step name
1179
- '$get(Type_Of_Legal_Problem).value'
1219
+ updates
1180
1220
  )
1181
1221
  }
1182
1222
 
@@ -1186,18 +1226,6 @@ function childAndFamilyTOLP(updates = {}) {
1186
1226
  [
1187
1227
  childAndFamilyTOLPCenter()
1188
1228
  ],
1189
- updates.nextOnEnter,
1190
- updates.nextOnInput,
1191
- updates.stepKey,
1192
- updates.nextStepMap
1193
- )
1194
- }
1195
-
1196
- function zipcode(updates = {}) {
1197
- return sqstep(
1198
- 'zipcode',
1199
- zipcodeCenter(updates, updates.scope),
1200
- 'Please verify your Zip Code',
1201
1229
  updates
1202
1230
  )
1203
1231
  }
@@ -1413,9 +1441,7 @@ function formProps(updates) {
1413
1441
  return props
1414
1442
  }
1415
1443
 
1416
- const metaDefaults = {
1417
- tcpaLanguage: TCPA_LANGUAGE
1418
- };
1444
+ const metaDefaults = {};
1419
1445
 
1420
1446
  function metaProps(updates) {
1421
1447
  const data = merge(
@@ -1428,7 +1454,7 @@ function metaProps(updates) {
1428
1454
  }
1429
1455
  }
1430
1456
 
1431
- function defaultMetaProps(tolps = null) {
1457
+ function defaultMetaPropsLegal(tolps = null) {
1432
1458
  let commentsPlaceholders = TOLPCommentsPlaceholders;
1433
1459
  let finalHeadlines = TOLPFinalHeadlines;
1434
1460
  let finalSubHeadlines = TOLPFinalSubHeadlines;
@@ -1438,12 +1464,13 @@ function defaultMetaProps(tolps = null) {
1438
1464
  finalSubHeadlines = filterMapByKey(TOLPFinalSubHeadlines, tolps);
1439
1465
  }
1440
1466
  return metaProps({
1441
- defaultCommentsPlaceholder: DEFAULT_COMMENTS_PLACEHOLDER_DYNAMIC,
1467
+ tcpaLanguage: TCPA_LANGUAGE_LEGAL,
1468
+ defaultCommentsPlaceholder: DEFAULT_COMMENTS_PLACEHOLDER_DYNAMIC_LEGAL,
1442
1469
  commentsPlaceholders: commentsPlaceholders,
1443
- defaultFinalHeadline: DEFAULT_FINAL_HEADLINE,
1470
+ defaultFinalHeadline: DEFAULT_FINAL_HEADLINE_LEGAL,
1444
1471
  finalHeadlines: finalHeadlines,
1445
- defaultFinalSubHeadline: DEFAULT_FINAL_SUBHEADLINE,
1446
- finalSubHeadlines: finalSubHeadlines,
1472
+ defaultFinalSubHeadline: DEFAULT_FINAL_SUBHEADLINE_LEGAL,
1473
+ finalSubHeadlines: finalSubHeadlines
1447
1474
  })
1448
1475
  }
1449
1476
 
@@ -1770,355 +1797,395 @@ const nextStepsLegalNoHA = [
1770
1797
  ];
1771
1798
 
1772
1799
  const nextStepsMapGeneralLegal = {
1773
- 'Type_Of_Legal_Problem': {
1774
- 'Adoption': [
1775
- 'maritalStatus',
1776
- 'haveChildren',
1777
- ...nextStepsLegalDefaultLPM
1778
- ],
1779
- 'Asbestos and Mesothelioma': [
1780
- 'incidentDate',
1781
- 'doctorTreatment',
1782
- ...nextStepsLegalDefault
1783
- ],
1784
- 'Auto and Car Accidents': [
1785
- 'incidentDate',
1786
- 'atFault',
1787
- 'primaryInjury',
1788
- 'doctorTreatment',
1789
- 'policeReportFiled',
1790
- ...nextStepsLegalNoDOI
1791
- ],
1792
- 'Bankruptcy': [
1793
- 'totalMonthlyIncome',
1794
- 'totalDebt',
1795
- 'ownRealEstate',
1796
- 'valueOfAssets',
1797
- ...nextStepsLegalDefault
1798
- ],
1799
- 'Business Lawyers': [
1800
- 'businessServices',
1801
- 'businessType',
1802
- 'numEmployeesOfBusiness',
1803
- ...nextStepsLegalDefault
1804
- ],
1805
- 'Child Custody': [
1806
- 'childRelationship',
1807
- 'childHome',
1808
- 'childPrimaryCaregiver',
1809
- ...nextStepsLegalDefaultLPM
1810
- ],
1811
- 'Child Support': [
1812
- 'childRelationship',
1813
- 'childHome',
1814
- 'childPrimaryCaregiver',
1815
- ...nextStepsLegalDefaultLPM
1816
- ],
1817
- 'Civil Rights and Discrimination': [
1818
- 'civilRightsType',
1819
- ...nextStepsLegalDefault
1820
- ],
1821
- 'Civil Lawsuit': [
1822
- 'civilDefense',
1823
- 'lawsuitOtherParty',
1824
- ...nextStepsLegalDefault
1825
- ],
1826
- 'File a Lawsuit': [
1827
- 'civilLawsuitTOLPDisplay',
1828
- 'lawsuitOtherParty',
1829
- ...nextStepsLegalDefault
1830
- ],
1831
- 'Defend a Lawsuit': [
1832
- 'lawsuitOtherParty',
1833
- ...nextStepsLegalDefault
1834
- ],
1835
- 'Consumer Lawyers': [
1836
- 'consumerLawyerType',
1837
- 'incidentDate',
1838
- 'lawsuitOtherParty',
1839
- ...nextStepsLegalDefault
1840
- ],
1841
- 'Criminal and Felony': [
1842
- 'criminalTOLPDisplay',
1843
- 'crimeCommittedDate',
1844
- 'roleInMatterCriminal',
1845
- 'pendingCharges',
1846
- ...nextStepsLegalDefaultLPM
1847
- ],
1848
- 'Debt and Collections': [
1849
- 'totalMonthlyIncome',
1850
- 'totalDebt',
1851
- 'ownRealEstate',
1852
- 'valueOfAssets',
1853
- ...nextStepsLegalDefault
1854
- ],
1855
- 'Divorce and Separation': [
1856
- 'maritalStatus',
1857
- 'haveChildren',
1858
- ...nextStepsLegalDefaultLPM
1859
- ],
1860
- 'DUI and DWI': [
1861
- 'incidentDate',
1862
- 'priorAlcoholOffenses',
1863
- 'typeOfAlcoholTest',
1864
- 'bloodContentAlcoholTest',
1865
- 'pendingCharges',
1866
- ...nextStepsLegalDefault
1867
- ],
1868
- 'Employment and Workplace': [
1869
- 'employmentAndWorkplaceTOLPDisplay',
1870
- 'numEmployeesOfBusiness',
1871
- 'employerType',
1872
- 'employeeAtCompany',
1873
- ...nextStepsLegalDefault
1874
- ],
1875
- 'Expungement': [
1876
- 'incidentDate',
1877
- 'criminalChargeType',
1878
- ...nextStepsLegalDefaultLPM
1879
- ],
1880
- 'Family Issues': [
1881
- 'maritalStatus',
1882
- 'haveChildren',
1883
- ...nextStepsLegalDefaultLPM
1884
- ],
1885
- 'Foreclosure': [
1886
- 'ownRealEstate',
1887
- 'typeOfProperty',
1888
- 'amountPaymentsPastDue',
1889
- 'loanAmount',
1890
- 'defaultNotice',
1891
- ...nextStepsLegalDefault
1892
- ],
1893
- 'Guardianship': [
1894
- 'maritalStatus',
1895
- 'haveChildren',
1896
- ...nextStepsLegalDefaultLPM
1897
- ],
1898
- 'Immigration and Visas': [
1899
- 'countryOfCitizenship',
1900
- 'immigrationLocation',
1901
- 'immigrationEntry',
1902
- 'immigrationType',
1903
- 'immigrationStatus',
1904
- 'immigrationDetails',
1905
- ...nextStepsLegalDefault
1906
- ],
1907
- 'Landlord and Tenant': [
1908
- 'landlordTenantIssue',
1909
- 'landlordTenantParty',
1910
- ...nextStepsLegalDefault
1911
- ],
1912
- 'Lemon Law': [
1913
- 'incidentDate',
1914
- 'lawsuitOtherParty',
1915
- ...nextStepsLegalDefault
1916
- ],
1917
- 'Long Term Disability': [
1918
- 'applicantOccupation',
1919
- 'applicantAge',
1920
- 'applicantLTDisabilityPolicy',
1921
- 'applicantDisabilityHowObtain',
1922
- 'applicantPreviouslyAppliedLtdBenefits',
1923
- 'applicantReceivedDisabilityBenefits',
1924
- 'applicantMonthlySalary',
1925
- ...nextStepsLegalNoDOI
1926
- ],
1927
- 'Medical Malpractice': [
1928
- 'incidentDate',
1929
- 'claimStatus',
1930
- 'doctorTreatment',
1931
- 'medicalMalpracticeInjuries',
1932
- ...nextStepsLegalDefault
1933
- ],
1934
- 'Patents and Intellectual Property': [
1935
- 'patentAssistanceType',
1936
- 'patentFor',
1937
- ...nextStepsLegalDefault
1938
- ],
1939
- 'Personal Injury': [
1940
- 'incidentDate',
1941
- 'claimStatus',
1942
- 'atFault',
1943
- 'primaryInjury',
1944
- 'doctorTreatment',
1945
- ...nextStepsLegalNoDOI
1946
- ],
1947
- 'Probate and Estates': [
1948
- 'valueOfAssets',
1949
- 'typeOfAssets',
1950
- 'roleInMatterProbate',
1951
- 'estateLegalServicesNeeded',
1952
- ...nextStepsLegalDefault
1953
- ],
1954
- 'Property Damage': [
1955
- 'realEstateArea',
1956
- 'wouldLikeLawyerTo',
1957
- ...nextStepsLegalDefault
1958
- ],
1959
- 'Real Estate': [
1960
- 'realEstateTOLPDisplay',
1961
- 'realEstateArea',
1962
- 'wouldLikeLawyerTo',
1963
- ...nextStepsLegalDefault
1964
- ],
1965
- 'Social Security Disability and Insurance': [
1966
- 'applicantAge',
1967
- 'disabilityConditionStopWork',
1968
- 'disabilityWorkHistory',
1969
- 'socialSecurityDisabilityReceivingBenefits',
1970
- 'doctorTreatment',
1971
- ...nextStepsLegalNoDOI
1972
- ],
1973
- 'Tax and IRS': [
1974
- 'totalDebt',
1975
- 'taxProblemDetails',
1976
- 'taxLevel',
1977
- 'taxIssueType',
1978
- ...nextStepsLegalDefault
1979
- ],
1980
- 'Traffic and Tickets': [
1981
- 'driversLicenseType',
1982
- 'trafficViolations',
1983
- 'haveCourtDate',
1984
- ...nextStepsLegalDefault
1985
- ],
1986
- 'Unemployment': [
1987
- 'numEmployeesOfBusiness',
1988
- 'employerType',
1989
- ...nextStepsLegalNoHA
1990
- ],
1991
- 'Victim of a Crime': [
1992
- 'crimeCommittedDate',
1993
- 'roleInMatterCriminal',
1994
- 'pendingCharges',
1995
- ...nextStepsLegalDefaultLPM
1996
- ],
1997
- 'Wills and Trusts': [
1998
- 'valueOfAssets',
1999
- 'typeOfAssets',
2000
- 'roleInMatterProbate',
2001
- 'estateLegalServicesNeeded',
2002
- ...nextStepsLegalDefault
2003
- ],
2004
- 'Workers Compensation': [
2005
- 'incidentDate',
2006
- 'claimStatus',
2007
- 'primaryInjury',
2008
- 'causeOfInjury',
2009
- 'doctorTreatment',
2010
- ...nextStepsLegalNoDOI
2011
- ],
2012
- 'Workplace Harassment': [
2013
- 'numEmployeesOfBusiness',
2014
- 'employerType',
2015
- 'employeeAtCompany',
2016
- ...nextStepsLegalDefault
2017
- ],
2018
- 'Workplace Discrimination': [
2019
- 'numEmployeesOfBusiness',
2020
- 'employerType',
2021
- 'employeeAtCompany',
2022
- ...nextStepsLegalDefault
2023
- ],
2024
- 'Wrongful Death': [
2025
- 'incidentDate',
2026
- 'relationshipToVictim',
2027
- 'criminalChargesFiled',
2028
- 'causeOfDeath',
2029
- ...nextStepsLegalNoDOI
2030
- ],
2031
- 'Wrongful Termination': [
2032
- 'numEmployeesOfBusiness',
2033
- 'employerType',
2034
- ...nextStepsLegalDefault
2035
- ],
2036
- },
2037
- '*': nextStepsLegalDefault
1800
+ values: {
1801
+ 'Type_Of_Legal_Problem': {
1802
+ 'Adoption': [
1803
+ 'maritalStatus',
1804
+ 'haveChildren',
1805
+ ...nextStepsLegalDefaultLPM
1806
+ ],
1807
+ 'Asbestos and Mesothelioma': [
1808
+ 'incidentDate',
1809
+ 'doctorTreatment',
1810
+ ...nextStepsLegalDefault
1811
+ ],
1812
+ 'Auto and Car Accidents': [
1813
+ 'incidentDate',
1814
+ 'atFault',
1815
+ 'primaryInjury',
1816
+ 'doctorTreatment',
1817
+ 'policeReportFiled',
1818
+ ...nextStepsLegalNoDOI
1819
+ ],
1820
+ 'Bankruptcy': [
1821
+ 'totalMonthlyIncome',
1822
+ 'totalDebt',
1823
+ 'ownRealEstate',
1824
+ 'valueOfAssets',
1825
+ ...nextStepsLegalDefault
1826
+ ],
1827
+ 'Business Lawyers': [
1828
+ 'businessServices',
1829
+ 'businessType',
1830
+ 'numEmployeesOfBusiness',
1831
+ ...nextStepsLegalDefault
1832
+ ],
1833
+ 'Child Custody': [
1834
+ 'childRelationship',
1835
+ 'childHome',
1836
+ 'childPrimaryCaregiver',
1837
+ ...nextStepsLegalDefaultLPM
1838
+ ],
1839
+ 'Child Support': [
1840
+ 'childRelationship',
1841
+ 'childHome',
1842
+ 'childPrimaryCaregiver',
1843
+ ...nextStepsLegalDefaultLPM
1844
+ ],
1845
+ 'Civil Rights and Discrimination': [
1846
+ 'civilRightsType',
1847
+ ...nextStepsLegalDefault
1848
+ ],
1849
+ 'Civil Lawsuit': [
1850
+ 'civilDefense',
1851
+ 'lawsuitOtherParty',
1852
+ ...nextStepsLegalDefault
1853
+ ],
1854
+ 'File a Lawsuit': [
1855
+ 'civilLawsuitTOLPDisplay',
1856
+ 'lawsuitOtherParty',
1857
+ ...nextStepsLegalDefault
1858
+ ],
1859
+ 'Defend a Lawsuit': [
1860
+ 'lawsuitOtherParty',
1861
+ ...nextStepsLegalDefault
1862
+ ],
1863
+ 'Consumer Lawyers': [
1864
+ 'consumerLawyerType',
1865
+ 'incidentDate',
1866
+ 'lawsuitOtherParty',
1867
+ ...nextStepsLegalDefault
1868
+ ],
1869
+ 'Criminal and Felony': [
1870
+ 'criminalTOLPDisplay',
1871
+ 'crimeCommittedDate',
1872
+ 'roleInMatterCriminal',
1873
+ 'pendingCharges',
1874
+ ...nextStepsLegalDefaultLPM
1875
+ ],
1876
+ 'Debt and Collections': [
1877
+ 'totalMonthlyIncome',
1878
+ 'totalDebt',
1879
+ 'ownRealEstate',
1880
+ 'valueOfAssets',
1881
+ ...nextStepsLegalDefault
1882
+ ],
1883
+ 'Divorce and Separation': [
1884
+ 'maritalStatus',
1885
+ 'haveChildren',
1886
+ ...nextStepsLegalDefaultLPM
1887
+ ],
1888
+ 'DUI and DWI': [
1889
+ 'incidentDate',
1890
+ 'priorAlcoholOffenses',
1891
+ 'typeOfAlcoholTest',
1892
+ 'bloodContentAlcoholTest',
1893
+ 'pendingCharges',
1894
+ ...nextStepsLegalDefault
1895
+ ],
1896
+ 'Employment and Workplace': [
1897
+ 'employmentAndWorkplaceTOLPDisplay',
1898
+ 'numEmployeesOfBusiness',
1899
+ 'employerType',
1900
+ 'employeeAtCompany',
1901
+ ...nextStepsLegalDefault
1902
+ ],
1903
+ 'Expungement': [
1904
+ 'incidentDate',
1905
+ 'criminalChargeType',
1906
+ ...nextStepsLegalDefaultLPM
1907
+ ],
1908
+ 'Family Issues': [
1909
+ 'maritalStatus',
1910
+ 'haveChildren',
1911
+ ...nextStepsLegalDefaultLPM
1912
+ ],
1913
+ 'Foreclosure': [
1914
+ 'ownRealEstate',
1915
+ 'typeOfProperty',
1916
+ 'amountPaymentsPastDue',
1917
+ 'loanAmount',
1918
+ 'defaultNotice',
1919
+ ...nextStepsLegalDefault
1920
+ ],
1921
+ 'Guardianship': [
1922
+ 'maritalStatus',
1923
+ 'haveChildren',
1924
+ ...nextStepsLegalDefaultLPM
1925
+ ],
1926
+ 'Immigration and Visas': [
1927
+ 'countryOfCitizenship',
1928
+ 'immigrationLocation',
1929
+ 'immigrationEntry',
1930
+ 'immigrationType',
1931
+ 'immigrationStatus',
1932
+ 'immigrationDetails',
1933
+ ...nextStepsLegalDefault
1934
+ ],
1935
+ 'Landlord and Tenant': [
1936
+ 'landlordTenantIssue',
1937
+ 'landlordTenantParty',
1938
+ ...nextStepsLegalDefault
1939
+ ],
1940
+ 'Lemon Law': [
1941
+ 'incidentDate',
1942
+ 'lawsuitOtherParty',
1943
+ ...nextStepsLegalDefault
1944
+ ],
1945
+ 'Long Term Disability': [
1946
+ 'applicantOccupation',
1947
+ 'applicantAge',
1948
+ 'applicantLTDisabilityPolicy',
1949
+ 'applicantDisabilityHowObtain',
1950
+ 'applicantPreviouslyAppliedLtdBenefits',
1951
+ 'applicantReceivedDisabilityBenefits',
1952
+ 'applicantMonthlySalary',
1953
+ ...nextStepsLegalNoDOI
1954
+ ],
1955
+ 'Medical Malpractice': [
1956
+ 'incidentDate',
1957
+ 'claimStatus',
1958
+ 'doctorTreatment',
1959
+ 'medicalMalpracticeInjuries',
1960
+ ...nextStepsLegalDefault
1961
+ ],
1962
+ 'Patents and Intellectual Property': [
1963
+ 'patentAssistanceType',
1964
+ 'patentFor',
1965
+ ...nextStepsLegalDefault
1966
+ ],
1967
+ 'Personal Injury': [
1968
+ 'incidentDate',
1969
+ 'claimStatus',
1970
+ 'atFault',
1971
+ 'primaryInjury',
1972
+ 'doctorTreatment',
1973
+ ...nextStepsLegalNoDOI
1974
+ ],
1975
+ 'Probate and Estates': [
1976
+ 'valueOfAssets',
1977
+ 'typeOfAssets',
1978
+ 'roleInMatterProbate',
1979
+ 'estateLegalServicesNeeded',
1980
+ ...nextStepsLegalDefault
1981
+ ],
1982
+ 'Property Damage': [
1983
+ 'realEstateArea',
1984
+ 'wouldLikeLawyerTo',
1985
+ ...nextStepsLegalDefault
1986
+ ],
1987
+ 'Real Estate': [
1988
+ 'realEstateTOLPDisplay',
1989
+ 'realEstateArea',
1990
+ 'wouldLikeLawyerTo',
1991
+ ...nextStepsLegalDefault
1992
+ ],
1993
+ 'Social Security Disability and Insurance': [
1994
+ 'applicantAge',
1995
+ 'disabilityConditionStopWork',
1996
+ 'disabilityWorkHistory',
1997
+ 'socialSecurityDisabilityReceivingBenefits',
1998
+ 'doctorTreatment',
1999
+ ...nextStepsLegalNoDOI
2000
+ ],
2001
+ 'Tax and IRS': [
2002
+ 'totalDebt',
2003
+ 'taxProblemDetails',
2004
+ 'taxLevel',
2005
+ 'taxIssueType',
2006
+ ...nextStepsLegalDefault
2007
+ ],
2008
+ 'Traffic and Tickets': [
2009
+ 'driversLicenseType',
2010
+ 'trafficViolations',
2011
+ 'haveCourtDate',
2012
+ ...nextStepsLegalDefault
2013
+ ],
2014
+ 'Unemployment': [
2015
+ 'numEmployeesOfBusiness',
2016
+ 'employerType',
2017
+ ...nextStepsLegalNoHA
2018
+ ],
2019
+ 'Victim of a Crime': [
2020
+ 'crimeCommittedDate',
2021
+ 'roleInMatterCriminal',
2022
+ 'pendingCharges',
2023
+ ...nextStepsLegalDefaultLPM
2024
+ ],
2025
+ 'Wills and Trusts': [
2026
+ 'valueOfAssets',
2027
+ 'typeOfAssets',
2028
+ 'roleInMatterProbate',
2029
+ 'estateLegalServicesNeeded',
2030
+ ...nextStepsLegalDefault
2031
+ ],
2032
+ 'Workers Compensation': [
2033
+ 'incidentDate',
2034
+ 'claimStatus',
2035
+ 'primaryInjury',
2036
+ 'causeOfInjury',
2037
+ 'doctorTreatment',
2038
+ ...nextStepsLegalNoDOI
2039
+ ],
2040
+ 'Workplace Harassment': [
2041
+ 'numEmployeesOfBusiness',
2042
+ 'employerType',
2043
+ 'employeeAtCompany',
2044
+ ...nextStepsLegalDefault
2045
+ ],
2046
+ 'Workplace Discrimination': [
2047
+ 'numEmployeesOfBusiness',
2048
+ 'employerType',
2049
+ 'employeeAtCompany',
2050
+ ...nextStepsLegalDefault
2051
+ ],
2052
+ 'Wrongful Death': [
2053
+ 'incidentDate',
2054
+ 'relationshipToVictim',
2055
+ 'criminalChargesFiled',
2056
+ 'causeOfDeath',
2057
+ ...nextStepsLegalNoDOI
2058
+ ],
2059
+ 'Wrongful Termination': [
2060
+ 'numEmployeesOfBusiness',
2061
+ 'employerType',
2062
+ ...nextStepsLegalDefault
2063
+ ],
2064
+ },
2065
+ '*': nextStepsLegalDefault
2066
+ }
2038
2067
  };
2039
2068
 
2040
- const TOLPNextSteps = nextStepsMapGeneralLegal["Type_Of_Legal_Problem"];
2069
+ const TOLPNextSteps = nextStepsMapGeneralLegal["values"]["Type_Of_Legal_Problem"];
2041
2070
 
2042
2071
  const nextStepsMapChildAndFamily = {
2043
- 'Type_Of_Legal_Problem': {
2044
- 'Child Custody': TOLPNextSteps["Child Custody"],
2045
- 'Child Support': TOLPNextSteps["Child Support"],
2046
- 'Not Sure or Other': nextStepsMapGeneralLegal["*"],
2047
- },
2048
- '*': TOLPNextSteps["Family Issues"]
2072
+ values: {
2073
+ 'Type_Of_Legal_Problem': {
2074
+ 'Child Custody': TOLPNextSteps["Child Custody"],
2075
+ 'Child Support': TOLPNextSteps["Child Support"],
2076
+ 'Not Sure or Other': nextStepsMapGeneralLegal["values"]["*"],
2077
+ },
2078
+ '*': TOLPNextSteps["Family Issues"]
2079
+ }
2049
2080
  };
2050
2081
 
2051
2082
  ({
2052
- 'Civil_Defense': {
2053
- 'Yes': TOLPNextSteps["Defend a Lawsuit"],
2054
- 'No': TOLPNextSteps["File a Lawsuit"],
2055
- },
2056
- '*': [
2057
- 'lawsuitOtherParty',
2058
- ...nextStepsLegalDefault
2059
- ]
2083
+ values: {
2084
+ 'Civil_Defense': {
2085
+ 'Yes': TOLPNextSteps["Defend a Lawsuit"],
2086
+ 'No': TOLPNextSteps["File a Lawsuit"],
2087
+ },
2088
+ '*': [
2089
+ 'lawsuitOtherParty',
2090
+ ...nextStepsLegalDefault
2091
+ ]
2092
+ }
2060
2093
  });
2061
2094
 
2062
2095
  ({
2063
- 'Type_Of_Legal_Problem': {
2064
- 'Defend a Lawsuit': TOLPNextSteps["Defend a Lawsuit"],
2065
- 'File a Lawsuit': TOLPNextSteps["File a Lawsuit"],
2066
- },
2067
- '*': [
2068
- 'lawsuitOtherParty',
2069
- ...nextStepsLegalDefault
2070
- ]
2096
+ values: {
2097
+ 'Type_Of_Legal_Problem': {
2098
+ 'Defend a Lawsuit': TOLPNextSteps["Defend a Lawsuit"],
2099
+ 'File a Lawsuit': TOLPNextSteps["File a Lawsuit"],
2100
+ },
2101
+ '*': [
2102
+ 'lawsuitOtherParty',
2103
+ ...nextStepsLegalDefault
2104
+ ]
2105
+ }
2071
2106
  });
2072
2107
 
2073
2108
  ({
2074
- 'Type_Of_Legal_Problem_Display': {
2075
- 'Automobile Accident': TOLPNextSteps["Auto and Car Accidents"],
2076
- 'Contract Disputes': TOLPNextSteps["Business Lawyers"],
2077
- 'Dog Bite': TOLPNextSteps["Personal Injury"],
2078
- 'Employment and Workplace': TOLPNextSteps["Employment and Workplace"],
2079
- 'Fraud': TOLPNextSteps["Consumer Lawyers"],
2080
- 'Medical Malpractice': TOLPNextSteps["Medical Malpractice"],
2081
- 'Personal Injury': TOLPNextSteps["Personal Injury"],
2082
- 'Property Damage': TOLPNextSteps["Property Damage"],
2083
- 'Real Estate': TOLPNextSteps["Real Estate"],
2084
- 'Not Sure or Other': nextStepsMapGeneralLegal["*"],
2085
- },
2086
- '*': [
2087
- 'lawsuitOtherParty',
2088
- ...nextStepsLegalDefault
2089
- ]
2109
+ values: {
2110
+ 'Type_Of_Legal_Problem_Display': {
2111
+ 'Automobile Accident': TOLPNextSteps["Auto and Car Accidents"],
2112
+ 'Contract Disputes': TOLPNextSteps["Business Lawyers"],
2113
+ 'Dog Bite': TOLPNextSteps["Personal Injury"],
2114
+ 'Employment and Workplace': TOLPNextSteps["Employment and Workplace"],
2115
+ 'Fraud': TOLPNextSteps["Consumer Lawyers"],
2116
+ 'Medical Malpractice': TOLPNextSteps["Medical Malpractice"],
2117
+ 'Personal Injury': TOLPNextSteps["Personal Injury"],
2118
+ 'Property Damage': TOLPNextSteps["Property Damage"],
2119
+ 'Real Estate': TOLPNextSteps["Real Estate"],
2120
+ 'Not Sure or Other': nextStepsMapGeneralLegal["values"]["*"],
2121
+ },
2122
+ '*': [
2123
+ 'lawsuitOtherParty',
2124
+ ...nextStepsLegalDefault
2125
+ ]
2126
+ }
2090
2127
  });
2091
2128
 
2092
2129
  ({
2093
- 'Type_Of_Legal_Problem_Display': {
2094
- 'Wrongful Termination': TOLPNextSteps["Wrongful Termination"],
2095
- 'Workers Compensation': TOLPNextSteps["Workers Compensation"],
2096
- 'Personal Injury': TOLPNextSteps["Personal Injury"],
2097
- 'Unemployment': TOLPNextSteps["Unemployment"],
2098
- },
2099
- '*': [
2100
- 'numEmployeesOfBusiness',
2101
- 'employerType',
2102
- 'employeeAtCompany',
2103
- ...nextStepsLegalDefault
2104
- ]
2130
+ values: {
2131
+ 'Type_Of_Legal_Problem_Display': {
2132
+ 'Wrongful Termination': TOLPNextSteps["Wrongful Termination"],
2133
+ 'Workers Compensation': TOLPNextSteps["Workers Compensation"],
2134
+ 'Personal Injury': TOLPNextSteps["Personal Injury"],
2135
+ 'Unemployment': TOLPNextSteps["Unemployment"],
2136
+ },
2137
+ '*': [
2138
+ 'numEmployeesOfBusiness',
2139
+ 'employerType',
2140
+ 'employeeAtCompany',
2141
+ ...nextStepsLegalDefault
2142
+ ]
2143
+ }
2105
2144
  });
2106
2145
 
2107
2146
  ({
2108
- 'Type_Of_Legal_Problem_Display': {
2109
- 'Foreclosure': TOLPNextSteps["Foreclosure"],
2110
- 'Landlord and Tenant': TOLPNextSteps["Landlord and Tenant"],
2111
- 'Wills, Trusts, and Estates': TOLPNextSteps["Wills and Trusts"],
2112
- 'Property Damage': TOLPNextSteps['Property Damage'],
2113
- },
2114
- '*': [
2115
- 'realEstateArea',
2116
- 'wouldLikeLawyerTo',
2117
- ...nextStepsLegalDefault
2118
- ]
2147
+ values: {
2148
+ 'Type_Of_Legal_Problem_Display': {
2149
+ 'Foreclosure': TOLPNextSteps["Foreclosure"],
2150
+ 'Landlord and Tenant': TOLPNextSteps["Landlord and Tenant"],
2151
+ 'Wills, Trusts, and Estates': TOLPNextSteps["Wills and Trusts"],
2152
+ 'Property Damage': TOLPNextSteps['Property Damage'],
2153
+ },
2154
+ '*': [
2155
+ 'realEstateArea',
2156
+ 'wouldLikeLawyerTo',
2157
+ ...nextStepsLegalDefault
2158
+ ]
2159
+ }
2119
2160
  });
2120
2161
 
2121
- const meta = defaultMetaProps();
2162
+ const nextStepsMapLegalCrossSells = {
2163
+ values: {
2164
+ 'Legal_CrossSells': {
2165
+ 'Auto and Car Accidents': ['autoAndCarAccidentCrossSellQuestions'],
2166
+ 'Personal Injury': ['personalInjuryCrossSellQuestions'],
2167
+ 'Workers Compensation': ['workersCompensationCrossSellQuestions'],
2168
+ 'DUI and DWI': ['duiAndDWICrossSellQuestions'],
2169
+ 'Long Term Disability': ['longTermDisabilityCrossSellQuestions'],
2170
+ 'Social Security Disability and Insurance': ['ssdiCrossSellQuestions'],
2171
+ 'Bankruptcy': ['bankruptcyCrossSellQuestions'],
2172
+ 'Power of Attorney': ['powerOfAttorneyCrossSellQuestions'],
2173
+ 'Wills and Trusts': ['willsAndTrustsCrossSellQuestions'],
2174
+ 'Divorce and Separation': ['divorceAndSeparationCrossSellQuestions'],
2175
+ 'Child Custody': ['childCustodyCrossSellQuestions'],
2176
+ },
2177
+ '*': ['firstAndLast', 'contactInfo'],
2178
+ },
2179
+
2180
+ // NOTE: this assumes a certain placement of the cross sell question
2181
+ // in the form flow.
2182
+ appendSteps: ['firstAndLast', 'contactInfo'],
2183
+ matchesAllowed: 1,
2184
+ };
2185
+
2186
+ const legalCrossSellOptionMap = CROSS_SELL_OPTION_MAP_LEGAL;
2187
+
2188
+ const meta = defaultMetaPropsLegal();
2122
2189
 
2123
2190
  meta.data.dynamicSchema = [
2124
2191
  zipcode(),
@@ -2136,7 +2203,8 @@ meta.data.dynamicSchema = [
2136
2203
  headlineClass: '!t-text-dark',
2137
2204
  }),
2138
2205
  legalCrossSells({
2139
- headlineClass: '!t-text-dark'
2206
+ headlineClass: '!t-text-dark',
2207
+ nextStepMap: nextStepsMapLegalCrossSells,
2140
2208
  }),
2141
2209
  // Note: this is purposefully limited to a subset of values
2142
2210
  // that could show up in the Legal_CrossSells input because
@@ -2159,7 +2227,8 @@ const schema = [
2159
2227
  $cmp: 'FormKit',
2160
2228
  props: formProps({
2161
2229
  formId: 'childAndFamilySingle',
2162
- redirectMap: legalRedirectMap()
2230
+ redirectMap: legalRedirectMap(),
2231
+ crossSellOptionMap: legalCrossSellOptionMap
2163
2232
  }),
2164
2233
  children: [
2165
2234
  progressBar(),