bhl-forms 0.6.15 → 0.7.1

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 (97) 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 +314 -228
  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 +317 -236
  13. package/dist/forms/business.iife.js +1 -1
  14. package/dist/forms/business.json +1 -1
  15. package/dist/forms/childAndFamily.es.js +303 -224
  16. package/dist/forms/childAndFamily.iife.js +1 -1
  17. package/dist/forms/childAndFamily.json +1 -1
  18. package/dist/forms/childAndFamilySingle.es.js +643 -555
  19. package/dist/forms/childAndFamilySingle.iife.js +1 -1
  20. package/dist/forms/childAndFamilySingle.json +1 -1
  21. package/dist/forms/civilLawsuit.es.js +637 -551
  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 +307 -227
  27. package/dist/forms/contracts.iife.js +1 -1
  28. package/dist/forms/contracts.json +1 -1
  29. package/dist/forms/criminal.es.js +660 -572
  30. package/dist/forms/criminal.iife.js +1 -1
  31. package/dist/forms/criminal.json +1 -1
  32. package/dist/forms/divorce.es.js +643 -555
  33. package/dist/forms/divorce.iife.js +1 -1
  34. package/dist/forms/divorce.json +1 -1
  35. package/dist/forms/employmentAndWorkplace.es.js +584 -506
  36. package/dist/forms/employmentAndWorkplace.iife.js +1 -1
  37. package/dist/forms/employmentAndWorkplace.json +1 -1
  38. package/dist/forms/generalHomeImprovement.es.js +3015 -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 +341 -244
  42. package/dist/forms/generalLegal.iife.js +1 -1
  43. package/dist/forms/generalLegal.json +1 -1
  44. package/dist/forms/generalLegalJustAnswer.es.js +4542 -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 +342 -245
  48. package/dist/forms/generalLegalPopUnder.iife.js +1 -1
  49. package/dist/forms/generalLegalPopUnder.json +1 -1
  50. package/dist/forms/generalLegalPopUnderSingle.es.js +692 -612
  51. package/dist/forms/generalLegalPopUnderSingle.iife.js +1 -1
  52. package/dist/forms/generalLegalPopUnderSingle.json +1 -1
  53. package/dist/forms/generalLegalSingle.es.js +692 -612
  54. package/dist/forms/generalLegalSingle.iife.js +1 -1
  55. package/dist/forms/generalLegalSingle.json +1 -1
  56. package/dist/forms/generalLegalThankYou.es.js +204 -158
  57. package/dist/forms/generalLegalThankYou.iife.js +1 -1
  58. package/dist/forms/generalLegalThankYou.json +1 -1
  59. package/dist/forms/generalLegalThankYouConsultation.es.js +692 -612
  60. package/dist/forms/generalLegalThankYouConsultation.iife.js +1 -1
  61. package/dist/forms/generalLegalThankYouConsultation.json +1 -1
  62. package/dist/forms/harassmentAndDiscrimination.es.js +303 -224
  63. package/dist/forms/harassmentAndDiscrimination.iife.js +1 -1
  64. package/dist/forms/harassmentAndDiscrimination.json +1 -1
  65. package/dist/forms/landlordTenant.es.js +316 -240
  66. package/dist/forms/landlordTenant.iife.js +1 -1
  67. package/dist/forms/landlordTenant.json +1 -1
  68. package/dist/forms/malpractice.es.js +308 -227
  69. package/dist/forms/malpractice.iife.js +1 -1
  70. package/dist/forms/malpractice.json +1 -1
  71. package/dist/forms/mechanics.es.js +184 -166
  72. package/dist/forms/mechanics.iife.js +1 -1
  73. package/dist/forms/mechanics.json +1 -1
  74. package/dist/forms/patentsAndIP.es.js +646 -558
  75. package/dist/forms/patentsAndIP.iife.js +1 -1
  76. package/dist/forms/patentsAndIP.json +1 -1
  77. package/dist/forms/realEstate.es.js +339 -243
  78. package/dist/forms/realEstate.iife.js +1 -1
  79. package/dist/forms/realEstate.json +1 -1
  80. package/dist/forms/repossession.es.js +307 -227
  81. package/dist/forms/repossession.iife.js +1 -1
  82. package/dist/forms/repossession.json +1 -1
  83. package/dist/forms/ssdi.es.js +156 -140
  84. package/dist/forms/ssdi.iife.js +1 -1
  85. package/dist/forms/ssdi.json +1 -1
  86. package/dist/forms/testForm.es.js +69 -51
  87. package/dist/forms/testForm.iife.js +1 -1
  88. package/dist/forms/testForm.json +1 -1
  89. package/dist/forms/testRedirects.es.js +43 -22
  90. package/dist/forms/testRedirects.iife.js +1 -1
  91. package/dist/forms/testRedirects.json +1 -1
  92. package/dist/forms/vets.es.js +16 -7
  93. package/dist/forms/vets.iife.js +1 -1
  94. package/dist/forms/willsAndTrusts.es.js +304 -223
  95. package/dist/forms/willsAndTrusts.iife.js +1 -1
  96. package/dist/forms/willsAndTrusts.json +1 -1
  97. 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
 
@@ -166,6 +249,14 @@ const sbsText = (updates) => {
166
249
  return text(updates)
167
250
  };
168
251
 
252
+ const verticalText = (updates) => {
253
+ updates.wrapperClass = 't-flex t-justify-center';
254
+ updates.messagesClass = 't-flex t-justify-center';
255
+ updates.inputClass = 't-text-center';
256
+ updates.helpClass = 't-mt-2.5 !t-text-sm t-text-center';
257
+ return text(updates)
258
+ };
259
+
169
260
  const textArea = (updates) => {
170
261
  if (updates.name && !updates.id) {
171
262
  updates.id = updates.name;
@@ -203,20 +294,101 @@ const sbsDate = (updates) => {
203
294
  return date(updates)
204
295
  };
205
296
 
206
- const applicantAge = (scope) => sbsText({
207
- name: scope ? scope + ':' + 'Applicant_Age' : 'Applicant_Age',
208
- label: 'Age of Applicant?',
209
- placeholder: 'Age between 18 and 65',
210
- maxlength: 2,
211
- inputmode: "numeric",
212
- validation: "required|min:18,max:65",
297
+ const email = (scope) => sbsText({
298
+ $formkit: 'email',
299
+ name: scope ? scope + ':' + 'Email' : 'Email',
300
+ label: 'Email Address:',
301
+ placeholder: 'email@domain.com',
302
+ autocomplete: 'email',
303
+ 'data-tf-sensitive': 'false',
304
+ validation: 'required|email',
305
+ validationMessages: {
306
+ required: 'Email is required',
307
+ email: 'Invalid Email'
308
+ }
309
+ });
310
+
311
+ const firstName = (scope) => sbsText({
312
+ label: 'First Name:',
313
+ placeholder: 'First',
314
+ name: scope ? scope + ':' + 'First_Name' : 'First_Name',
315
+ autocomplete: "given-name",
213
316
  validationMessages: {
214
- required: 'Applicant Age is required',
215
- min: 'Invalid Age - must be between 18 and 65',
216
- max: 'Invalid Age - must be between 18 and 65',
317
+ required: 'First Name is required'
217
318
  }
218
319
  });
219
320
 
321
+ const lastName = (scope) => sbsText({
322
+ label: 'Last Name:',
323
+ placeholder: 'Last',
324
+ name: scope ? scope + ':' + 'Last_Name' : 'Last_Name',
325
+ autocomplete: "family-name",
326
+ validationMessages: {
327
+ required: 'Last Name is required'
328
+ }
329
+ });
330
+
331
+ const phone = (scope) => sbsText({
332
+ $formkit: 'tel',
333
+ name: scope ? scope + ':' + 'Primary_Phone' : 'Primary_Phone',
334
+ label: 'Phone Number:',
335
+ placeholder: '###-###-####',
336
+ maxlength: 12,
337
+ help: '10-digit phone number, hyphens optional',
338
+ autocomplete: 'tel-national',
339
+ 'data-tf-sensitive': 'false',
340
+ validation: 'required|matches:/^[0-9]{3}-?[0-9]{3}-?[0-9]{4}$/|valid_phone',
341
+ validationMessages: {
342
+ required: 'Field is required',
343
+ matches: 'Invalid Phone Format, use ###-###-####',
344
+ valid_phone: 'Invalid Phone Number'
345
+ },
346
+ helpClass: "t-mt-2.5 md:t-text-right md:t-mt-[-2px]"
347
+ });
348
+
349
+
350
+ const zipcode$1 = (scope, vertical, updates = {}) => {
351
+ const func = vertical ? verticalText : sbsText;
352
+ const label = vertical ? (updates.label) : 'Zip Code:';
353
+ const help = vertical ? (updates.help ?? "We try to match you with local help") : null;
354
+ return func({
355
+ label,
356
+ help,
357
+ placeholder: '#####',
358
+ name: scope ? scope + ':' + 'Zip' : 'Zip',
359
+ maxlength: 5,
360
+ inputmode: "numeric",
361
+ autocomplete: 'postal-code',
362
+ validation: 'required|matches:/^[0-9]{5}$/',
363
+ validationMessages: {
364
+ required: 'Zip Code is required',
365
+ matches: 'Invalid Zip Code'
366
+ },
367
+ ...updates
368
+ })
369
+ };
370
+
371
+ const applicantAge = (scope, vertical, updates = {}) => {
372
+ const func = vertical ? verticalText : sbsText;
373
+ const label = vertical ? (updates.label) : 'Age of Applicant?';
374
+ const value = vertical ? (updates.value ?? "50") : null;
375
+ return func(merge({
376
+ label,
377
+ placeholder: 'Age between 18 and 65',
378
+ name: scope ? scope + ':' + 'Applicant_Age' : 'Applicant_Age',
379
+ value,
380
+ maxlength: 2,
381
+ inputmode: "numeric",
382
+ validation: "required|min:18,max:65",
383
+ validationMessages: {
384
+ required: 'Applicant Age is required',
385
+ min: 'Invalid Age - must be between 18 and 65',
386
+ max: 'Invalid Age - must be between 18 and 65',
387
+ },
388
+ ...updates
389
+ }))
390
+ };
391
+
220
392
  const atFault = (scope) => sbsYesNoRadio({
221
393
  name: scope ? scope + ':' + 'At_Fault' : 'At_Fault',
222
394
  label: 'Were You at Fault?'
@@ -352,20 +524,6 @@ const doctorTreatment = (scope) => sbsYesNoRadio({
352
524
  label: 'Have You Recently Been Treated by a Doctor, Hospital or Clinic?',
353
525
  });
354
526
 
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
527
  const estateLegalServicesNeeded = (scope) => sbsSelect({
370
528
  name: scope ? scope + ':' + 'Estate_Legal_Services_Needed' : 'Estate_Legal_Services_Needed',
371
529
  label: "Legal Services Needed for Your Estate:",
@@ -379,17 +537,6 @@ const estateLegalServicesNeeded = (scope) => sbsSelect({
379
537
  ]
380
538
  });
381
539
 
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
540
  const haveAttorney$1 = (scope) => sbsYesNoRadio({
394
541
  name: scope ? scope + ':' + 'Have_Attorney' : 'Have_Attorney',
395
542
  label: 'Already Working with An Attorney?'
@@ -408,17 +555,6 @@ const incidentDate = (scope) => sbsDate({
408
555
  label: 'Date of Incident:',
409
556
  });
410
557
 
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
558
  const lawyerPaymentMethodCenter = (scope) => col2RadioCenter({
423
559
  name: scope ? scope + ':' + 'Lawyer_Payment_Method' : 'Lawyer_Payment_Method',
424
560
  help: 'No payment necessary to start a consultation.',
@@ -437,69 +573,7 @@ const legalCrossSells$1 = () => col2Checkbox({
437
573
  help: 'Just hit "Next" if none apply',
438
574
  helpClass: 't-text-center !t-text-sm',
439
575
  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
- }
576
+ options: '$getCrossSellOptions($get(form), $getVal($get(form), "Type_Of_Legal_Problem"))',
503
577
  });
504
578
 
505
579
  const maritalStatusCenter = (scope) => col2RadioCenter({
@@ -519,24 +593,6 @@ const pendingCharges = (scope) => sbsYesNoRadio({
519
593
  label: 'Do you currently have any pending charges?'
520
594
  });
521
595
 
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
596
  const primaryInjury = (scope) => sbs2ColRadio({
541
597
  name: scope ? scope + ':' + 'Primary_Injury' : 'Primary_Injury',
542
598
  label: 'Primary Injury:',
@@ -633,25 +689,6 @@ const valueOfAssets = (scope) => sbsSelect({
633
689
  ]
634
690
  });
635
691
 
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
692
  // ------ Question Groups
656
693
 
657
694
  // NOTE: name must be unique within a form!
@@ -859,13 +896,20 @@ function verticalStepSubHeadline(updates) {
859
896
  function commentsStepHeadline(updates) {
860
897
  return {
861
898
  $el: 'h3',
862
- children: updates.headline || 'Additional Case Details',
899
+ children: updates.headline || 'Additional Details',
863
900
  attrs: {
864
901
  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
902
  }
866
903
  }
867
904
  }
868
905
 
906
+ function commentsStepHeadlineLegal(updates) {
907
+ return commentsStepHeadline({
908
+ headline: updates.headline || 'Additional Case Details',
909
+ headlineClass: updates.headlineClass
910
+ })
911
+ }
912
+
869
913
  function firstAndLastStepHeadline(updates) {
870
914
  return {
871
915
  $el: 'h3',
@@ -889,7 +933,7 @@ function legalCrossSellsStepHeadline(updates) {
889
933
  function contactStepHeadline(updates) {
890
934
  return {
891
935
  $el: 'h3',
892
- children: updates.headline || DEFAULT_FINAL_HEADLINE_DYNAMIC,
936
+ children: updates.headline || DEFAULT_FINAL_HEADLINE_DYNAMIC_LEGAL,
893
937
  attrs: {
894
938
  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
939
  }
@@ -899,7 +943,7 @@ function contactStepHeadline(updates) {
899
943
  function contactStepSubHeadline(updates) {
900
944
  return {
901
945
  $el: 'h5',
902
- children: updates.subheadline || DEFAULT_FINAL_SUBHEADLINE_DYNAMIC,
946
+ children: updates.subheadline || DEFAULT_FINAL_SUBHEADLINE_DYNAMIC_LEGAL,
903
947
  attrs: {
904
948
  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
949
  }
@@ -939,10 +983,16 @@ const stepDefaults = (step, stepKey) => ({
939
983
  }
940
984
  });
941
985
 
942
- function step(name, inputs, nextOnEnter = true, nextOnInput = false, stepKey = undefined, nextStepMap = undefined, autoFocus = undefined) {
943
- if (typeof nextOnEnter === 'undefined') {
944
- nextOnEnter = true;
945
- }
986
+ function step(name, inputs, updates = {}) {
987
+ const {
988
+ nextOnEnter = true,
989
+ nextOnInput = false,
990
+ stepKey = undefined,
991
+ nextStepMap = undefined,
992
+ triggerRedirectMap = undefined,
993
+ autoFocus = undefined,
994
+ } = updates;
995
+
946
996
  if (inputs && inputs.length && (nextOnEnter || nextOnInput)) {
947
997
  const lastInput = findLastInput(inputs[inputs.length - 1]);
948
998
  if (lastInput && nextOnEnter === true) {
@@ -962,6 +1012,7 @@ function step(name, inputs, nextOnEnter = true, nextOnInput = false, stepKey = u
962
1012
  id: name,
963
1013
  name: name,
964
1014
  nextStepMap: nextStepMap,
1015
+ triggerRedirectMap: triggerRedirectMap,
965
1016
  autoFocus: autoFocus,
966
1017
  children: inputs
967
1018
  }
@@ -972,44 +1023,17 @@ function step(name, inputs, nextOnEnter = true, nextOnInput = false, stepKey = u
972
1023
 
973
1024
  // Single question step
974
1025
  function sqstep(name, input, defaultHeadline, updates = {}) {
1026
+ if (typeof updates.nextOnInput === 'undefined') {
1027
+ updates.nextOnInput = true;
1028
+ }
1029
+
975
1030
  return step(
976
1031
  name,
977
1032
  [
978
1033
  verticalStepHeadline({ headline: updates.headline ?? defaultHeadline, headlineClass: updates.headlineClass }),
979
1034
  ...Array.isArray(input) ? input : [input],
980
1035
  ],
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
1036
+ updates
1013
1037
  )
1014
1038
  }
1015
1039
 
@@ -1025,7 +1049,7 @@ function contactInfo(updates = {}) {
1025
1049
  TCPAConsent(updates.scope),
1026
1050
  secureIcon()
1027
1051
  ],
1028
- false, // nextOnEnter
1052
+ { nextOnEnter: false }
1029
1053
  )
1030
1054
  }
1031
1055
 
@@ -1044,10 +1068,46 @@ function firstAndLastV3(updates = {}, scope) {
1044
1068
  firstName(scope),
1045
1069
  lastName(scope)
1046
1070
  ],
1047
- updates.nextOnEnter
1071
+ updates
1072
+ )
1073
+ }
1074
+
1075
+ function zipcode(updates = {}) {
1076
+ return sqstep(
1077
+ 'zipcode',
1078
+ zipcode$1(updates.scope, true, updates),
1079
+ 'Please verify your Zip Code',
1080
+ updates
1048
1081
  )
1049
1082
  }
1050
1083
 
1084
+ function commentsWithBankruptcy(updates = {}) {
1085
+ return step(
1086
+ 'commentsWithBankruptcy',
1087
+ [
1088
+ commentsStepHeadlineLegal(updates),
1089
+ comments({
1090
+ label: typeof updates.label === 'undefined' ? DEFAULT_COMMENTS_LABEL_LEGAL : updates.label,
1091
+ placeholder: updates.placeholder || DEFAULT_COMMENTS_PLACEHOLDER_DYNAMIC_LEGAL,
1092
+ inputClass: typeof updates.inputClass === 'undefined' ? '!t-h-32' : updates.inputClass,
1093
+ }, updates.scope),
1094
+ // TODO: needs scope support
1095
+ bankruptcyCrossSell(),
1096
+ {
1097
+ $el: 'div',
1098
+ if: '$get(CrossSell_Bankruptcy).value == true',
1099
+ children: [
1100
+ comments({
1101
+ label: 'Bankruptcy or debt details:',
1102
+ placeholder: 'Please describe your bankrtupcy or debt situation in a few words...',
1103
+ inputClass: '!t-h-16'
1104
+ }, 'CrossSell:Bankruptcy')
1105
+ ],
1106
+ }
1107
+ ],
1108
+ { nextOnEnter: false }
1109
+ )
1110
+ }
1051
1111
 
1052
1112
  function autoAndCarAccidentCrossSellQuestions(updates = {}) {
1053
1113
  return step(
@@ -1065,7 +1125,7 @@ function autoAndCarAccidentCrossSellQuestions(updates = {}) {
1065
1125
  'CrossSell:Auto_and_Car_Accidents'
1066
1126
  )
1067
1127
  ],
1068
- updates.nextOnEnter
1128
+ updates
1069
1129
  )
1070
1130
  }
1071
1131
 
@@ -1084,7 +1144,7 @@ function duiAndDWICrossSellQuestions(updates = {}) {
1084
1144
  'CrossSell:DUI_and_DWI'
1085
1145
  )
1086
1146
  ],
1087
- updates.nextOnEnter
1147
+ updates
1088
1148
  )
1089
1149
  }
1090
1150
 
@@ -1104,7 +1164,7 @@ function ssdiCrossSellQuestions(updates = {}) {
1104
1164
  'CrossSell:Social_Security_Disability_and_Insurance'
1105
1165
  )
1106
1166
  ],
1107
- updates.nextOnEnter
1167
+ updates
1108
1168
  )
1109
1169
  }
1110
1170
 
@@ -1124,7 +1184,7 @@ function personalInjuryCrossSellQuestions(updates = {}) {
1124
1184
  'CrossSell:Personal_Injury'
1125
1185
  )
1126
1186
  ],
1127
- updates.nextOnEnter
1187
+ updates
1128
1188
  )
1129
1189
  }
1130
1190
 
@@ -1143,7 +1203,7 @@ function powerOfAttorneyCrossSellQuestions(updates = {}) {
1143
1203
  'CrossSell:Power_of_Attorney'
1144
1204
  )
1145
1205
  ],
1146
- updates.nextOnEnter
1206
+ updates
1147
1207
  )
1148
1208
  }
1149
1209
 
@@ -1162,21 +1222,20 @@ function willsAndTrustsCrossSellQuestions(updates = {}) {
1162
1222
  'CrossSell:Wills_and_Trusts'
1163
1223
  )
1164
1224
  ],
1165
- updates.nextOnEnter
1225
+ updates
1166
1226
  )
1167
1227
  }
1168
1228
 
1169
1229
  function legalCrossSells(updates = {}) {
1230
+ updates.nextOnInput = false;
1231
+ updates.stepKey = '$get(Type_Of_Legal_Problem).value';
1170
1232
  return step(
1171
1233
  'legalCrossSells',
1172
1234
  [
1173
1235
  legalCrossSellsStepHeadline(updates),
1174
1236
  legalCrossSells$1(),
1175
1237
  ],
1176
- updates.nextOnEnter,
1177
- false,
1178
- // Note: we should probably scope this stepKey to this step name
1179
- '$get(Type_Of_Legal_Problem).value'
1238
+ updates
1180
1239
  )
1181
1240
  }
1182
1241
 
@@ -1186,18 +1245,6 @@ function childAndFamilyTOLP(updates = {}) {
1186
1245
  [
1187
1246
  childAndFamilyTOLPCenter()
1188
1247
  ],
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
1248
  updates
1202
1249
  )
1203
1250
  }
@@ -1413,9 +1460,7 @@ function formProps(updates) {
1413
1460
  return props
1414
1461
  }
1415
1462
 
1416
- const metaDefaults = {
1417
- tcpaLanguage: TCPA_LANGUAGE
1418
- };
1463
+ const metaDefaults = {};
1419
1464
 
1420
1465
  function metaProps(updates) {
1421
1466
  const data = merge(
@@ -1428,7 +1473,7 @@ function metaProps(updates) {
1428
1473
  }
1429
1474
  }
1430
1475
 
1431
- function defaultMetaProps(tolps = null) {
1476
+ function defaultMetaPropsLegal(tolps = null) {
1432
1477
  let commentsPlaceholders = TOLPCommentsPlaceholders;
1433
1478
  let finalHeadlines = TOLPFinalHeadlines;
1434
1479
  let finalSubHeadlines = TOLPFinalSubHeadlines;
@@ -1438,12 +1483,13 @@ function defaultMetaProps(tolps = null) {
1438
1483
  finalSubHeadlines = filterMapByKey(TOLPFinalSubHeadlines, tolps);
1439
1484
  }
1440
1485
  return metaProps({
1441
- defaultCommentsPlaceholder: DEFAULT_COMMENTS_PLACEHOLDER_DYNAMIC,
1486
+ tcpaLanguage: TCPA_LANGUAGE_LEGAL,
1487
+ defaultCommentsPlaceholder: DEFAULT_COMMENTS_PLACEHOLDER_DYNAMIC_LEGAL,
1442
1488
  commentsPlaceholders: commentsPlaceholders,
1443
- defaultFinalHeadline: DEFAULT_FINAL_HEADLINE,
1489
+ defaultFinalHeadline: DEFAULT_FINAL_HEADLINE_LEGAL,
1444
1490
  finalHeadlines: finalHeadlines,
1445
- defaultFinalSubHeadline: DEFAULT_FINAL_SUBHEADLINE,
1446
- finalSubHeadlines: finalSubHeadlines,
1491
+ defaultFinalSubHeadline: DEFAULT_FINAL_SUBHEADLINE_LEGAL,
1492
+ finalSubHeadlines: finalSubHeadlines
1447
1493
  })
1448
1494
  }
1449
1495
 
@@ -1770,355 +1816,395 @@ const nextStepsLegalNoHA = [
1770
1816
  ];
1771
1817
 
1772
1818
  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
1819
+ values: {
1820
+ 'Type_Of_Legal_Problem': {
1821
+ 'Adoption': [
1822
+ 'maritalStatus',
1823
+ 'haveChildren',
1824
+ ...nextStepsLegalDefaultLPM
1825
+ ],
1826
+ 'Asbestos and Mesothelioma': [
1827
+ 'incidentDate',
1828
+ 'doctorTreatment',
1829
+ ...nextStepsLegalDefault
1830
+ ],
1831
+ 'Auto and Car Accidents': [
1832
+ 'incidentDate',
1833
+ 'atFault',
1834
+ 'primaryInjury',
1835
+ 'doctorTreatment',
1836
+ 'policeReportFiled',
1837
+ ...nextStepsLegalNoDOI
1838
+ ],
1839
+ 'Bankruptcy': [
1840
+ 'totalMonthlyIncome',
1841
+ 'totalDebt',
1842
+ 'ownRealEstate',
1843
+ 'valueOfAssets',
1844
+ ...nextStepsLegalDefault
1845
+ ],
1846
+ 'Business Lawyers': [
1847
+ 'businessServices',
1848
+ 'businessType',
1849
+ 'numEmployeesOfBusiness',
1850
+ ...nextStepsLegalDefault
1851
+ ],
1852
+ 'Child Custody': [
1853
+ 'childRelationship',
1854
+ 'childHome',
1855
+ 'childPrimaryCaregiver',
1856
+ ...nextStepsLegalDefaultLPM
1857
+ ],
1858
+ 'Child Support': [
1859
+ 'childRelationship',
1860
+ 'childHome',
1861
+ 'childPrimaryCaregiver',
1862
+ ...nextStepsLegalDefaultLPM
1863
+ ],
1864
+ 'Civil Rights and Discrimination': [
1865
+ 'civilRightsType',
1866
+ ...nextStepsLegalDefault
1867
+ ],
1868
+ 'Civil Lawsuit': [
1869
+ 'civilDefense',
1870
+ 'lawsuitOtherParty',
1871
+ ...nextStepsLegalDefault
1872
+ ],
1873
+ 'File a Lawsuit': [
1874
+ 'civilLawsuitTOLPDisplay',
1875
+ 'lawsuitOtherParty',
1876
+ ...nextStepsLegalDefault
1877
+ ],
1878
+ 'Defend a Lawsuit': [
1879
+ 'lawsuitOtherParty',
1880
+ ...nextStepsLegalDefault
1881
+ ],
1882
+ 'Consumer Lawyers': [
1883
+ 'consumerLawyerType',
1884
+ 'incidentDate',
1885
+ 'lawsuitOtherParty',
1886
+ ...nextStepsLegalDefault
1887
+ ],
1888
+ 'Criminal and Felony': [
1889
+ 'criminalTOLPDisplay',
1890
+ 'crimeCommittedDate',
1891
+ 'roleInMatterCriminal',
1892
+ 'pendingCharges',
1893
+ ...nextStepsLegalDefaultLPM
1894
+ ],
1895
+ 'Debt and Collections': [
1896
+ 'totalMonthlyIncome',
1897
+ 'totalDebt',
1898
+ 'ownRealEstate',
1899
+ 'valueOfAssets',
1900
+ ...nextStepsLegalDefault
1901
+ ],
1902
+ 'Divorce and Separation': [
1903
+ 'maritalStatus',
1904
+ 'haveChildren',
1905
+ ...nextStepsLegalDefaultLPM
1906
+ ],
1907
+ 'DUI and DWI': [
1908
+ 'incidentDate',
1909
+ 'priorAlcoholOffenses',
1910
+ 'typeOfAlcoholTest',
1911
+ 'bloodContentAlcoholTest',
1912
+ 'pendingCharges',
1913
+ ...nextStepsLegalDefault
1914
+ ],
1915
+ 'Employment and Workplace': [
1916
+ 'employmentAndWorkplaceTOLPDisplay',
1917
+ 'numEmployeesOfBusiness',
1918
+ 'employerType',
1919
+ 'employeeAtCompany',
1920
+ ...nextStepsLegalDefault
1921
+ ],
1922
+ 'Expungement': [
1923
+ 'incidentDate',
1924
+ 'criminalChargeType',
1925
+ ...nextStepsLegalDefaultLPM
1926
+ ],
1927
+ 'Family Issues': [
1928
+ 'maritalStatus',
1929
+ 'haveChildren',
1930
+ ...nextStepsLegalDefaultLPM
1931
+ ],
1932
+ 'Foreclosure': [
1933
+ 'ownRealEstate',
1934
+ 'typeOfProperty',
1935
+ 'amountPaymentsPastDue',
1936
+ 'loanAmount',
1937
+ 'defaultNotice',
1938
+ ...nextStepsLegalDefault
1939
+ ],
1940
+ 'Guardianship': [
1941
+ 'maritalStatus',
1942
+ 'haveChildren',
1943
+ ...nextStepsLegalDefaultLPM
1944
+ ],
1945
+ 'Immigration and Visas': [
1946
+ 'countryOfCitizenship',
1947
+ 'immigrationLocation',
1948
+ 'immigrationEntry',
1949
+ 'immigrationType',
1950
+ 'immigrationStatus',
1951
+ 'immigrationDetails',
1952
+ ...nextStepsLegalDefault
1953
+ ],
1954
+ 'Landlord and Tenant': [
1955
+ 'landlordTenantIssue',
1956
+ 'landlordTenantParty',
1957
+ ...nextStepsLegalDefault
1958
+ ],
1959
+ 'Lemon Law': [
1960
+ 'incidentDate',
1961
+ 'lawsuitOtherParty',
1962
+ ...nextStepsLegalDefault
1963
+ ],
1964
+ 'Long Term Disability': [
1965
+ 'applicantOccupation',
1966
+ 'applicantAge',
1967
+ 'applicantLTDisabilityPolicy',
1968
+ 'applicantDisabilityHowObtain',
1969
+ 'applicantPreviouslyAppliedLtdBenefits',
1970
+ 'applicantReceivedDisabilityBenefits',
1971
+ 'applicantMonthlySalary',
1972
+ ...nextStepsLegalNoDOI
1973
+ ],
1974
+ 'Medical Malpractice': [
1975
+ 'incidentDate',
1976
+ 'claimStatus',
1977
+ 'doctorTreatment',
1978
+ 'medicalMalpracticeInjuries',
1979
+ ...nextStepsLegalDefault
1980
+ ],
1981
+ 'Patents and Intellectual Property': [
1982
+ 'patentAssistanceType',
1983
+ 'patentFor',
1984
+ ...nextStepsLegalDefault
1985
+ ],
1986
+ 'Personal Injury': [
1987
+ 'incidentDate',
1988
+ 'claimStatus',
1989
+ 'atFault',
1990
+ 'primaryInjury',
1991
+ 'doctorTreatment',
1992
+ ...nextStepsLegalNoDOI
1993
+ ],
1994
+ 'Probate and Estates': [
1995
+ 'valueOfAssets',
1996
+ 'typeOfAssets',
1997
+ 'roleInMatterProbate',
1998
+ 'estateLegalServicesNeeded',
1999
+ ...nextStepsLegalDefault
2000
+ ],
2001
+ 'Property Damage': [
2002
+ 'realEstateArea',
2003
+ 'wouldLikeLawyerTo',
2004
+ ...nextStepsLegalDefault
2005
+ ],
2006
+ 'Real Estate': [
2007
+ 'realEstateTOLPDisplay',
2008
+ 'realEstateArea',
2009
+ 'wouldLikeLawyerTo',
2010
+ ...nextStepsLegalDefault
2011
+ ],
2012
+ 'Social Security Disability and Insurance': [
2013
+ 'applicantAge',
2014
+ 'disabilityConditionStopWork',
2015
+ 'disabilityWorkHistory',
2016
+ 'socialSecurityDisabilityReceivingBenefits',
2017
+ 'doctorTreatment',
2018
+ ...nextStepsLegalNoDOI
2019
+ ],
2020
+ 'Tax and IRS': [
2021
+ 'totalDebt',
2022
+ 'taxProblemDetails',
2023
+ 'taxLevel',
2024
+ 'taxIssueType',
2025
+ ...nextStepsLegalDefault
2026
+ ],
2027
+ 'Traffic and Tickets': [
2028
+ 'driversLicenseType',
2029
+ 'trafficViolations',
2030
+ 'haveCourtDate',
2031
+ ...nextStepsLegalDefault
2032
+ ],
2033
+ 'Unemployment': [
2034
+ 'numEmployeesOfBusiness',
2035
+ 'employerType',
2036
+ ...nextStepsLegalNoHA
2037
+ ],
2038
+ 'Victim of a Crime': [
2039
+ 'crimeCommittedDate',
2040
+ 'roleInMatterCriminal',
2041
+ 'pendingCharges',
2042
+ ...nextStepsLegalDefaultLPM
2043
+ ],
2044
+ 'Wills and Trusts': [
2045
+ 'valueOfAssets',
2046
+ 'typeOfAssets',
2047
+ 'roleInMatterProbate',
2048
+ 'estateLegalServicesNeeded',
2049
+ ...nextStepsLegalDefault
2050
+ ],
2051
+ 'Workers Compensation': [
2052
+ 'incidentDate',
2053
+ 'claimStatus',
2054
+ 'primaryInjury',
2055
+ 'causeOfInjury',
2056
+ 'doctorTreatment',
2057
+ ...nextStepsLegalNoDOI
2058
+ ],
2059
+ 'Workplace Harassment': [
2060
+ 'numEmployeesOfBusiness',
2061
+ 'employerType',
2062
+ 'employeeAtCompany',
2063
+ ...nextStepsLegalDefault
2064
+ ],
2065
+ 'Workplace Discrimination': [
2066
+ 'numEmployeesOfBusiness',
2067
+ 'employerType',
2068
+ 'employeeAtCompany',
2069
+ ...nextStepsLegalDefault
2070
+ ],
2071
+ 'Wrongful Death': [
2072
+ 'incidentDate',
2073
+ 'relationshipToVictim',
2074
+ 'criminalChargesFiled',
2075
+ 'causeOfDeath',
2076
+ ...nextStepsLegalNoDOI
2077
+ ],
2078
+ 'Wrongful Termination': [
2079
+ 'numEmployeesOfBusiness',
2080
+ 'employerType',
2081
+ ...nextStepsLegalDefault
2082
+ ],
2083
+ },
2084
+ '*': nextStepsLegalDefault
2085
+ }
2038
2086
  };
2039
2087
 
2040
- const TOLPNextSteps = nextStepsMapGeneralLegal["Type_Of_Legal_Problem"];
2088
+ const TOLPNextSteps = nextStepsMapGeneralLegal["values"]["Type_Of_Legal_Problem"];
2041
2089
 
2042
2090
  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"]
2091
+ values: {
2092
+ 'Type_Of_Legal_Problem': {
2093
+ 'Child Custody': TOLPNextSteps["Child Custody"],
2094
+ 'Child Support': TOLPNextSteps["Child Support"],
2095
+ 'Not Sure or Other': nextStepsMapGeneralLegal["values"]["*"],
2096
+ },
2097
+ '*': TOLPNextSteps["Family Issues"]
2098
+ }
2049
2099
  };
2050
2100
 
2051
2101
  ({
2052
- 'Civil_Defense': {
2053
- 'Yes': TOLPNextSteps["Defend a Lawsuit"],
2054
- 'No': TOLPNextSteps["File a Lawsuit"],
2055
- },
2056
- '*': [
2057
- 'lawsuitOtherParty',
2058
- ...nextStepsLegalDefault
2059
- ]
2102
+ values: {
2103
+ 'Civil_Defense': {
2104
+ 'Yes': TOLPNextSteps["Defend a Lawsuit"],
2105
+ 'No': TOLPNextSteps["File a Lawsuit"],
2106
+ },
2107
+ '*': [
2108
+ 'lawsuitOtherParty',
2109
+ ...nextStepsLegalDefault
2110
+ ]
2111
+ }
2060
2112
  });
2061
2113
 
2062
2114
  ({
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
- ]
2115
+ values: {
2116
+ 'Type_Of_Legal_Problem': {
2117
+ 'Defend a Lawsuit': TOLPNextSteps["Defend a Lawsuit"],
2118
+ 'File a Lawsuit': TOLPNextSteps["File a Lawsuit"],
2119
+ },
2120
+ '*': [
2121
+ 'lawsuitOtherParty',
2122
+ ...nextStepsLegalDefault
2123
+ ]
2124
+ }
2071
2125
  });
2072
2126
 
2073
2127
  ({
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
- ]
2128
+ values: {
2129
+ 'Type_Of_Legal_Problem_Display': {
2130
+ 'Automobile Accident': TOLPNextSteps["Auto and Car Accidents"],
2131
+ 'Contract Disputes': TOLPNextSteps["Business Lawyers"],
2132
+ 'Dog Bite': TOLPNextSteps["Personal Injury"],
2133
+ 'Employment and Workplace': TOLPNextSteps["Employment and Workplace"],
2134
+ 'Fraud': TOLPNextSteps["Consumer Lawyers"],
2135
+ 'Medical Malpractice': TOLPNextSteps["Medical Malpractice"],
2136
+ 'Personal Injury': TOLPNextSteps["Personal Injury"],
2137
+ 'Property Damage': TOLPNextSteps["Property Damage"],
2138
+ 'Real Estate': TOLPNextSteps["Real Estate"],
2139
+ 'Not Sure or Other': nextStepsMapGeneralLegal["values"]["*"],
2140
+ },
2141
+ '*': [
2142
+ 'lawsuitOtherParty',
2143
+ ...nextStepsLegalDefault
2144
+ ]
2145
+ }
2090
2146
  });
2091
2147
 
2092
2148
  ({
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
- ]
2149
+ values: {
2150
+ 'Type_Of_Legal_Problem_Display': {
2151
+ 'Wrongful Termination': TOLPNextSteps["Wrongful Termination"],
2152
+ 'Workers Compensation': TOLPNextSteps["Workers Compensation"],
2153
+ 'Personal Injury': TOLPNextSteps["Personal Injury"],
2154
+ 'Unemployment': TOLPNextSteps["Unemployment"],
2155
+ },
2156
+ '*': [
2157
+ 'numEmployeesOfBusiness',
2158
+ 'employerType',
2159
+ 'employeeAtCompany',
2160
+ ...nextStepsLegalDefault
2161
+ ]
2162
+ }
2105
2163
  });
2106
2164
 
2107
2165
  ({
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
- ]
2166
+ values: {
2167
+ 'Type_Of_Legal_Problem_Display': {
2168
+ 'Foreclosure': TOLPNextSteps["Foreclosure"],
2169
+ 'Landlord and Tenant': TOLPNextSteps["Landlord and Tenant"],
2170
+ 'Wills, Trusts, and Estates': TOLPNextSteps["Wills and Trusts"],
2171
+ 'Property Damage': TOLPNextSteps['Property Damage'],
2172
+ },
2173
+ '*': [
2174
+ 'realEstateArea',
2175
+ 'wouldLikeLawyerTo',
2176
+ ...nextStepsLegalDefault
2177
+ ]
2178
+ }
2119
2179
  });
2120
2180
 
2121
- const meta = defaultMetaProps();
2181
+ const nextStepsMapLegalCrossSells = {
2182
+ values: {
2183
+ 'Legal_CrossSells': {
2184
+ 'Auto and Car Accidents': ['autoAndCarAccidentCrossSellQuestions'],
2185
+ 'Personal Injury': ['personalInjuryCrossSellQuestions'],
2186
+ 'Workers Compensation': ['workersCompensationCrossSellQuestions'],
2187
+ 'DUI and DWI': ['duiAndDWICrossSellQuestions'],
2188
+ 'Long Term Disability': ['longTermDisabilityCrossSellQuestions'],
2189
+ 'Social Security Disability and Insurance': ['ssdiCrossSellQuestions'],
2190
+ 'Bankruptcy': ['bankruptcyCrossSellQuestions'],
2191
+ 'Power of Attorney': ['powerOfAttorneyCrossSellQuestions'],
2192
+ 'Wills and Trusts': ['willsAndTrustsCrossSellQuestions'],
2193
+ 'Divorce and Separation': ['divorceAndSeparationCrossSellQuestions'],
2194
+ 'Child Custody': ['childCustodyCrossSellQuestions'],
2195
+ },
2196
+ '*': ['firstAndLast', 'contactInfo'],
2197
+ },
2198
+
2199
+ // NOTE: this assumes a certain placement of the cross sell question
2200
+ // in the form flow.
2201
+ appendSteps: ['firstAndLast', 'contactInfo'],
2202
+ matchesAllowed: 1,
2203
+ };
2204
+
2205
+ const legalCrossSellOptionMap = CROSS_SELL_OPTION_MAP_LEGAL;
2206
+
2207
+ const meta = defaultMetaPropsLegal();
2122
2208
 
2123
2209
  meta.data.dynamicSchema = [
2124
2210
  zipcode(),
@@ -2136,7 +2222,8 @@ meta.data.dynamicSchema = [
2136
2222
  headlineClass: '!t-text-dark',
2137
2223
  }),
2138
2224
  legalCrossSells({
2139
- headlineClass: '!t-text-dark'
2225
+ headlineClass: '!t-text-dark',
2226
+ nextStepMap: nextStepsMapLegalCrossSells,
2140
2227
  }),
2141
2228
  // Note: this is purposefully limited to a subset of values
2142
2229
  // that could show up in the Legal_CrossSells input because
@@ -2159,7 +2246,8 @@ const schema = [
2159
2246
  $cmp: 'FormKit',
2160
2247
  props: formProps({
2161
2248
  formId: 'childAndFamilySingle',
2162
- redirectMap: legalRedirectMap()
2249
+ redirectMap: legalRedirectMap(),
2250
+ crossSellOptionMap: legalCrossSellOptionMap
2163
2251
  }),
2164
2252
  children: [
2165
2253
  progressBar(),