bhl-forms 0.6.5 → 0.6.7

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 (77) hide show
  1. package/dist/bhl-forms.iife.js +1 -1
  2. package/dist/bhl-forms.modern.iife.js +1 -1
  3. package/dist/bhl-forms.modern.umd.js +1 -1
  4. package/dist/bhl-forms.umd.js +1 -1
  5. package/dist/forms/accidentsAndInjuries.es.js +1442 -862
  6. package/dist/forms/accidentsAndInjuries.iife.js +1 -1
  7. package/dist/forms/accidentsAndInjuries.json +1 -1
  8. package/dist/forms/appraisals.es.js +115 -115
  9. package/dist/forms/appraisals.iife.js +1 -1
  10. package/dist/forms/childAndFamily.es.js +790 -764
  11. package/dist/forms/childAndFamily.iife.js +1 -1
  12. package/dist/forms/childAndFamily.json +1 -1
  13. package/dist/forms/childAndFamilySingle.es.js +1136 -757
  14. package/dist/forms/childAndFamilySingle.iife.js +1 -1
  15. package/dist/forms/childAndFamilySingle.json +1 -1
  16. package/dist/forms/civilLawsuit.es.js +2001 -1352
  17. package/dist/forms/civilLawsuit.iife.js +1 -1
  18. package/dist/forms/civilLawsuit.json +1 -1
  19. package/dist/forms/coins.es.js +115 -115
  20. package/dist/forms/coins.iife.js +1 -1
  21. package/dist/forms/contracts.es.js +1454 -715
  22. package/dist/forms/contracts.iife.js +1 -1
  23. package/dist/forms/contracts.json +1 -1
  24. package/dist/forms/criminal.es.js +1891 -2482
  25. package/dist/forms/criminal.iife.js +1 -1
  26. package/dist/forms/criminal.json +1 -1
  27. package/dist/forms/employmentAndWorkplace.es.js +2178 -934
  28. package/dist/forms/employmentAndWorkplace.iife.js +1 -1
  29. package/dist/forms/employmentAndWorkplace.json +1 -1
  30. package/dist/forms/generalLegal.es.js +854 -808
  31. package/dist/forms/generalLegal.iife.js +1 -1
  32. package/dist/forms/generalLegal.json +1 -1
  33. package/dist/forms/generalLegalPopUnder.es.js +854 -807
  34. package/dist/forms/generalLegalPopUnder.iife.js +1 -1
  35. package/dist/forms/generalLegalPopUnder.json +1 -1
  36. package/dist/forms/generalLegalPopUnderSingle.es.js +4383 -0
  37. package/dist/forms/generalLegalPopUnderSingle.iife.js +1 -0
  38. package/dist/forms/generalLegalPopUnderSingle.json +1 -0
  39. package/dist/forms/generalLegalSingle.es.js +1672 -1629
  40. package/dist/forms/generalLegalSingle.iife.js +1 -1
  41. package/dist/forms/generalLegalSingle.json +1 -1
  42. package/dist/forms/generalLegalThankYou.es.js +710 -695
  43. package/dist/forms/generalLegalThankYou.iife.js +1 -1
  44. package/dist/forms/generalLegalThankYou.json +1 -1
  45. package/dist/forms/harassmentAndDiscrimination.es.js +1465 -681
  46. package/dist/forms/harassmentAndDiscrimination.iife.js +1 -1
  47. package/dist/forms/harassmentAndDiscrimination.json +1 -1
  48. package/dist/forms/malpractice.es.js +1764 -1066
  49. package/dist/forms/malpractice.iife.js +1 -1
  50. package/dist/forms/malpractice.json +1 -1
  51. package/dist/forms/mechanics.es.js +115 -115
  52. package/dist/forms/mechanics.iife.js +1 -1
  53. package/dist/forms/realEstate.es.js +1557 -1209
  54. package/dist/forms/realEstate.iife.js +1 -1
  55. package/dist/forms/realEstate.json +1 -1
  56. package/dist/forms/repossession.es.js +1811 -1085
  57. package/dist/forms/repossession.iife.js +1 -1
  58. package/dist/forms/repossession.json +1 -1
  59. package/dist/forms/ssdi.es.js +672 -672
  60. package/dist/forms/ssdi.iife.js +1 -1
  61. package/dist/forms/ssdi.json +1 -1
  62. package/dist/forms/testForm.es.js +473 -468
  63. package/dist/forms/testForm.iife.js +1 -1
  64. package/dist/forms/testForm.json +1 -1
  65. package/dist/forms/testRedirects.es.js +105 -102
  66. package/dist/forms/testRedirects.iife.js +1 -1
  67. package/dist/forms/testRedirects.json +1 -1
  68. package/dist/forms/vets.es.js +115 -115
  69. package/dist/forms/vets.iife.js +1 -1
  70. package/dist/forms/willsAndTrusts.es.js +1298 -705
  71. package/dist/forms/willsAndTrusts.iife.js +1 -1
  72. package/dist/forms/willsAndTrusts.json +1 -1
  73. package/dist/main.css +1 -1
  74. package/package.json +1 -1
  75. package/dist/forms/generalLegalPopUnderTF.es.js +0 -3087
  76. package/dist/forms/generalLegalPopUnderTF.iife.js +0 -1
  77. package/dist/forms/generalLegalPopUnderTF.json +0 -1
@@ -15,1206 +15,1937 @@ const DEFAULT_FINAL_HEADLINE_DYNAMIC = '$getKey($meta, "finalHeadlines." + $get(
15
15
  const DEFAULT_FINAL_SUBHEADLINE = 'You may benefit from speaking with a legal professional. Please verify your contact information.';
16
16
  const DEFAULT_FINAL_SUBHEADLINE_DYNAMIC = '$getKey($meta, "finalSubHeadlines." + $get(Type_Of_Legal_Problem).value, $meta.defaultFinalSubHeadline)';
17
17
 
18
- const formPropDefaults = {
19
- type: 'form',
20
- id: 'form',
21
- config: { validationVisibility: 'submit' },
22
- onSubmit: '$submit($submitUrl, $prepData, $handleRedirect, "text/plain; charset=UTF-8")',
23
- plugins: '$plugins',
24
- actions: false,
25
- anchorElement: 'form-anchor',
26
- useLocalStorage: true,
27
- prepop: {
28
- fromURL: true
29
- },
30
- errorCodes: {
31
- 403: { message: "An Error Occurred", abort: false },
32
- 409: { abort: false },
33
- 429: "An Error Occurred",
34
- 504: { message: "An Error Occurred", abort: false },
35
- },
36
- formClass: '!t-max-w-[40rem]'
37
- };
18
+ // ------ Common Base Settings
38
19
 
39
- function formProps(updates) {
40
- const props = merge(
41
- formPropDefaults,
42
- updates
43
- );
44
- if (props.formId && !props.name) {
45
- props.name = props.formId;
20
+ const checkbox = (updates) => {
21
+ if (updates.name && !updates.id) {
22
+ updates.id = updates.name;
46
23
  }
47
- return props
48
- }
24
+ return merge({
25
+ $formkit: 'checkbox',
26
+ validation: 'required',
27
+ validationMessages: {
28
+ required: 'Field is required'
29
+ }
30
+ }, updates)
31
+ };
49
32
 
50
- const metaDefaults = {
51
- tcpaLanguage: TCPA_LANGUAGE
33
+ const sbsCheckbox = (updates) => {
34
+ updates.legendClass = 'legend-left required';
35
+ updates.fieldsetClass = '$reset side-by-side';
36
+ updates.optionsClass = 't-pl-1';
37
+ updates.innerClass = 't-flex t-items-center';
38
+ updates.wrapperClass = 't-mb-3';
39
+ return checkbox(updates)
52
40
  };
53
41
 
54
- function metaProps(updates) {
55
- const data = merge(
56
- metaDefaults,
57
- updates
58
- );
59
- return {
60
- type: 'meta',
61
- data
42
+ const col2Checkbox = (updates) => {
43
+ if (!updates || !updates.legendClass) {
44
+ updates.legendClass = 'required';
62
45
  }
63
- }
64
-
65
- function defaultMetaProps() {
66
- return metaProps({
67
- defaultCommentsPlaceholder: DEFAULT_COMMENTS_PLACEHOLDER_DYNAMIC,
68
- commentsPlaceholders: TOLPCommentsPlaceholders,
69
- defaultFinalHeadline: DEFAULT_FINAL_HEADLINE,
70
- finalHeadlines: TOLPFinalHeadlines,
71
- defaultFinalSubHeadline: DEFAULT_FINAL_SUBHEADLINE,
72
- finalSubHeadlines: TOLPFinalSubHeadlines,
73
- // Added everywhere for now
74
- // trustedFormTOLPs: trustedFormTOLPs
75
- })
76
- }
46
+ updates.fieldsetClass = '$reset';
47
+ updates.optionsClass = 't-pl-8 md:t-pl-2 t-pt-3 t-grid t-grid-cols-1 md:t-grid-cols-2';
48
+ updates.innerClass = 't-items-start';
49
+ updates.wrapperClass = '$reset t-flex t-cursor-pointer t-mb-3';
50
+ return checkbox(updates)
51
+ };
77
52
 
78
- const formAnchorDefaults = {
79
- $el: 'div',
80
- children: [
81
- {
82
- $el: 'div',
83
- attrs: {
84
- id: 'form-anchor',
85
- class: 't-absolute',
86
- style: { top: '-30px', left: 0 }
87
- }
88
- }
89
- ],
90
- attrs: {
91
- class: 't-relative'
53
+ const radio = (updates) => {
54
+ if (updates.name && !updates.id) {
55
+ updates.id = updates.name;
92
56
  }
57
+ return merge({
58
+ $formkit: 'radio',
59
+ validation: 'required',
60
+ validationMessages: {
61
+ required: 'Field is required'
62
+ },
63
+ optionsClass: 't-pt-3 t-pl-1',
64
+ legendClass: 'required'
65
+ }, updates)
93
66
  };
94
67
 
95
- function formAnchor(updates) {
96
- return merge(
97
- formAnchorDefaults,
98
- updates
99
- )
100
- }
68
+ const col2Radio = (updates) => {
69
+ updates.legendClass = 'required';
70
+ updates.fieldsetClass = '$reset';
71
+ updates.optionsClass = 't-pl-2 t-pt-3 t-grid t-grid-cols-1 md:t-grid-cols-2';
72
+ updates.innerClass = 't-items-start';
73
+ updates.wrapperClass = '$reset t-flex t-cursor-pointer t-mb-3';
74
+ return radio(updates)
75
+ };
101
76
 
102
- function headlineDefaults(updates = {}) {
103
- return {
104
- $el: 'h1',
105
- attrs: {
106
- class: 't-flex t-justify-center t-text-center !t-text-[2rem] t-font-semibold t-pt-5 t-px-7 md:t-px-3' + ' ' + (updates.headlineClass || '')
107
- }
77
+ const sbs2ColRadio = (updates) => {
78
+ updates.legendClass = 'legend-left-flex md:t-max-w-[40%] required';
79
+ updates.fieldsetClass = '$reset side-by-side-flex';
80
+ updates.optionsClass = 'md:t-ml-4 md:t-mt-2 t-grid t-grid-cols-1 md:t-grid-cols-2-125';
81
+ updates.innerClass = 't-flex t-items-start';
82
+ updates.wrapperClass = '$reset t-flex t-cursor-pointer t-mb-3';
83
+ return radio(updates)
84
+ };
85
+
86
+ const sbs2ItemRadio = (updates) => {
87
+ updates.legendClass = 'legend-left t-pb-1 required';
88
+ updates.fieldsetClass = '$reset side-by-side t-items-center';
89
+ updates.optionsClass = 't-mt-1 t-grid t-grid-cols-1 md:t-grid-cols-2-125 t-items-center';
90
+ updates.innerClass = 't-flex t-items-center';
91
+ updates.optionClass = 't-pr-1';
92
+ return radio(updates)
93
+ };
94
+
95
+ const sbsYesNoRadio = (updates) => {
96
+ updates.options = ['Yes', 'No'];
97
+ return sbs2ItemRadio(updates)
98
+ };
99
+
100
+ const select = (updates) => {
101
+ if (updates.name && !updates.id) {
102
+ updates.id = updates.name;
108
103
  }
109
- }
104
+ return merge({
105
+ $formkit: 'select',
106
+ placeholder: "Please Select",
107
+ validation: 'required',
108
+ validationMessages: {
109
+ required: 'Field is required'
110
+ },
111
+ inputClass: 't-bg-white',
112
+ labelClass: 'required'
113
+ }, updates)
114
+ };
110
115
 
111
- function headline(updates = {}) {
112
- return merge(
113
- headlineDefaults(updates),
114
- updates
115
- )
116
- }
116
+ const sbsSelect = (updates) => {
117
+ updates.labelClass = 'required';
118
+ updates.wrapperClass = 'side-by-side t-items-center';
119
+ updates.innerClass = 'select-height-content';
120
+ updates.helpClass = 't-mt-2.5 md:t-text-right md:t-mt-[-5px]';
121
+ return select(updates)
122
+ };
117
123
 
118
- function subHeadlineDefaults(updates = {}) {
119
- return {
120
- $el: 'h3',
121
- attrs: {
122
- class: 't-flex t-justify-center t-text-center !t-text-[1.2rem] t-font-medium t-text-blue-500 t-px-10' + ' ' + (updates.subheadlineClass || '')
123
- }
124
+ const text = (updates) => {
125
+ if (updates.name && !updates.id) {
126
+ updates.id = updates.name;
124
127
  }
125
- }
128
+ return merge({
129
+ $formkit: 'text',
130
+ validation: 'required',
131
+ validationMessages: {
132
+ required: 'Field is required'
133
+ },
134
+ labelClass: 'required'
135
+ }, updates)
136
+ };
126
137
 
127
- function subHeadline(updates = {}) {
128
- return merge(
129
- subHeadlineDefaults(updates),
130
- updates
131
- )
132
- }
138
+ const sbsText = (updates) => {
139
+ updates.wrapperClass = 'side-by-side t-items-center';
140
+ return text(updates)
141
+ };
133
142
 
134
- const secureIconDefault = {
135
- $el: 'div',
136
- if: '$activeStep === $lastStep()',
137
- attrs: {
138
- class: 't-flex t-justify-center t-items-center t-text-sm t-text-gray-500'
139
- },
140
- children: [
141
- {
142
- $el: 'img',
143
- attrs: {
144
- loading: 'lazy',
145
- alt: '',
146
- style: {
147
- border: 0
148
- },
149
- width: '25',
150
- height: '25',
151
- src: 'https://d27hmee62k45vz.cloudfront.net/lock_icon_1.jpeg',
152
- }
143
+ const textArea = (updates) => {
144
+ if (updates.name && !updates.id) {
145
+ updates.id = updates.name;
146
+ }
147
+ return merge({
148
+ $formkit: 'textarea',
149
+ rows: 5,
150
+ maxlength: 500,
151
+ validation: 'required',
152
+ validationMessages: {
153
+ required: 'Field is required'
153
154
  },
154
- {
155
- $el: 'span',
156
- children: 'Secure & Encrypted',
157
- attrs: {
158
- class: 't-pl-2 t-pt-1 t-font-medium'
159
- }
160
- }
161
- ]
155
+ innerClass: 't-max-w-xl',
156
+ labelClass: 'required'
157
+ }, updates)
162
158
  };
163
159
 
160
+ const date = (updates) => {
161
+ if (updates.name && !updates.id) {
162
+ updates.id = updates.name;
163
+ }
164
+ return merge({
165
+ $formkit: 'DatePicker',
166
+ validation: 'required',
167
+ validationMessages: {
168
+ required: 'Field is required'
169
+ },
170
+ labelClass: 'required t-block t-mb-3 t-font-semibold t-text-base formkit-invalid:t-text-red-500',
171
+ innerClass: 't-border t-border-gray-400 formkit-invalid:t-border-red-500 t-rounded t-mb-1 focus-within:t-border-blue-500'
172
+ }, updates)
173
+ };
164
174
 
165
- function secureIcon(updates) {
166
- return merge(
167
- secureIconDefault,
168
- updates
169
- )
170
- }
175
+ const sbsDate = (updates) => {
176
+ updates.wrapperClass = 'side-by-side t-items-center';
177
+ return date(updates)
178
+ };
171
179
 
172
- const hiddenInputsBase = [
173
- {
174
- $formkit: 'hidden',
175
- name: "gclid",
176
- value: null
180
+ const applicantAge = (scope) => sbsText({
181
+ name: scope ? scope + ':' + 'Applicant_Age' : 'Applicant_Age',
182
+ label: 'Age of Applicant?',
183
+ placeholder: 'Age between 18 and 65',
184
+ maxlength: 2,
185
+ inputmode: "numeric",
186
+ validation: "required|min:18,max:65",
187
+ validationMessages: {
188
+ required: 'Applicant Age is required',
189
+ min: 'Invalid Age - must be between 18 and 65',
190
+ max: 'Invalid Age - must be between 18 and 65',
191
+ }
192
+ });
193
+
194
+ const atFault = (scope) => sbsYesNoRadio({
195
+ name: scope ? scope + ':' + 'At_Fault' : 'At_Fault',
196
+ label: 'Were You at Fault?'
197
+ });
198
+
199
+ const bankruptcyCrossSell = () => sbsCheckbox({
200
+ label: "I'd also like a consult for bankruptcy or debt elimination (optional)",
201
+ help: "Note: you will be contacted separately by a bankruptcy/debt expert",
202
+ name: 'CrossSell_Bankruptcy',
203
+ id: 'CrossSell_Bankruptcy',
204
+ if: '$getVal($get(form), "Type_Of_Legal_Problem") != "Bankruptcy" && ($getVal($get(form), "Degree_Of_Interest") == "Absolutely Can\'t Afford" || $getVal($get(form), "Degree_Of_Interest") == "Maybe" || $getVal($get(form), "Degree_Of_Interest") == "Probably")',
205
+ validation: null,
206
+ helpClass: "!t-text-sm"
207
+ });
208
+
209
+ const bloodContentAlcoholTest = (scope) => sbsSelect({
210
+ name: scope ? scope + ':' + 'Blood_Alcohol_Content_Test' : 'Blood_Alcohol_Content_Test',
211
+ label: 'Blood Alcohol Content Measured by Test:',
212
+ options: [
213
+ "No Test",
214
+ "0.00% - 0.04%",
215
+ "0.05% - 0.08%",
216
+ "0.09% - 0.12%",
217
+ "0.13% - 0.16%",
218
+ "0.17% - 0.20%",
219
+ "More than 0.20%",
220
+ "Don't know"
221
+ ]
222
+ });
223
+
224
+ const causeOfInjury = (scope) => sbsSelect({
225
+ name: scope ? scope + ':' + 'Cause_Of_Injury' : 'Cause_Of_Injury',
226
+ label: 'Cause of Injury:',
227
+ options: [
228
+ "Traumatic Physical Injury (Accident)",
229
+ "Repeated Trauma Injury",
230
+ "Mental Injury",
231
+ "Occupational Disease",
232
+ "Not Sure"
233
+ ]
234
+ });
235
+
236
+ const childHome = (scope) => sbsSelect({
237
+ name: scope ? scope + ':' + 'Child_Home' : 'Child_Home',
238
+ label: 'With Whom Do the Children Currently Live?',
239
+ options: [
240
+ 'Mother',
241
+ 'Father',
242
+ 'Grandparents',
243
+ 'Other'
244
+ ]
245
+ });
246
+
247
+ const childPrimaryCaregiver = (scope) => sbsSelect({
248
+ name: scope ? scope + ':' + 'Child_Primary_Caregiver' : 'Child_Primary_Caregiver',
249
+ label: 'Who is the Primary Caregiver?',
250
+ options: [
251
+ 'Mother',
252
+ 'Father',
253
+ 'Other'
254
+ ]
255
+ });
256
+
257
+ const childRelationship = (scope) => sbsSelect({
258
+ name: scope ? scope + ':' + 'Child_Relationship' : 'Child_Relationship',
259
+ label: 'Your Relationship to Child(ren):',
260
+ options: [
261
+ 'Father',
262
+ 'Mother',
263
+ 'Grandparent',
264
+ 'Aunt/Uncle',
265
+ 'Other'
266
+ ]
267
+ });
268
+
269
+ const claimStatus = (scope) => sbsSelect({
270
+ name: scope ? scope + ':' + 'Claim_Status' : 'Claim_Status',
271
+ label: "Status of Claim:",
272
+ options: [
273
+ "No action taken yet",
274
+ "Demand for compensation made",
275
+ "Lawsuit filed",
276
+ "Other"
277
+ ]
278
+ });
279
+
280
+ const comments = (updates, scope) => textArea(
281
+ merge({
282
+ name: scope ? scope + ':' + 'Comments' : 'Comments',
283
+ label: 'Please briefly describe your situation in a few words:',
284
+ placeholder: 'For Example: "I would like help with child support payments" or "I need help with visitation rights"'
285
+ }, updates)
286
+ );
287
+
288
+ const degreeOfInterest = (scope, help) => sbsSelect({
289
+ name: scope ? scope + ':' + 'Degree_Of_Interest' : 'Degree_Of_Interest',
290
+ id: scope ? scope + ':' + 'Degree_Of_Interest' : 'Degree_Of_Interest',
291
+ label: 'How Likely Are You to Pay if Your Issue Could be Resolved?',
292
+ help: help,
293
+ options: [
294
+ 'Definitely',
295
+ 'Probably',
296
+ 'Maybe',
297
+ "Absolutely Can't Afford"
298
+ ]
299
+ });
300
+
301
+ const degreeOfInterestHelp = (scope) => degreeOfInterest(scope, 'No payment necessary to speak with lawyers.');
302
+
303
+ const disabilityConditionStopWork = (scope) => sbsYesNoRadio({
304
+ name: scope ? scope + ':' + 'Disability_Condition_Stop_Work' : 'Disability_Condition_Stop_Work',
305
+ label: 'Do You Expect To Be Out Of Work For At Least a Year Due To Your Health?'
306
+ });
307
+
308
+ const disabilityWorkHistory = (scope) => sbsYesNoRadio({
309
+ name: scope ? scope + ':' + 'Disability_Work_History' : 'Disability_Work_History',
310
+ label: 'Have You Had a Full-Time Job Within the Past 5 Years?'
311
+ });
312
+
313
+ const doctorTreatment = (scope) => sbsYesNoRadio({
314
+ name: scope ? scope + ':' + 'Doctor_Treatment' : 'Doctor_Treatment',
315
+ label: 'Have You Recently Been Treated by a Doctor, Hospital or Clinic?',
316
+ });
317
+
318
+ const email = () => sbsText({
319
+ $formkit: 'email',
320
+ name: 'Email',
321
+ label: 'Email Address:',
322
+ placeholder: 'email@domain.com',
323
+ autocomplete: 'email',
324
+ 'data-tf-sensitive': 'false',
325
+ validation: 'required|email',
326
+ validationMessages: {
327
+ required: 'Email is required',
328
+ email: 'Invalid Email'
329
+ }
330
+ });
331
+
332
+ const estateLegalServicesNeeded = (scope) => sbsSelect({
333
+ name: scope ? scope + ':' + 'Estate_Legal_Services_Needed' : 'Estate_Legal_Services_Needed',
334
+ label: "Legal Services Needed for Your Estate:",
335
+ options: [
336
+ "Charitable Giving",
337
+ "Contested Wills",
338
+ "Drafting Wills or Trust",
339
+ "Estate Administration",
340
+ "Asset Protection",
341
+ "Other"
342
+ ]
343
+ });
344
+
345
+ const firstName = () => sbsText({
346
+ $formkit: 'text',
347
+ label: 'First Name:',
348
+ placeholder: 'First',
349
+ name: 'First_Name',
350
+ autocomplete: "given-name",
351
+ validationMessages: {
352
+ required: 'First Name is required'
353
+ }
354
+ });
355
+
356
+ const haveAttorney = (scope) => sbsYesNoRadio({
357
+ name: scope ? scope + ':' + 'Have_Attorney' : 'Have_Attorney',
358
+ label: 'Already Working with An Attorney?'
359
+ });
360
+
361
+ const haveChildren = (scope) => sbsYesNoRadio({
362
+ name: scope ? scope + ':' + 'Have_Children' : 'Have_Children',
363
+ label: 'Do You Have Children?'
364
+ });
365
+
366
+ const incidentDate = (scope) => sbsDate({
367
+ name: scope ? scope + ':' + 'Incident_Date' : 'Incident_Date',
368
+ label: 'Date of Incident:',
369
+ });
370
+
371
+ const lastName = () => sbsText({
372
+ $formkit: 'text',
373
+ label: 'Last Name:',
374
+ placeholder: 'Last',
375
+ name: 'Last_Name',
376
+ autocomplete: "family-name",
377
+ validationMessages: {
378
+ required: 'Last Name is required'
379
+ }
380
+ });
381
+
382
+ const lawsuitOtherParty = () => sbsSelect({
383
+ label: 'The Other Party is a:',
384
+ name: 'Lawsuit_Other_Party',
385
+ options: [
386
+ "Individual",
387
+ "Small Business",
388
+ "Large Corporation",
389
+ "Government Entity"
390
+ ]
391
+ });
392
+
393
+ const lawyerPaymentMethod = (scope) => sbsSelect({
394
+ name: scope ? scope + ':' + 'Lawyer_Payment_Method' : 'Lawyer_Payment_Method',
395
+ label: 'How Will You Pay for Legal Fees if You Hire a Lawyer?',
396
+ help: 'No payment necessary to speak with lawyers.',
397
+ options: [
398
+ 'Cash',
399
+ 'Check',
400
+ 'Credit Card',
401
+ 'Friend',
402
+ 'Family',
403
+ 'Other'
404
+ ]
405
+ });
406
+
407
+ const legalCrossSells$1 = () => col2Checkbox({
408
+ id: 'Legal_CrossSells',
409
+ name: 'Legal_CrossSells',
410
+ help: 'Just hit "Next" if none apply',
411
+ helpClass: 't-text-center !t-text-sm',
412
+ validation: null,
413
+ options: {
414
+ if: '$getVal($get(form), "Type_Of_Legal_Problem") === "Auto and Car Accidents"',
415
+ then: {
416
+ 'Social Security Disability and Insurance': 'Interest in Disability Benefits',
417
+ 'Wills and Trusts': 'Need a Will or Trust',
418
+ 'Workers Compensation': 'Workplace Injury',
419
+ 'Power of Attorney': 'Update Power of Attorney',
420
+ 'Divorce and Separation': 'Need a Divorce or Separation',
421
+ 'Child Custody': 'Need help with Child Custody',
422
+ },
423
+ else: {
424
+ if: '$getVal($get(form), "Type_Of_Legal_Problem") === "Personal Injury" || $getVal($get(form), "Type_Of_Legal_Problem") === "Workers Compensation"',
425
+ then: {
426
+ 'DUI and DWI': 'Involved in a DUI/DWI',
427
+ 'Wills and Trusts': 'Need a Will or Trust',
428
+ 'Power of Attorney': 'Update Power of Attorney',
429
+ 'Divorce and Separation': 'Need a Divorce or Separation',
430
+ 'Child Custody': 'Need help with Child Custody',
431
+ // TODO add one more?
432
+ },
433
+ else: {
434
+ if: '$getVal($get(form), "Type_Of_Legal_Problem") === "DUI and DWI"',
435
+ then: {
436
+ 'Personal Injury': 'Personal or Workplace Injury',
437
+ 'Wills and Trusts': 'Need a Will or Trust',
438
+ 'Social Security Disability and Insurance': 'Interest in Disability Benefits',
439
+ 'Power of Attorney': 'Update Power of Attorney',
440
+ 'Divorce and Separation': 'Need a Divorce or Separation',
441
+ 'Child Custody': 'Need help with Child Custody',
442
+ },
443
+ else: {
444
+ 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"',
445
+ then: {
446
+ 'Auto and Car Accidents': 'Injured in a Car Accident',
447
+ 'Personal Injury': 'Personal or Workplace Injury',
448
+ 'DUI and DWI': 'Involved in a DUI/DWI',
449
+ 'Social Security Disability and Insurance': 'Interest in Disability Benefits',
450
+ 'Divorce and Separation': 'Need a Divorce or Separation',
451
+ 'Child Custody': 'Need help with Child Custody',
452
+ },
453
+ else: {
454
+ if: '$getVal($get(form), "Type_Of_Legal_Problem") === "Long Term Disability" || $getVal($get(form), "Type_Of_Legal_Problem") === "Social Security Disability and Insurance"',
455
+ then: {
456
+ 'Auto and Car Accidents': 'Injured in a Car Accident',
457
+ 'DUI and DWI': 'Involved in a DUI/DWI',
458
+ 'Wills and Trusts': 'Need a Will or Trust',
459
+ 'Power of Attorney': 'Update Power of Attorney',
460
+ 'Divorce and Separation': 'Need a Divorce or Separation',
461
+ 'Child Custody': 'Need help with Child Custody',
462
+ },
463
+ else: {
464
+ 'Auto and Car Accidents': 'Injured in a Car Accident',
465
+ 'Personal Injury': 'Personal or Workplace Injury',
466
+ 'DUI and DWI': 'Involved in a DUI/DWI',
467
+ 'Wills and Trusts': 'Need a Will or Trust',
468
+ 'Power of Attorney': 'Update Power of Attorney',
469
+ 'Social Security Disability and Insurance': 'Interest in Disability Benefits',
470
+ }
471
+ }
472
+ }
473
+ }
474
+ }
475
+ }
476
+ });
477
+
478
+ const maritalStatus = (scope) => sbsSelect({
479
+ name: scope ? scope + ':' + 'Marital_Status' : 'Marital_Status',
480
+ label: 'Marital Status:',
481
+ options: [
482
+ 'Unmarried, Living Together',
483
+ 'Unmarried, Do Not Live Together',
484
+ 'Married, Living Together',
485
+ 'Separated',
486
+ 'Divorced',
487
+ 'Other'
488
+ ]
489
+ });
490
+
491
+ const ownRealEstate = () => sbsYesNoRadio({
492
+ name: 'Own_Real_Estate',
493
+ label: 'Do You Own Real Estate?'
494
+ });
495
+
496
+ const pendingCharges = (scope) => sbsYesNoRadio({
497
+ name: scope ? scope + ':' + 'Pending_Charges' : 'Pending_Charges',
498
+ label: 'Do you currently have any pending charges?'
499
+ });
500
+
501
+ const phone = () => sbsText({
502
+ $formkit: 'tel',
503
+ name: 'Primary_Phone',
504
+ label: 'Phone Number:',
505
+ placeholder: '###-###-####',
506
+ maxlength: 12,
507
+ help: '10-digit phone number, hyphens optional',
508
+ autocomplete: 'tel-national',
509
+ 'data-tf-sensitive': 'false',
510
+ validation: 'required|matches:/^[0-9]{3}-?[0-9]{3}-?[0-9]{4}$/|valid_phone',
511
+ validationMessages: {
512
+ required: 'Field is required',
513
+ matches: 'Invalid Phone Format, use ###-###-####',
514
+ valid_phone: 'Invalid Phone Number'
177
515
  },
178
- {
179
- $formkit: 'hidden',
180
- name: "campaignid",
181
- value: null
516
+ helpClass: "t-mt-2.5 md:t-text-right md:t-mt-[-2px]"
517
+ });
518
+
519
+ const primaryInjury = (scope) => sbs2ColRadio({
520
+ name: scope ? scope + ':' + 'Primary_Injury' : 'Primary_Injury',
521
+ label: 'Primary Injury:',
522
+ options: [
523
+ "Anxiety",
524
+ "Back or Neck Pain",
525
+ "Broken Bones",
526
+ "Cuts and Bruises",
527
+ "Headaches",
528
+ "Memory Loss",
529
+ "Loss of Limb",
530
+ "Not Sure or Other"
531
+ ]
532
+ });
533
+
534
+ const priorAlcoholOffenses = (scope) => sbsYesNoRadio({
535
+ name: scope ? scope + ':' + 'Prior_Alcohol_Offenses' : 'Prior_Alcohol_Offenses',
536
+ label: 'Any Prior Alcohol Related Offenses?'
537
+ });
538
+
539
+ const policeReportFiled = (scope) => sbsYesNoRadio({
540
+ name: scope ? scope + ':' + 'Police_Report_Filed' : 'Police_Report_Filed',
541
+ label: 'Was a Police Report Filed?'
542
+ });
543
+
544
+ const repossessionTOLPDisplay = (updates) => col2Radio(merge({
545
+ name: 'Type_Of_Legal_Problem_Display',
546
+ label: 'Select The Repossession Issue:',
547
+ options: [
548
+ 'Vehicle Repossession',
549
+ 'Property Repossession',
550
+ 'Other Repossession Issues'
551
+ ]
552
+ }, updates));
553
+
554
+ const roleInMatterProbate = (scope) => sbsSelect({
555
+ name: scope ? scope + ':' + 'Role_In_Matter_Probate' : 'Role_In_Matter_Probate',
556
+ label: "What Is Your Role in this Matter?",
557
+ options: [
558
+ "Preparing My Will",
559
+ "Executor",
560
+ "Heir",
561
+ "Other"
562
+ ]
563
+ });
564
+
565
+ const socialSecurityDisabilityReceivingBenefits = (scope) => sbsYesNoRadio({
566
+ name: scope ? scope + ':' + 'Social_Security_Disability_Receiving_Benefits' : 'Social_Security_Disability_Receiving_Benefits',
567
+ label: 'Are You Currently Receiving Social Security Disability Benefits?'
568
+ });
569
+
570
+ const totalDebt = () => sbsSelect({
571
+ label: 'Total Debt?',
572
+ name: 'Total_Debt',
573
+ options: [
574
+ "Less than 5K",
575
+ "5K to 10K",
576
+ "10K to 20K",
577
+ "20K to 50K",
578
+ "More than 50K"
579
+ ]
580
+ });
581
+
582
+
583
+ const totalMonthlyIncome = () => sbsSelect({
584
+ label: 'Total Monthly Income?',
585
+ name: 'Total_Monthly_Income',
586
+ options: [
587
+ "Less than 1K",
588
+ "1K to 2K",
589
+ "2K to 3K",
590
+ "3K to 4K",
591
+ "4K to 5K",
592
+ "5K to 7K",
593
+ "7K to 10K",
594
+ "10K to 15K",
595
+ "More than 15K"
596
+ ]
597
+ });
598
+
599
+ const TCPAConsent = () => ({
600
+ $formkit: 'checkbox',
601
+ label: '$meta.tcpaLanguage',
602
+ name: 'TCPA_Opt_In',
603
+ 'data-tf-sensitive': 'false',
604
+ validation: 'required|accepted',
605
+ validationMessages: {
606
+ required: 'Consent is required',
607
+ accepted: 'Consent is required'
182
608
  },
609
+ classes: {
610
+ label: "t-text-xs t-text-slate-500 t-font-normal"
611
+ }
612
+ });
613
+
614
+ const typeOfAlcoholTest = (scope) => sbsSelect({
615
+ name: scope ? scope + ':' + 'Type_Of_Alcohol_Test' : 'Type_Of_Alcohol_Test',
616
+ label: 'Type of Alcohol Test Performed?',
617
+ options: [
618
+ "No Test",
619
+ "Refused Test",
620
+ "Breath Test",
621
+ "Blood Test",
622
+ "Urine Test",
623
+ "Don't Know"
624
+ ]
625
+ });
626
+
627
+ const typeOfAssets = (scope) => col2Checkbox({
628
+ name: scope ? scope + ':' + 'Type_Of_Assets' : 'Type_Of_Assets',
629
+ label: 'Type of Assets:',
630
+ options: [
631
+ "Business Interests",
632
+ "Cash",
633
+ "Life Insurance Policies",
634
+ "Pensions/Retirement",
635
+ "Personal Possessions",
636
+ "Property",
637
+ "Stock/Bonds"
638
+ ]
639
+ });
640
+
641
+ const valueOfAssets = (scope) => sbsSelect({
642
+ name: scope ? scope + ':' + 'Value_Of_Assets' : 'Value_Of_Assets',
643
+ label: 'Value of Your Assets?',
644
+ options: [
645
+ "Less than 50K",
646
+ "50K to 100K",
647
+ "100K to 250K",
648
+ "250K to 500K",
649
+ "500K to 1M",
650
+ "More than 1M"
651
+ ]
652
+ });
653
+
654
+ const zipcode = () => sbsText({
655
+ label: 'Zip Code:',
656
+ placeholder: '#####',
657
+ name: 'Zip',
658
+ maxlength: 5,
659
+ inputmode: "numeric",
660
+ autocomplete: 'postal-code',
661
+ validation: 'required|matches:/^[0-9]{5}$/',
662
+ validationMessages: {
663
+ required: 'Zip Code is required',
664
+ matches: 'Invalid Zip Code'
665
+ }
666
+ });
667
+
668
+
669
+ // ------ Question Groups
670
+
671
+ // NOTE: name must be unique within a form!
672
+ const group = (name, updates) => {
673
+ return merge({
674
+ $cmp: 'FormKit',
675
+ props: {
676
+ type: 'group',
677
+ key: name,
678
+ id: name,
679
+ name: name
680
+ }
681
+ }, updates)
682
+ };
683
+
684
+ const AutoAndCarAccidentsQuestions = (condition, scope) => group(
685
+ 'AutoAndCarAccidentsQuestions',
183
686
  {
184
- $formkit: 'hidden',
185
- name: "s",
186
- value: null
687
+ if: (condition || '$get(Type_Of_Legal_Problem).value == "Auto and Car Accidents"'),
688
+ children: [
689
+ haveAttorney(scope),
690
+ incidentDate(scope),
691
+ atFault(scope),
692
+ primaryInjury(scope),
693
+ doctorTreatment(scope),
694
+ policeReportFiled(scope)
695
+ ]
696
+ }
697
+ );
698
+
699
+ const BankruptcyQuestions = (condition, scope) => group(
700
+ 'BankruptcyQuestions',
701
+ {
702
+ if: (condition || '$get(Type_Of_Legal_Problem).value == "Bankruptcy"'),
703
+ children: [
704
+ haveAttorney(scope),
705
+ totalMonthlyIncome(),
706
+ totalDebt(),
707
+ ownRealEstate(),
708
+ valueOfAssets(scope),
709
+ degreeOfInterestHelp(scope)
710
+ ]
711
+ }
712
+ );
713
+
714
+ const ChildCustodyQuestions = (condition, scope) => group(
715
+ 'ChildCustodyQuestions',
716
+ {
717
+ if: (condition || '$get(Type_Of_Legal_Problem).value == "Child Custody"'),
718
+ children: [
719
+ haveAttorney(scope),
720
+ childRelationship(scope),
721
+ childHome(scope),
722
+ childPrimaryCaregiver(scope),
723
+ degreeOfInterest(scope),
724
+ lawyerPaymentMethod(scope)
725
+ ]
726
+ }
727
+ );
728
+
729
+ const CivilLawsuitQuestions = () => group(
730
+ 'CivilLawsuitQuestions',
731
+ {
732
+ if: '$get(Type_Of_Legal_Problem).value == "Civil Lawsuit"',
733
+ children: [
734
+ haveAttorney(),
735
+ lawsuitOtherParty(),
736
+ degreeOfInterestHelp()
737
+ ]
738
+ }
739
+ );
740
+
741
+ const DebtAndCollectionsQuestions = () => group(
742
+ 'DebtAndCollectionsQuestions',
743
+ {
744
+ if: '$get(Type_Of_Legal_Problem).value == "Debt and Collections"',
745
+ children: [
746
+ haveAttorney(),
747
+ totalMonthlyIncome(),
748
+ totalDebt(),
749
+ ownRealEstate(),
750
+ valueOfAssets(),
751
+ degreeOfInterestHelp()
752
+ ]
753
+ }
754
+ );
755
+
756
+ const DivorceQuestions = (condition, scope) => group(
757
+ 'DivorceQuestions',
758
+ {
759
+ if: (condition || '$get(Type_Of_Legal_Problem).value == "Divorce and Separation"'),
760
+ children: [
761
+ haveAttorney(scope),
762
+ maritalStatus(scope),
763
+ haveChildren(scope),
764
+ degreeOfInterest(scope),
765
+ lawyerPaymentMethod(scope)
766
+ ]
767
+ }
768
+ );
769
+
770
+ const DUIAndDWIQuestions = (condition, scope) => group(
771
+ 'DUIAndDWIQuestions',
772
+ {
773
+ if: (condition || '$get(Type_Of_Legal_Problem).value == "DUI and DWI"'),
774
+ children: [
775
+ haveAttorney(scope),
776
+ incidentDate(scope),
777
+ priorAlcoholOffenses(scope),
778
+ typeOfAlcoholTest(scope),
779
+ bloodContentAlcoholTest(scope),
780
+ pendingCharges(scope),
781
+ degreeOfInterestHelp(scope)
782
+ ]
783
+ }
784
+ );
785
+
786
+ const PersonalInjuryQuestions = (condition, scope) => group(
787
+ 'PersonalInjuryQuestions',
788
+ {
789
+ if: (condition || '$get(Type_Of_Legal_Problem).value == "Personal Injury"'),
790
+ children: [
791
+ haveAttorney(scope),
792
+ incidentDate(scope),
793
+ claimStatus(scope),
794
+ atFault(scope),
795
+ primaryInjury(scope),
796
+ doctorTreatment(scope)
797
+ ]
798
+ }
799
+ );
800
+
801
+ const PowerofAttorneyQuestions = (condition, scope) => group(
802
+ 'PowerofAttorneyQuestions',
803
+ {
804
+ if: (condition || '$get(Type_Of_Legal_Problem).value == "Power of Attorney"'),
805
+ children: [
806
+ haveAttorney(scope),
807
+ degreeOfInterestHelp(scope)
808
+ ]
809
+ }
810
+ );
811
+
812
+ const SocialSecurityDisabilityAndInsuranceQuestions = (condition, scope) => group(
813
+ 'SocialSecurityDisabilityAndInsuranceQuestions',
814
+ {
815
+ if: (condition || '$get(Type_Of_Legal_Problem).value == "Social Security Disability and Insurance"'),
816
+ children: [
817
+ haveAttorney(scope),
818
+ applicantAge(scope),
819
+ disabilityConditionStopWork(scope),
820
+ disabilityWorkHistory(scope),
821
+ socialSecurityDisabilityReceivingBenefits(scope),
822
+ doctorTreatment(scope)
823
+ ]
187
824
  }
188
- ];
825
+ );
189
826
 
190
- const hiddenInputsLegal = [
827
+ const WillsAndTrustsQuestions = (condition, scope) => group(
828
+ 'WillsAndTrustsQuestions',
191
829
  {
192
- $formkit: 'hidden',
193
- name: "vertical",
194
- value: "Legal"
195
- },
830
+ if: (condition || '$get(Type_Of_Legal_Problem).value == "Wills and Trusts"'),
831
+ children: [
832
+ haveAttorney(scope),
833
+ valueOfAssets(scope),
834
+ typeOfAssets(scope),
835
+ roleInMatterProbate(scope),
836
+ estateLegalServicesNeeded(scope),
837
+ degreeOfInterestHelp(scope)
838
+ ]
839
+ }
840
+ );
841
+
842
+ const WorkersCompensationQuestions = (condition, scope) => group(
843
+ 'WorkersCompensationQuestions',
196
844
  {
197
- $formkit: 'hidden',
198
- name: "TCPA_Language",
199
- value: "$meta.tcpaLanguage"
200
- },
201
- ...hiddenInputsBase
202
- ];
845
+ if: (condition || '$get(Type_Of_Legal_Problem).value == "Workers Compensation"'),
846
+ children: [
847
+ haveAttorney(scope),
848
+ incidentDate(scope),
849
+ claimStatus(scope),
850
+ primaryInjury(scope),
851
+ causeOfInjury(scope),
852
+ doctorTreatment(scope)
853
+ ]
854
+ }
855
+ );
203
856
 
204
- const legalRedirectMapDefaults = {
205
- '*': LegalRedirectUrl()
206
- };
857
+ const NotSureOrOtherQuestions = () => group(
858
+ 'NotSureOrOtherQuestions',
859
+ {
860
+ if: '$get(Type_Of_Legal_Problem).value == "Not Sure or Other"',
861
+ children: [
862
+ haveAttorney(),
863
+ degreeOfInterestHelp()
864
+ ]
865
+ }
866
+ );
207
867
 
868
+ const NEXT_ON_ENTER = '$onEnter($setNextStep($fireStepEvent($get(form)), $preStepFunc($get(form))))';
869
+ const NEXT_ON_INPUT = '$onInput($setNextStep($fireStepEvent($get(form)), $preStepFunc($get(form))))';
208
870
 
209
- function legalRedirectMap(updates) {
210
- return merge(
211
- legalRedirectMapDefaults,
212
- updates
213
- )
214
- }
871
+ const isInput = (n) => { return (n.type !== 'group' && n.type !== 'section' && n.type !== 'form' && n.$formkit !== 'hidden' && !n.children) };
215
872
 
216
- const legalAllValueOverrideMap = {
217
- 'Civil_Defense': {
218
- 'Yes': {
219
- 'Type_Of_Legal_Problem': 'Defend a Lawsuit'
220
- },
221
- 'No': {
222
- 'Type_Of_Legal_Problem': 'File a Lawsuit'
873
+ const findLastInput = (n) => {
874
+ if (isInput(n)) {
875
+ return n
876
+ }
877
+ for (var i = n.children.length - 1; i >= 0; i--) {
878
+ if (typeof n.children === 'string') {
879
+ continue
880
+ }
881
+ const child = n.children[i];
882
+ if (isInput(child)) {
883
+ return child
884
+ }
885
+ const res = findLastInput(child);
886
+ if (res) {
887
+ return res
223
888
  }
889
+ }
890
+ return null
891
+ };
892
+
893
+ const secureIconDefault = {
894
+ $el: 'div',
895
+ if: '$activeStep === $lastStep()',
896
+ attrs: {
897
+ class: 't-flex t-justify-center t-items-center t-text-sm t-text-gray-500'
224
898
  },
225
- 'Type_Of_Legal_Problem_Display': {
226
- // Accidents and PI
227
- 'Auto Accident': {
228
- 'Type_Of_Legal_Problem': 'Auto and Car Accidents'
229
- },
230
- 'Dog Bite': {
231
- 'Type_Of_Legal_Problem': 'Personal Injury'
232
- },
233
- 'Slip and Fall': {
234
- 'Type_Of_Legal_Problem': 'Personal Injury'
235
- },
236
- 'Workplace Injury': {
237
- 'Type_Of_Legal_Problem': 'Workers Compensation'
238
- },
239
- 'Trucking Accident': {
240
- 'Type_Of_Legal_Problem': 'Auto and Car Accidents'
241
- },
242
- 'Motorcycle Accident': {
243
- 'Type_Of_Legal_Problem': 'Auto and Car Accidents',
244
- },
245
- 'Other Accidents or Injuries': {
246
- 'Type_Of_Legal_Problem': 'Personal Injury'
247
- },
248
- // Civil
249
- 'Automobile Accident': {
250
- 'Type_Of_Legal_Problem': 'Auto and Car Accidents'
251
- },
252
- 'Contract Disputes': {
253
- 'Type_Of_Legal_Problem': 'Business Lawyers'
254
- },
255
- 'Defamation and Slander': {
256
- 'Type_Of_Legal_Problem': 'File a Lawsuit'
257
- },
258
- 'Dog Bite': {
259
- 'Type_Of_Legal_Problem': 'Personal Injury'
260
- },
261
- 'Employment and Workplace': {
262
- 'Type_Of_Legal_Problem': 'Employment and Workplace'
263
- },
264
- 'Fraud': {
265
- 'Type_Of_Legal_Problem': 'Consumer Lawyers'
266
- },
267
- 'Medical Malpractice': {
268
- 'Type_Of_Legal_Problem': 'Medical Malpractice'
269
- },
270
- 'Personal Injury': {
271
- 'Type_Of_Legal_Problem': 'Personal Injury'
272
- },
273
- 'Property Damage': {
274
- 'Type_Of_Legal_Problem': 'Property Damage'
275
- },
276
- 'Small Claims': {
277
- 'Type_Of_Legal_Problem': 'File a Lawsuit'
278
- },
279
- 'Real Estate': {
280
- 'Type_Of_Legal_Problem': 'Real Estate'
281
- },
282
- 'Other (describe on next page)': {
283
- 'Type_Of_Legal_Problem': 'Not Sure or Other'
284
- },
285
- // Contracts
286
- 'Contract Creation': {
287
- 'Type_Of_Legal_Problem': 'Business Lawyers',
288
- 'Business_Services': 'Contracts'
289
- },
290
- 'Contract Enforcement': {
291
- 'Type_Of_Legal_Problem': 'Business Lawyers',
292
- 'Business_Services': 'Contracts'
293
- },
294
- 'Contract Cancellation': {
295
- 'Type_Of_Legal_Problem': 'Business Lawyers',
296
- 'Business_Services': 'Contracts'
297
- },
298
- 'Contract Fraud': {
299
- 'Type_Of_Legal_Problem': 'Business Lawyers',
300
- 'Business_Services': 'Contracts'
301
- },
302
- 'Breach of Contract': {
303
- 'Type_Of_Legal_Problem': 'Business Lawyers',
304
- 'Business_Services': 'Contracts'
305
- },
306
- 'Other Contract Issues': {
307
- 'Type_Of_Legal_Problem': 'Business Lawyers',
308
- 'Business_Services': 'Contracts'
309
- },
310
- // Criminal
311
- 'Criminal Defense': {
312
- 'Type_Of_Legal_Problem': 'Criminal and Felony'
313
- },
314
- 'Victim of a Crime': {
315
- 'Type_Of_Legal_Problem': 'Victim of a Crime'
316
- },
317
- 'DUI and DWI': {
318
- 'Type_Of_Legal_Problem': 'DUI and DWI'
319
- },
320
- 'Expungement': {
321
- 'Type_Of_Legal_Problem': 'Expungement'
322
- },
323
- 'Harassment': {
324
- 'Type_Of_Legal_Problem': 'Criminal and Felony'
325
- },
326
- 'Not Sure or Other': {
327
- 'Type_Of_Legal_Problem': 'Not Sure or Other'
328
- },
329
- // Employment and Workplace
330
- 'Workplace Harassment': {
331
- 'Type_Of_Legal_Problem': 'Workplace Harassment'
332
- },
333
- 'Workplace Discrimination': {
334
- 'Type_Of_Legal_Problem': 'Workplace Discrimination'
335
- },
336
- 'Wrongful Termination': {
337
- 'Type_Of_Legal_Problem': 'Wrongful Termination'
338
- },
339
- 'Payment Disputes': {
340
- 'Type_Of_Legal_Problem': 'Employment and Workplace'
341
- },
342
- 'Workers Compensation': {
343
- 'Type_Of_Legal_Problem': 'Workers Compensation'
344
- },
345
- 'Unemployment': {
346
- 'Type_Of_Legal_Problem': 'Unemployment'
347
- },
348
- 'Other Workplace Issues': {
349
- 'Type_Of_Legal_Problem': 'Employment and Workplace'
350
- },
351
- // Malpractice
352
- 'Attorney Malpractice': {
353
- 'Type_Of_Legal_Problem': 'Civil Lawsuit'
354
- },
355
- 'Other Malpractice Issues': {
356
- 'Type_Of_Legal_Problem': 'Not Sure or Other'
357
- },
358
- // Repossession
359
- 'Vehicle Repossession': {
360
- 'Type_Of_Legal_Problem': 'Bankruptcy'
361
- },
362
- 'Property Repossession': {
363
- 'Type_Of_Legal_Problem': 'Bankruptcy'
364
- },
365
- 'Other Repossession Issues': {
366
- 'Type_Of_Legal_Problem': 'Not Sure or Other'
367
- },
368
- // Real Estate
369
- 'Contracts and Agreements': {
370
- 'Type_Of_Legal_Problem': 'Real Estate'
371
- },
372
- 'Deeds, Liens, and Titles': {
373
- 'Type_Of_Legal_Problem': 'Real Estate'
374
- },
375
- 'Foreclosure': {
376
- 'Type_Of_Legal_Problem': 'Foreclosure'
377
- },
378
- 'Insurance': {
379
- 'Type_Of_Legal_Problem': 'Insurance'
380
- },
381
- 'Landlord and Tenant': {
382
- 'Type_Of_Legal_Problem': 'Landlord and Tenant',
383
- },
384
- 'Loans and Mortgages': {
385
- 'Type_Of_Legal_Problem': 'Real Estate',
386
- },
387
- 'Wills, Trusts, and Estates': {
388
- 'Type_Of_Legal_Problem': 'Wills and Trusts'
389
- },
390
- 'Property Damage': {
391
- 'Type_Of_Legal_Problem': 'Property Damage'
899
+ children: [
900
+ {
901
+ $el: 'img',
902
+ attrs: {
903
+ loading: 'lazy',
904
+ alt: '',
905
+ style: {
906
+ border: 0
907
+ },
908
+ width: '25',
909
+ height: '25',
910
+ src: 'https://d27hmee62k45vz.cloudfront.net/lock_icon_1.jpeg',
911
+ }
392
912
  },
393
- 'Other Real Estate Issues': {
394
- 'Type_Of_Legal_Problem': 'Real Estate'
913
+ {
914
+ $el: 'span',
915
+ children: 'Secure & Encrypted',
916
+ attrs: {
917
+ class: 't-pl-2 t-pt-1 t-font-medium'
918
+ }
395
919
  }
396
- }
397
- };
398
-
399
- const TOLPCommentsPlaceholders = {
400
- 'Adoption': 'Example: "I need help with adoption forms"',
401
- 'Asbestos and Mesothelioma': 'Example: "I was exposed to asbestos at work and would like to file a claim"',
402
- 'Auto and Car Accidents': 'Example: "A truck crashed into my car on the highway" or "I\'ve been involved in a hit and run accident"',
403
- 'Bankruptcy': 'Example: "I need help filing for bankruptcy"',
404
- 'Birth Certificate and Name Change': 'Example: "Just married and would like to change my last name"',
405
- 'Business Lawyers': 'Example: "I need help incorporating a business" or "I would like a legal contract reviewed"',
406
- 'Child Custody and Support': 'Example: "Need help getting custody" or "Issues with child support payments"',
407
- 'Child Custody': 'Example: "Need help getting custody"',
408
- 'Child Support': 'Example: "Issues with child support payments"',
409
- 'Civil Rights and Discrimination': 'Example: "Police brutality" or "Coworker keeps harassing me"',
410
- 'Civil Lawsuit': 'Example: "A contractor took my money and never completed the job" or "I am being sued by a neighbor"',
411
- 'File a Lawsuit': 'Example: "A contractor took my money and never completed the job"',
412
- 'Defend a Lawsuit': 'Example: "I am being sued by a neighbor"',
413
- 'Consumer Lawyers': 'Example: "Someone committed fraud against me" or "A contractor took my money and never completed the job"',
414
- 'Copyrights and Trademarks': 'Example: "I would like to register a trademark or copyright a name"',
415
- 'Criminal and Felony': 'Example: "I was arrested for DUI and need legal defense" or "I am being charged with assault"',
416
- 'Debt and Collections': 'Example: "I would like to consolidate my debt" or "A collection agency is harassing me"',
417
- 'Divorce and Separation': 'Example: "I would like to file for an uncontested divorce"',
418
- 'DUI and DWI': 'Example: "I was arrested for DUI and need legal defense"',
419
- 'Elder Law': 'Example: "I would like help with Estate Planning" or "I need help with a guardianship"',
420
- 'Employment and Workplace': 'Example: "I was injured while on the job" or "My company is discriminating against me"',
421
- 'Expungement': 'Example: "I would like to file for an expungement and clear my record"',
422
- 'Family Issues': 'Example: "I need help with guardianship" or "I need a simple will created"',
423
- 'Foreclosure': 'Example: "I need help to avoid foreclosure on my house"',
424
- 'Guardianship': 'Example: "I need help with guardianship documents"',
425
- 'Harassment and Discrimination': 'Example: "I am being discriminated at work" or "My neighbor is harassing me"',
426
- 'Sexual Harassment': 'Example: "I am being sexually harassed by a coworker"',
427
- 'Workplace Harassment': 'Example: "My coworker is being aggressive towards me"',
428
- 'Non-Workplace Harassment': 'Example: "My neighbor is harassing me"',
429
- 'Workplace Discrimination': 'Example: "I am being discriminated at work based on my age"',
430
- 'Non-Workplace Discrimination': 'Example: "I am being discriminated against by a local official"',
431
- 'Identity Theft': 'Example: "Someone stole my identity and I need help fixing the issue"',
432
- 'Immigration and Visas': 'Example: "I need help filing for a visa" or "Help with a green card"',
433
- 'Insurance': 'Example: "I need help filing an insurance claim for damage to my house"',
434
- 'Landlord and Tenant': 'Example: "I need help to fight an eviction" or "I would like a lawyer to review a rental contract"',
435
- 'Lemon Law': 'Example: "I purchased a new vehicle that broke down already and seller will not assist"',
436
- 'Long Term Disability': 'Example: "I was injured on the job and would like to file for benefits" or "I need help filing for disability benefits"',
437
- 'Medical Malpractice': 'Example: "A doctor performed surgery on the wrong limb and I would like to file a lawsuit"',
438
- 'Patents and Intellectual Property': 'Example: "I would like to file for a patent" or "I need to copyright a name"',
439
- 'Personal Injury': 'Example: "I was bit by the neighbor\'s dog" or "I fell in the icy grocery store parking lot"',
440
- 'Power of Attorney': 'Example: "I need help with a limited or general power of attorney"',
441
- 'Probate and Estates': 'Example: "I need help with planning for my estate" or "A family member passed without a will in place"',
442
- 'Product Liability': 'Example: "My car battery caught on fire" or "I purchased a faulty product"',
443
- 'Property Damage': 'Example: "The neighbor\'s tree fell on my fence" or "My car was hit in the parking lot"',
444
- 'Real Estate': 'Example: "I need help with a quitclaim deed" or "I need a lawyer to review a purchase and sales agreement"',
445
- 'Social Security Disability and Insurance': 'Example: "I would like help filing for disability benefits" or "I\'ve been denied for SSDI and would like to appeal"',
446
- 'Tax and IRS': 'Example: "I need help fighting an IRS tax claim" or "I need audit defense"',
447
- 'Traffic and Tickets': 'Example: "I need help reinstating a supsended license" or "I would like to fight a traffic ticket"',
448
- 'Unemployment': 'Example: "I need help filing for unemployment benefits"',
449
- 'Victim of a Crime': 'Example: "I was assaulted in the store" or "I am being discriminated against at work"',
450
- 'Wills and Trusts': 'Example: "I need a simple will created" or "I would like guidance on creating a trust fund"',
451
- 'Workers Compensation': 'Example: "I was injured at work and would like to file for workers compensation benefits"',
452
- 'Wrongful Death': 'Example: "A family member was killed on the job and we need legal representation"',
453
- 'Wrongful Termination': 'Example: "I was fired by my employer without cause"',
454
- 'Not Sure or Other': 'Example: "I was involved in a car accident" or "I need help setting up power of attorney"'
920
+ ]
455
921
  };
456
922
 
457
- const TOLPFinalHeadlines = {
458
- // 'Adoption': '',
459
- };
923
+ function secureIcon(updates) {
924
+ return merge(
925
+ secureIconDefault,
926
+ updates
927
+ )
928
+ }
460
929
 
461
- const TOLPFinalSubHeadlines = {
462
- 'Adoption': 'You may benefit from speaking with an adoption professional. Please verify your contact information.',
463
- // 'Asbestos and Mesothelioma': '',
464
- 'Auto and Car Accidents': 'You may benefit from speaking with an accident professional. Please verify your contact information.',
465
- 'Bankruptcy': 'You may benefit from speaking with a bankruptcy professional. Please verify your contact information.',
466
- // 'Birth Certificate and Name Change': '',
467
- // 'Business Lawyers': '',
468
- // 'Child Custody and Support': '',
469
- // 'Civil Rights and Discrimination': '',
470
- // 'Civil Lawsuit': '',
471
- // 'Consumer Lawyers': '',
472
- 'Copyrights and Trademarks': 'You may benefit from speaking with a copyright and trademark professional. Please verify your contact information.',
473
- // 'Criminal and Felony': '',
474
- // 'Debt and Collections': '',
475
- 'Divorce and Separation': 'You may benefit from speaking with a divorce professional. Please verify your contact information.',
476
- 'DUI and DWI': 'You may benefit from speaking with a DUI professional. Please verify your contact information.',
477
- 'Elder Law': 'You may benefit from speaking with an elder law professional. Please verify your contact information.',
478
- // 'Employment and Workplace': '',
479
- // 'Expungement': '',
480
- // 'Family Issues': '',
481
- 'Foreclosure': 'You may benefit from speaking with a foreclosure professional. Please verify your contact information.',
482
- 'Guardianship': 'You may benefit from speaking with a guardianship professional. Please verify your contact information.',
483
- // 'Harassment and Discrimination': '',
484
- // 'Identity Theft': '',
485
- 'Immigration and Visas': 'You may benefit from speaking with a immigration professional. Please verify your contact information.',
486
- // 'Insurance': '',
487
- 'Landlord and Tenant': 'You may benefit from speaking with a landlord and tenant legal professional. Please verify your contact information.',
488
- // 'Lemon Law': '',
489
- 'Long Term Disability': 'You may benefit from speaking with a disability legal professional. Please verify your contact information.',
490
- 'Medical Malpractice': 'You may benefit from speaking with a malpractice professional. Please verify your contact information.',
491
- 'Patents and Intellectual Property': 'You may benefit from speaking with a patent professional. Please verify your contact information.',
492
- 'Personal Injury': 'You may benefit from speaking with a personal injury professional. Please verify your contact information.',
493
- // 'Power of Attorney': '',
494
- 'Probate and Estates': 'You may benefit from speaking with a probate and estate professional. Please verify your contact information.',
495
- // 'Product Liability': '',
496
- // 'Property Damage': '',
497
- 'Real Estate': 'You may benefit from speaking with a real estate professional. Please verify your contact information.',
498
- 'Social Security Disability and Insurance': 'You may benefit from speaking with an SSDI professional. Please verify your contact information.',
499
- 'Tax and IRS': 'You may benefit from speaking with a tax professional. Please verify your contact information.',
500
- // 'Traffic and Tickets': '',
501
- 'Unemployment': 'You may benefit from speaking with an unemployment professional. Please verify your contact information.',
502
- // 'Victim of a Crime': '',
503
- // 'Wills and Trusts': '',
504
- 'Workers Compensation': 'You may benefit from speaking with a workers compensation professional. Please verify your contact information.',
505
- // 'Wrongful Death': '',
506
- // 'Wrongful Termination': '',
507
- // 'Not Sure or Other': ''
508
- // 'Sexual Harassment': '',
509
- // 'Workplace Harassment': '',
510
- // 'Non-Workplace Harassment': '',
511
- // 'Workplace Discrimination': '',
512
- // 'Non-Workplace Discrimination': '',
513
- };
930
+ function questionsStepHeadline(updates) {
931
+ return {
932
+ $el: 'h3',
933
+ children: updates.headline || 'Tell Us About Your Situation',
934
+ attrs: {
935
+ 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'
936
+ }
937
+ }
938
+ }
514
939
 
515
- // ------ Common Base Settings
940
+ function crossSellQuestionsStepHeadline(updates) {
941
+ return {
942
+ $el: 'h3',
943
+ children: updates.headline || 'Tell Us About Your Situation',
944
+ attrs: {
945
+ 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'
946
+ }
947
+ }
948
+ }
516
949
 
517
- const checkbox = (updates) => {
518
- if (updates.name && !updates.id) {
519
- updates.id = updates.name;
950
+ function crossSellQuestionsStepSubHeadline(updates) {
951
+ return {
952
+ $el: 'h5',
953
+ children: updates.subheadline || 'Tell us about your situation:',
954
+ attrs: {
955
+ class: 't-flex t-justify-center t-text-dark t-text-center !t-text-lg t-font-semibold t-pb-4 t-pt-0 t-px-3'
956
+ }
520
957
  }
521
- return merge({
522
- $formkit: 'checkbox',
523
- validation: 'required',
524
- validationMessages: {
525
- required: 'Field is required'
958
+ }
959
+
960
+ function commentsStepHeadline(updates) {
961
+ return {
962
+ $el: 'h3',
963
+ children: updates.headline || 'Additional Case Details',
964
+ attrs: {
965
+ 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 || '')
526
966
  }
527
- }, updates)
528
- };
967
+ }
968
+ }
529
969
 
530
- const sbsCheckbox = (updates) => {
531
- updates.legendClass = 'legend-left required';
532
- updates.fieldsetClass = '$reset side-by-side';
533
- updates.optionsClass = 't-pl-1';
534
- updates.innerClass = 't-flex t-items-center';
535
- updates.wrapperClass = 't-mb-3';
536
- return checkbox(updates)
537
- };
970
+ function firstAndLastStepHeadline(updates) {
971
+ return {
972
+ $el: 'h3',
973
+ children: updates.headline || 'Please Provide a Contact Name',
974
+ attrs: {
975
+ 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 || '')
976
+ }
977
+ }
978
+ }
538
979
 
539
- const radio = (updates) => {
540
- if (updates.name && !updates.id) {
541
- updates.id = updates.name;
980
+ function legalCrossSellsStepHeadline(updates) {
981
+ return {
982
+ $el: 'h3',
983
+ children: updates.headline || 'Do any of the following situations apply?',
984
+ attrs: {
985
+ 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 || '')
986
+ }
542
987
  }
543
- return merge({
544
- $formkit: 'radio',
545
- validation: 'required',
546
- validationMessages: {
547
- required: 'Field is required'
548
- },
549
- optionsClass: 't-pt-3 t-pl-1',
550
- legendClass: 'required'
551
- }, updates)
552
- };
988
+ }
553
989
 
554
- const col2Radio = (updates) => {
555
- updates.legendClass = 'required';
556
- updates.fieldsetClass = '$reset';
557
- updates.optionsClass = 't-pl-2 t-pt-3 t-grid t-grid-cols-1 md:t-grid-cols-2';
558
- updates.innerClass = 't-items-start';
559
- updates.wrapperClass = '$reset t-flex t-cursor-pointer t-mb-3';
560
- return radio(updates)
561
- };
990
+ function contactStepHeadline(updates) {
991
+ return {
992
+ $el: 'h3',
993
+ children: updates.headline || DEFAULT_FINAL_HEADLINE_DYNAMIC,
994
+ attrs: {
995
+ 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 || '')
996
+ }
997
+ }
998
+ }
562
999
 
563
- const sbs2ItemRadio = (updates) => {
564
- updates.legendClass = 'legend-left t-pb-1 required';
565
- updates.fieldsetClass = '$reset side-by-side t-items-center';
566
- updates.optionsClass = 't-mt-1 t-grid t-grid-cols-1 md:t-grid-cols-2-125 t-items-center';
567
- updates.innerClass = 't-flex t-items-center';
568
- updates.optionClass = 't-pr-1';
569
- return radio(updates)
570
- };
1000
+ function contactStepSubHeadline(updates) {
1001
+ return {
1002
+ $el: 'h5',
1003
+ children: updates.subheadline || DEFAULT_FINAL_SUBHEADLINE_DYNAMIC,
1004
+ attrs: {
1005
+ 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 || '')
1006
+ }
1007
+ }
1008
+ }
571
1009
 
572
- const sbsYesNoRadio = (updates) => {
573
- updates.options = ['Yes', 'No'];
574
- return sbs2ItemRadio(updates)
575
- };
1010
+ const TRUSTED_FORM_JS = `(function() {
1011
+ if (window.xxTrustedFormLoaded) {
1012
+ return
1013
+ }
1014
+ var vid = '';
1015
+ if (typeof window.zar !== 'undefined') {
1016
+ vid = window.zar.getVID();
1017
+ }
1018
+ window.xxTrustedFormLoaded = true;
1019
+ var sandbox = document.location.hostname.indexOf('localhost') > -1 ? 'true' : 'false'
1020
+ var tf = document.createElement('script');
1021
+ tf.type = 'text/javascript'; tf.async = true;
1022
+ tf.src = ("https:" == document.location.protocol ? 'https' : 'http') + "://api.trustedform.com/trustedform.js?field=xxTrustedFormCertUrl&identifier=" + vid + "&ping_field=xxTrustedFormPingUrl&provideReferrer=false&invert_field_sensitivity=true&sandbox=" + sandbox + "&l=" + new Date().getTime() + Math.random();
1023
+ var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(tf, s);
1024
+ })();`;
576
1025
 
577
- const select = (updates) => {
578
- if (updates.name && !updates.id) {
579
- updates.id = updates.name;
1026
+ function trustedFormScript() {
1027
+ return {
1028
+ $el: 'script',
1029
+ if: '$activeStep === $lastStep()',
1030
+ children: TRUSTED_FORM_JS
580
1031
  }
581
- return merge({
582
- $formkit: 'select',
583
- placeholder: "Please Select",
584
- validation: 'required',
585
- validationMessages: {
586
- required: 'Field is required'
587
- },
588
- inputClass: 't-bg-white',
589
- labelClass: 'required'
590
- }, updates)
591
- };
1032
+ }
592
1033
 
593
- const sbsSelect = (updates) => {
594
- updates.labelClass = 'required';
595
- updates.wrapperClass = 'side-by-side t-items-center';
596
- updates.innerClass = 'select-height-content';
597
- updates.helpClass = 't-mt-2.5 md:t-text-right md:t-mt-[-5px]';
598
- return select(updates)
599
- };
1034
+ const stepDefaults = (step, stepKey) => ({
1035
+ $el: 'section',
1036
+ if: '$stepEnabled("' + step + '")',
1037
+ attrs: {
1038
+ hidden: '$activeStep !== "' + step + '"',
1039
+ key: stepKey ? stepKey : step
1040
+ }
1041
+ });
600
1042
 
601
- const text = (updates) => {
602
- if (updates.name && !updates.id) {
603
- updates.id = updates.name;
1043
+ function step(name, inputs, nextOnEnter = true, nextOnInput = false, stepKey = undefined, nextStepMap = undefined, autoFocus = undefined) {
1044
+ if (typeof nextOnEnter === 'undefined') {
1045
+ nextOnEnter = true;
1046
+ }
1047
+ if (inputs && inputs.length && (nextOnEnter || nextOnInput)) {
1048
+ const lastInput = findLastInput(inputs[inputs.length - 1]);
1049
+ if (lastInput && nextOnEnter === true) {
1050
+ lastInput.onKeypress = NEXT_ON_ENTER;
1051
+ }
1052
+ if (lastInput && nextOnInput === true) {
1053
+ lastInput.onInput = NEXT_ON_INPUT;
1054
+ }
604
1055
  }
605
- return merge({
606
- $formkit: 'text',
607
- validation: 'required',
608
- validationMessages: {
609
- required: 'Field is required'
610
- },
611
- labelClass: 'required'
612
- }, updates)
613
- };
614
1056
 
615
- const sbsText = (updates) => {
616
- updates.wrapperClass = 'side-by-side t-items-center';
617
- return text(updates)
618
- };
1057
+ return merge(
1058
+ stepDefaults(name, stepKey),
1059
+ {
1060
+ children: [
1061
+ {
1062
+ $formkit: 'group',
1063
+ id: name,
1064
+ name: name,
1065
+ nextStepMap: nextStepMap,
1066
+ autoFocus: autoFocus,
1067
+ children: inputs
1068
+ }
1069
+ ]
1070
+ }
1071
+ )
1072
+ }
619
1073
 
620
- const textArea = (updates) => {
621
- if (updates.name && !updates.id) {
622
- updates.id = updates.name;
623
- }
624
- return merge({
625
- $formkit: 'textarea',
626
- rows: 5,
627
- maxlength: 500,
628
- validation: 'required',
629
- validationMessages: {
630
- required: 'Field is required'
631
- },
632
- innerClass: 't-max-w-xl',
633
- labelClass: 'required'
634
- }, updates)
635
- };
1074
+ function repossessionTOLPAndZip(updates = {}) {
1075
+ return step(
1076
+ 'repossessionTOLPAndZip',
1077
+ [
1078
+ {
1079
+ $formkit: 'hidden',
1080
+ name: "Type_Of_Legal_Problem",
1081
+ id: "Type_Of_Legal_Problem",
1082
+ value: "Debt and Collections"
1083
+ },
1084
+ repossessionTOLPDisplay(),
1085
+ zipcode()
1086
+ ],
1087
+ updates.nextOnEnter,
1088
+ updates.nextOnInput,
1089
+ updates.stepKey,
1090
+ updates.nextStepMap
1091
+ )
1092
+ }
636
1093
 
637
- const bankruptcyCrossSell = () => sbsCheckbox({
638
- label: "I'd also like a consult for bankruptcy or debt elimination (optional)",
639
- help: "Note: you will be contacted separately by a bankruptcy/debt expert",
640
- name: 'CrossSell_Bankruptcy',
641
- id: 'CrossSell_Bankruptcy',
642
- if: '$getVal($get(form), "Type_Of_Legal_Problem") != "Bankruptcy" && ($getVal($get(form), "Degree_Of_Interest") == "Absolutely Can\'t Afford" || $getVal($get(form), "Degree_Of_Interest") == "Maybe" || $getVal($get(form), "Degree_Of_Interest") == "Probably")',
643
- validation: null,
644
- helpClass: "!t-text-sm"
645
- });
1094
+ function commentsWithBankruptcy(updates = {}) {
1095
+ return step(
1096
+ 'commentsWithBankruptcy',
1097
+ [
1098
+ commentsStepHeadline(updates),
1099
+ comments({
1100
+ label: typeof updates.label === 'undefined' ? DEFAULT_COMMENTS_LABEL : updates.label,
1101
+ placeholder: updates.placeholder || DEFAULT_COMMENTS_PLACEHOLDER_DYNAMIC,
1102
+ inputClass: typeof updates.inputClass === 'undefined' ? '!t-h-32' : updates.inputClass,
1103
+ }),
1104
+ bankruptcyCrossSell(),
1105
+ {
1106
+ $el: 'div',
1107
+ if: '$get(CrossSell_Bankruptcy).value == true',
1108
+ children: [
1109
+ comments({
1110
+ label: 'Bankruptcy or debt details:',
1111
+ placeholder: 'Please describe your bankrtupcy or debt situation in a few words...',
1112
+ inputClass: '!t-h-16'
1113
+ }, 'CrossSell:Bankruptcy')
1114
+ ],
1115
+ }
1116
+ ],
1117
+ false // nextOnEnter
1118
+ )
1119
+ }
646
1120
 
647
- const comments = (updates, scope) => textArea(
648
- merge({
649
- name: scope ? scope + ':' + 'Comments' : 'Comments',
650
- label: 'Please briefly describe your situation in a few words:',
651
- placeholder: 'For Example: "I would like help with child support payments" or "I need help with visitation rights"'
652
- }, updates)
653
- );
1121
+ function contactInfo(updates = {}) {
1122
+ return step(
1123
+ 'contactInfo',
1124
+ [
1125
+ contactStepHeadline(updates),
1126
+ contactStepSubHeadline(updates),
1127
+ trustedFormScript(),
1128
+ email(),
1129
+ phone(),
1130
+ TCPAConsent(),
1131
+ secureIcon()
1132
+ ],
1133
+ false, // nextOnEnter
1134
+ )
1135
+ }
654
1136
 
655
- const degreeOfInterest = (scope, help) => sbsSelect({
656
- name: scope ? scope + ':' + 'Degree_Of_Interest' : 'Degree_Of_Interest',
657
- id: scope ? scope + ':' + 'Degree_Of_Interest' : 'Degree_Of_Interest',
658
- label: 'How Likely Are You to Pay if Your Issue Could be Resolved?',
659
- help: help,
660
- options: [
661
- 'Definitely',
662
- 'Probably',
663
- 'Maybe',
664
- "Absolutely Can't Afford"
665
- ]
666
- });
1137
+ function firstAndLastV2(updates = {}) {
1138
+ return step(
1139
+ 'firstAndLast',
1140
+ [
1141
+ firstAndLastStepHeadline(updates),
1142
+ firstName(),
1143
+ lastName()
1144
+ ],
1145
+ updates.nextOnEnter
1146
+ )
1147
+ }
667
1148
 
668
- const degreeOfInterestHelp = (scope) => degreeOfInterest(scope, 'No payment necessary to speak with lawyers.');
669
1149
 
670
- const email = () => sbsText({
671
- $formkit: 'email',
672
- name: 'Email',
673
- label: 'Email Address:',
674
- placeholder: 'email@domain.com',
675
- autocomplete: 'email',
676
- 'data-tf-sensitive': 'false',
677
- validation: 'required|email',
678
- validationMessages: {
679
- required: 'Email is required',
680
- email: 'Invalid Email'
681
- }
682
- });
1150
+ function autoAndCarAccidentCrossSellQuestions(updates = {}) {
1151
+ return step(
1152
+ 'autoAndCarAccidentCrossSellQuestions',
1153
+ [
1154
+ crossSellQuestionsStepHeadline({ headline: 'You May Be Entitled To Compensation' }),
1155
+ crossSellQuestionsStepSubHeadline({ subheadline: 'Tell us about your accident:' }),
1156
+ AutoAndCarAccidentsQuestions("true", 'CrossSell:Auto_and_Car_Accidents'),
1157
+ comments(
1158
+ {
1159
+ label: 'Accident Description:',
1160
+ placeholder: 'Please describe your accident in a few words...',
1161
+ inputClass: '!t-h-16'
1162
+ },
1163
+ 'CrossSell:Auto_and_Car_Accidents'
1164
+ )
1165
+ ],
1166
+ updates.nextOnEnter
1167
+ )
1168
+ }
683
1169
 
684
- const firstName = () => sbsText({
685
- $formkit: 'text',
686
- label: 'First Name:',
687
- placeholder: 'First',
688
- name: 'First_Name',
689
- autocomplete: "given-name",
690
- validationMessages: {
691
- required: 'First Name is required'
692
- }
693
- });
1170
+ function childCustodyCrossSellQuestions(updates = {}) {
1171
+ return step(
1172
+ 'childCustodyCrossSellQuestions',
1173
+ [
1174
+ crossSellQuestionsStepHeadline({ headline: 'Child Custody Information' }),
1175
+ ChildCustodyQuestions("true", 'CrossSell:Child_Custody'),
1176
+ comments(
1177
+ {
1178
+ label: 'Description:',
1179
+ placeholder: 'Please describe your situation in a few words...',
1180
+ inputClass: '!t-h-16'
1181
+ },
1182
+ 'CrossSell:Child_Custody'
1183
+ )
1184
+ ],
1185
+ updates.nextOnEnter
1186
+ )
1187
+ }
694
1188
 
695
- const haveAttorney = (scope) => sbsYesNoRadio({
696
- name: scope ? scope + ':' + 'Have_Attorney' : 'Have_Attorney',
697
- label: 'Already Working with An Attorney?'
698
- });
1189
+ function divorceAndSeparationCrossSellQuestions(updates = {}) {
1190
+ return step(
1191
+ 'divorceAndSeparationCrossSellQuestions',
1192
+ [
1193
+ crossSellQuestionsStepHeadline({ headline: 'Divorce or Separation Information' }),
1194
+ DivorceQuestions("true", 'CrossSell:Divorce_and_Separation'),
1195
+ comments(
1196
+ {
1197
+ label: 'Description:',
1198
+ placeholder: 'Please describe your situation in a few words...',
1199
+ inputClass: '!t-h-16'
1200
+ },
1201
+ 'CrossSell:Divorce_and_Separation'
1202
+ )
1203
+ ],
1204
+ updates.nextOnEnter
1205
+ )
1206
+ }
699
1207
 
700
- const lastName = () => sbsText({
701
- $formkit: 'text',
702
- label: 'Last Name:',
703
- placeholder: 'Last',
704
- name: 'Last_Name',
705
- autocomplete: "family-name",
706
- validationMessages: {
707
- required: 'Last Name is required'
708
- }
709
- });
1208
+ function duiAndDWICrossSellQuestions(updates = {}) {
1209
+ return step(
1210
+ 'duiAndDWICrossSellQuestions',
1211
+ [
1212
+ crossSellQuestionsStepHeadline({ headline: 'About Your DUI/DWI' }),
1213
+ DUIAndDWIQuestions("true", 'CrossSell:DUI_and_DWI'),
1214
+ comments(
1215
+ {
1216
+ label: 'Incident Description:',
1217
+ placeholder: 'Please describe your incident in a few words...',
1218
+ inputClass: '!t-h-16'
1219
+ },
1220
+ 'CrossSell:DUI_and_DWI'
1221
+ )
1222
+ ],
1223
+ updates.nextOnEnter
1224
+ )
1225
+ }
710
1226
 
711
- const lawsuitOtherParty = () => sbsSelect({
712
- label: 'The Other Party is a:',
713
- name: 'Lawsuit_Other_Party',
714
- options: [
715
- "Individual",
716
- "Small Business",
717
- "Large Corporation",
718
- "Government Entity"
719
- ]
720
- });
1227
+ function ssdiCrossSellQuestions(updates = {}) {
1228
+ return step(
1229
+ 'ssdiCrossSellQuestions',
1230
+ [
1231
+ crossSellQuestionsStepHeadline({ headline: 'You May Be Entitled To Benefits' }),
1232
+ crossSellQuestionsStepSubHeadline({ subheadline: 'Tell us about your disability:' }),
1233
+ SocialSecurityDisabilityAndInsuranceQuestions("true", 'CrossSell:Social_Security_Disability_and_Insurance'),
1234
+ comments(
1235
+ {
1236
+ label: 'Description:',
1237
+ placeholder: 'Please describe your situation in a few words...',
1238
+ inputClass: '!t-h-16'
1239
+ },
1240
+ 'CrossSell:Social_Security_Disability_and_Insurance'
1241
+ )
1242
+ ],
1243
+ updates.nextOnEnter
1244
+ )
1245
+ }
721
1246
 
722
- const ownRealEstate = () => sbsYesNoRadio({
723
- name: 'Own_Real_Estate',
724
- label: 'Do You Own Real Estate?'
725
- });
1247
+ function personalInjuryCrossSellQuestions(updates = {}) {
1248
+ return step(
1249
+ 'personalInjuryCrossSellQuestions',
1250
+ [
1251
+ crossSellQuestionsStepHeadline({ headline: 'You May Be Entitled To Compensation' }),
1252
+ crossSellQuestionsStepSubHeadline({ subheadline: 'Tell us about your injury:' }),
1253
+ PersonalInjuryQuestions("true", 'CrossSell:Personal_Injury'),
1254
+ comments(
1255
+ {
1256
+ label: 'Injury Description:',
1257
+ placeholder: 'Please describe your injury in a few words...',
1258
+ inputClass: '!t-h-16'
1259
+ },
1260
+ 'CrossSell:Personal_Injury'
1261
+ )
1262
+ ],
1263
+ updates.nextOnEnter
1264
+ )
1265
+ }
726
1266
 
727
- const phone = () => sbsText({
728
- $formkit: 'tel',
729
- name: 'Primary_Phone',
730
- label: 'Phone Number:',
731
- placeholder: '###-###-####',
732
- maxlength: 12,
733
- help: '10-digit phone number, hyphens optional',
734
- autocomplete: 'tel-national',
735
- 'data-tf-sensitive': 'false',
736
- validation: 'required|matches:/^[0-9]{3}-?[0-9]{3}-?[0-9]{4}$/|valid_phone',
737
- validationMessages: {
738
- required: 'Field is required',
739
- matches: 'Invalid Phone Format, use ###-###-####',
740
- valid_phone: 'Invalid Phone Number'
741
- },
742
- helpClass: "t-mt-2.5 md:t-text-right md:t-mt-[-2px]"
743
- });
1267
+ function powerOfAttorneyCrossSellQuestions(updates = {}) {
1268
+ return step(
1269
+ 'powerOfAttorneyCrossSellQuestions',
1270
+ [
1271
+ crossSellQuestionsStepHeadline({ headline: 'Power of Attorney Information' }),
1272
+ PowerofAttorneyQuestions("true", 'CrossSell:Power_of_Attorney'),
1273
+ comments(
1274
+ {
1275
+ label: 'Description:',
1276
+ placeholder: 'Please describe your situation in a few words...',
1277
+ inputClass: '!t-h-16'
1278
+ },
1279
+ 'CrossSell:Power_of_Attorney'
1280
+ )
1281
+ ],
1282
+ updates.nextOnEnter
1283
+ )
1284
+ }
744
1285
 
745
- const repossessionTOLPDisplay = (updates) => col2Radio(merge({
746
- name: 'Type_Of_Legal_Problem_Display',
747
- label: 'Select The Repossession Issue:',
748
- options: [
749
- 'Vehicle Repossession',
750
- 'Property Repossession',
751
- 'Other Repossession Issues'
752
- ]
753
- }, updates));
1286
+ function willsAndTrustsCrossSellQuestions(updates = {}) {
1287
+ return step(
1288
+ 'willsAndTrustsCrossSellQuestions',
1289
+ [
1290
+ crossSellQuestionsStepHeadline({ headline: 'Will or Trust Information' }),
1291
+ WillsAndTrustsQuestions("true", 'CrossSell:Wills_and_Trusts'),
1292
+ comments(
1293
+ {
1294
+ label: 'Description:',
1295
+ placeholder: 'Please describe your situation in a few words...',
1296
+ inputClass: '!t-h-16'
1297
+ },
1298
+ 'CrossSell:Wills_and_Trusts'
1299
+ )
1300
+ ],
1301
+ updates.nextOnEnter
1302
+ )
1303
+ }
754
1304
 
755
- const totalDebt = () => sbsSelect({
756
- label: 'Total Debt?',
757
- name: 'Total_Debt',
758
- options: [
759
- "Less than 5K",
760
- "5K to 10K",
761
- "10K to 20K",
762
- "20K to 50K",
763
- "More than 50K"
764
- ]
765
- });
1305
+ function workersCompensationCrossSellQuestions(updates = {}) {
1306
+ return step(
1307
+ 'workersCompensationCrossSellQuestions',
1308
+ [
1309
+ crossSellQuestionsStepHeadline({ headline: 'You May Be Entitled To Benefits' }),
1310
+ crossSellQuestionsStepSubHeadline({ subheadline: 'Tell us about your injury:' }),
1311
+ WorkersCompensationQuestions("true", 'CrossSell:Workers_Compensation'),
1312
+ comments(
1313
+ {
1314
+ label: 'Injury Description:',
1315
+ placeholder: 'Please describe your injury in a few words...',
1316
+ inputClass: '!t-h-16'
1317
+ },
1318
+ 'CrossSell:Workers_Compensation'
1319
+ )
1320
+ ],
1321
+ updates.nextOnEnter
1322
+ )
1323
+ }
766
1324
 
1325
+ function legalCrossSells(updates = {}) {
1326
+ return step(
1327
+ 'legalCrossSells',
1328
+ [
1329
+ legalCrossSellsStepHeadline(updates),
1330
+ legalCrossSells$1(),
1331
+ ],
1332
+ updates.nextOnEnter,
1333
+ false,
1334
+ // Note: we should probably scope this stepKey to this step name
1335
+ '$get(Type_Of_Legal_Problem).value'
1336
+ )
1337
+ }
767
1338
 
768
- const totalMonthlyIncome = () => sbsSelect({
769
- label: 'Total Monthly Income?',
770
- name: 'Total_Monthly_Income',
771
- options: [
772
- "Less than 1K",
773
- "1K to 2K",
774
- "2K to 3K",
775
- "3K to 4K",
776
- "4K to 5K",
777
- "5K to 7K",
778
- "7K to 10K",
779
- "10K to 15K",
780
- "More than 15K"
781
- ]
782
- });
1339
+ function repossessionTOLPQuestions(updates = {}) {
1340
+ return step(
1341
+ 'TOLPQuestions',
1342
+ [
1343
+ questionsStepHeadline(updates),
1344
+ DebtAndCollectionsQuestions(),
1345
+ CivilLawsuitQuestions(),
1346
+ BankruptcyQuestions(),
1347
+ NotSureOrOtherQuestions()
1348
+ ],
1349
+ updates.nextOnEnter
1350
+ )
1351
+ }
783
1352
 
784
- const TCPAConsent = () => ({
785
- $formkit: 'checkbox',
786
- label: '$meta.tcpaLanguage',
787
- name: 'TCPA_Opt_In',
788
- 'data-tf-sensitive': 'false',
789
- validation: 'required|accepted',
790
- validationMessages: {
791
- required: 'Consent is required',
792
- accepted: 'Consent is required'
793
- },
794
- classes: {
795
- label: "t-text-xs t-text-slate-500 t-font-normal"
796
- }
797
- });
1353
+ // ------ Common
798
1354
 
799
- const valueOfAssets = (scope) => sbsSelect({
800
- name: scope ? scope + ':' + 'Value_Of_Assets' : 'Value_Of_Assets',
801
- label: 'Value of Your Assets?',
802
- options: [
803
- "Less than 50K",
804
- "50K to 100K",
805
- "100K to 250K",
806
- "250K to 500K",
807
- "500K to 1M",
808
- "More than 1M"
1355
+ const formNavigation = () => ({
1356
+ $el: 'div',
1357
+ attrs: {
1358
+ class: 'step-nav'
1359
+ },
1360
+ children: [
1361
+ {
1362
+ $formkit: 'button',
1363
+ name: 'back_button',
1364
+ onClick: '$setPreviousStep($prevStepFunc($get(form)))',
1365
+ children: 'Back',
1366
+ style: {
1367
+ if: '$activeStep === $firstStep()',
1368
+ then: 'visibility: hidden;'
1369
+ }
1370
+ },
1371
+ {
1372
+ $formkit: 'button',
1373
+ name: 'next_button',
1374
+ onClick: '$setNextStep($fireStepEvent($get(form)), $preStepFunc($get(form)))',
1375
+ children: {
1376
+ if: '$activeStep === $firstStep()',
1377
+ then: 'Start',
1378
+ else: 'Next'
1379
+ },
1380
+ outerClass: {
1381
+ if: '$activeStep === $lastStep()',
1382
+ then: 't-hidden',
1383
+ else: ''
1384
+ },
1385
+ style: {
1386
+ if: '$activeStep === $lastStep()',
1387
+ then: 'display: none;'
1388
+ }
1389
+ },
1390
+ {
1391
+ $formkit: 'submit',
1392
+ name: 'submit_button',
1393
+ label: 'Submit',
1394
+ if: '$activeStep === $lastStep()',
1395
+ style: {
1396
+ if: '$activeStep !== $lastStep()',
1397
+ then: 'display: none;'
1398
+ }
1399
+ }
809
1400
  ]
810
1401
  });
811
1402
 
812
- const zipcode = () => sbsText({
813
- label: 'Zip Code:',
814
- placeholder: '#####',
815
- name: 'Zip',
816
- maxlength: 5,
817
- inputmode: "numeric",
818
- autocomplete: 'postal-code',
819
- validation: 'required|matches:/^[0-9]{5}$/',
820
- validationMessages: {
821
- required: 'Zip Code is required',
822
- matches: 'Invalid Zip Code'
823
- }
1403
+ const formDetails = () => ({
1404
+ $el: 'pre',
1405
+ if: '$urlParam("fdbg", "") == 1',
1406
+ children: [
1407
+ {
1408
+ $el: 'pre',
1409
+ children: '$stringify( $get(form).value )',
1410
+ attrs: {
1411
+ class: 't-text-xs',
1412
+ style: 'overflow: scroll'
1413
+ }
1414
+ },
1415
+ {
1416
+ $el: 'pre',
1417
+ children: ['activeStep: ', '$activeStep'],
1418
+ attrs: {
1419
+ class: 't-text-xs',
1420
+ style: 'overflow: scroll'
1421
+ }
1422
+ },
1423
+ {
1424
+ $el: 'pre',
1425
+ children: ['stepHistory: ', '$stepHistory'],
1426
+ attrs: {
1427
+ class: 't-text-xs',
1428
+ style: 'overflow: scroll'
1429
+ }
1430
+ },
1431
+ {
1432
+ $el: 'pre',
1433
+ children: ['stepQueue: ', '$stepQueue'],
1434
+ attrs: {
1435
+ class: 't-text-xs',
1436
+ style: 'overflow: scroll'
1437
+ }
1438
+ },
1439
+ {
1440
+ $el: 'pre',
1441
+ children: ['steps: ', '$stepKeys()'],
1442
+ attrs: {
1443
+ class: 't-text-xs',
1444
+ style: 'overflow: scroll'
1445
+ }
1446
+ }
1447
+ ]
824
1448
  });
825
1449
 
826
-
827
- // ------ Question Groups
828
-
829
- // NOTE: name must be unique within a form!
830
- const group = (name, updates) => {
831
- return merge({
832
- $cmp: 'FormKit',
833
- props: {
834
- type: 'group',
835
- key: name,
836
- id: name,
837
- name: name
838
- }
839
- }, updates)
1450
+ const formPropDefaults = {
1451
+ type: 'form',
1452
+ id: 'form',
1453
+ config: { validationVisibility: 'submit' },
1454
+ onSubmit: '$submit($submitUrl, $prepData, $handleRedirect, "text/plain; charset=UTF-8")',
1455
+ plugins: '$plugins',
1456
+ actions: false,
1457
+ anchorElement: 'form-anchor',
1458
+ useLocalStorage: true,
1459
+ prepop: {
1460
+ fromURL: true
1461
+ },
1462
+ errorCodes: {
1463
+ 403: { message: "An Error Occurred", abort: false },
1464
+ 409: { abort: false },
1465
+ 429: "An Error Occurred",
1466
+ 504: { message: "An Error Occurred", abort: false },
1467
+ },
1468
+ formClass: '!t-max-w-[40rem]'
840
1469
  };
841
1470
 
842
- const BankruptcyQuestions = (condition, scope) => group(
843
- 'BankruptcyQuestions',
844
- {
845
- if: (condition || '$get(Type_Of_Legal_Problem).value == "Bankruptcy"'),
846
- children: [
847
- haveAttorney(scope),
848
- totalMonthlyIncome(),
849
- totalDebt(),
850
- ownRealEstate(),
851
- valueOfAssets(scope),
852
- degreeOfInterestHelp(scope)
853
- ]
854
- }
855
- );
856
-
857
- const CivilLawsuitQuestions = () => group(
858
- 'CivilLawsuitQuestions',
859
- {
860
- if: '$get(Type_Of_Legal_Problem).value == "Civil Lawsuit"',
861
- children: [
862
- haveAttorney(),
863
- lawsuitOtherParty(),
864
- degreeOfInterestHelp()
865
- ]
866
- }
867
- );
868
-
869
- const DebtAndCollectionsQuestions = () => group(
870
- 'DebtAndCollectionsQuestions',
871
- {
872
- if: '$get(Type_Of_Legal_Problem).value == "Debt and Collections"',
873
- children: [
874
- haveAttorney(),
875
- totalMonthlyIncome(),
876
- totalDebt(),
877
- ownRealEstate(),
878
- valueOfAssets(),
879
- degreeOfInterestHelp()
880
- ]
881
- }
882
- );
883
-
884
- const NotSureOrOtherQuestions = () => group(
885
- 'NotSureOrOtherQuestions',
886
- {
887
- if: '$get(Type_Of_Legal_Problem).value == "Not Sure or Other"',
888
- children: [
889
- haveAttorney(),
890
- degreeOfInterestHelp()
891
- ]
1471
+ function formProps(updates) {
1472
+ const props = merge(
1473
+ formPropDefaults,
1474
+ updates
1475
+ );
1476
+ if (props.formId && !props.name) {
1477
+ props.name = props.formId;
892
1478
  }
893
- );
894
-
895
- const NEXT_ON_ENTER = '$onEnter($setNextStep($fireStepEvent($get(form)), $preStepFunc($get(form))))';
896
- const NEXT_ON_INPUT = '$onInput($setNextStep($fireStepEvent($get(form)), $preStepFunc($get(form))))';
897
-
898
- const isInput = (n) => { return (n.type !== 'group' && n.type !== 'section' && n.type !== 'form' && n.$formkit !== 'hidden' && !n.children) };
1479
+ return props
1480
+ }
899
1481
 
900
- const findLastInput = (n) => {
901
- if (isInput(n)) {
902
- return n
903
- }
904
- for (var i = n.children.length - 1; i >= 0; i--) {
905
- if (typeof n.children === 'string') {
906
- continue
907
- }
908
- const child = n.children[i];
909
- if (isInput(child)) {
910
- return child
911
- }
912
- const res = findLastInput(child);
913
- if (res) {
914
- return res
915
- }
916
- }
917
- return null
1482
+ const metaDefaults = {
1483
+ tcpaLanguage: TCPA_LANGUAGE
918
1484
  };
919
1485
 
920
- function questionsStepHeadline(updates) {
1486
+ function metaProps(updates) {
1487
+ const data = merge(
1488
+ metaDefaults,
1489
+ updates
1490
+ );
921
1491
  return {
922
- $el: 'h3',
923
- children: updates.headline || 'Tell Us About Your Situation',
924
- attrs: {
925
- 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'
926
- }
1492
+ type: 'meta',
1493
+ data
927
1494
  }
928
1495
  }
929
1496
 
930
- function commentsStepHeadline(updates) {
931
- return {
932
- $el: 'h3',
933
- children: updates.headline || 'Additional Case Details',
934
- attrs: {
935
- 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 || '')
936
- }
937
- }
1497
+ function defaultMetaProps() {
1498
+ return metaProps({
1499
+ defaultCommentsPlaceholder: DEFAULT_COMMENTS_PLACEHOLDER_DYNAMIC,
1500
+ commentsPlaceholders: TOLPCommentsPlaceholders,
1501
+ defaultFinalHeadline: DEFAULT_FINAL_HEADLINE,
1502
+ finalHeadlines: TOLPFinalHeadlines,
1503
+ defaultFinalSubHeadline: DEFAULT_FINAL_SUBHEADLINE,
1504
+ finalSubHeadlines: TOLPFinalSubHeadlines,
1505
+ })
938
1506
  }
939
1507
 
940
- function firstAndLastStepHeadline(updates) {
941
- return {
942
- $el: 'h3',
943
- children: updates.headline || 'Please Provide a Contact Name',
944
- attrs: {
945
- 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 || '')
946
- }
1508
+ const dynamicSchemaNode = {
1509
+ $cmp: 'FormKitSchema',
1510
+ if: '$get(Type_Of_Legal_Problem).value',
1511
+ props: {
1512
+ schema: '$meta.dynamicSchema',
1513
+ data: '$buildData($meta)'
947
1514
  }
948
- }
1515
+ };
949
1516
 
950
- function contactStepHeadline(updates) {
951
- return {
952
- $el: 'h3',
953
- children: updates.headline || DEFAULT_FINAL_HEADLINE_DYNAMIC,
954
- attrs: {
955
- 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 || '')
1517
+ const formAnchorDefaults = {
1518
+ $el: 'div',
1519
+ children: [
1520
+ {
1521
+ $el: 'div',
1522
+ attrs: {
1523
+ id: 'form-anchor',
1524
+ class: 't-absolute',
1525
+ style: { top: '-30px', left: 0 }
1526
+ }
956
1527
  }
1528
+ ],
1529
+ attrs: {
1530
+ class: 't-relative'
957
1531
  }
958
- }
1532
+ };
959
1533
 
960
- function contactStepSubHeadline(updates) {
961
- return {
962
- $el: 'h5',
963
- children: updates.subheadline || DEFAULT_FINAL_SUBHEADLINE_DYNAMIC,
964
- attrs: {
965
- 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 || '')
966
- }
967
- }
1534
+ function formAnchor(updates) {
1535
+ return merge(
1536
+ formAnchorDefaults,
1537
+ updates
1538
+ )
968
1539
  }
969
1540
 
970
- const TRUSTED_FORM_JS = `(function() {
971
- if (window.xxTrustedFormLoaded) {
972
- return
973
- }
974
- var vid = '';
975
- if (typeof window.zar !== 'undefined') {
976
- vid = window.zar.getVID();
977
- }
978
- window.xxTrustedFormLoaded = true;
979
- var sandbox = document.location.hostname.indexOf('localhost') > -1 ? 'true' : 'false'
980
- var tf = document.createElement('script');
981
- tf.type = 'text/javascript'; tf.async = true;
982
- tf.src = ("https:" == document.location.protocol ? 'https' : 'http') + "://api.trustedform.com/trustedform.js?field=xxTrustedFormCertUrl&identifier=" + vid + "&ping_field=xxTrustedFormPingUrl&provideReferrer=false&invert_field_sensitivity=true&sandbox=" + sandbox + "&l=" + new Date().getTime() + Math.random();
983
- var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(tf, s);
984
- })();`;
985
-
986
- function trustedFormScript() {
1541
+ function headlineDefaults(updates = {}) {
987
1542
  return {
988
- $el: 'script',
989
- if: '$activeStep === $lastStep()',
990
- children: TRUSTED_FORM_JS
991
- }
992
- }
993
-
994
- const stepDefaults = (step, stepKey) => ({
995
- $el: 'section',
996
- if: '$stepEnabled("' + step + '")',
997
- attrs: {
998
- hidden: '$activeStep !== "' + step + '"',
999
- key: stepKey ? stepKey : step
1000
- }
1001
- });
1002
-
1003
- function step(name, inputs, nextOnEnter = true, nextOnInput = false, stepKey = undefined, nextStepMap = undefined, autoFocus = undefined) {
1004
- if (typeof nextOnEnter === 'undefined') {
1005
- nextOnEnter = true;
1006
- }
1007
- if (inputs && inputs.length && (nextOnEnter || nextOnInput)) {
1008
- const lastInput = findLastInput(inputs[inputs.length - 1]);
1009
- if (lastInput && nextOnEnter === true) {
1010
- lastInput.onKeypress = NEXT_ON_ENTER;
1011
- }
1012
- if (lastInput && nextOnInput === true) {
1013
- lastInput.onInput = NEXT_ON_INPUT;
1014
- }
1015
- }
1016
-
1017
- return merge(
1018
- stepDefaults(name, stepKey),
1019
- {
1020
- children: [
1021
- {
1022
- $formkit: 'group',
1023
- id: name,
1024
- name: name,
1025
- nextStepMap: nextStepMap,
1026
- autoFocus: autoFocus,
1027
- children: inputs
1028
- }
1029
- ]
1543
+ $el: 'h1',
1544
+ attrs: {
1545
+ class: 't-flex t-justify-center t-text-center !t-text-[2rem] t-font-semibold t-pt-5 t-px-7 md:t-px-3' + ' ' + (updates.headlineClass || '')
1030
1546
  }
1031
- )
1547
+ }
1032
1548
  }
1033
1549
 
1034
- function repossessionTOLPAndZip(updates = {}) {
1035
- return step(
1036
- 'repossessionTOLPAndZip',
1037
- [
1038
- {
1039
- $formkit: 'hidden',
1040
- name: "Type_Of_Legal_Problem",
1041
- id: "Type_Of_Legal_Problem",
1042
- value: "Debt and Collections"
1043
- },
1044
- repossessionTOLPDisplay(),
1045
- zipcode()
1046
- ],
1047
- updates.nextOnEnter
1550
+ function headline(updates = {}) {
1551
+ return merge(
1552
+ headlineDefaults(updates),
1553
+ updates
1048
1554
  )
1049
1555
  }
1050
1556
 
1051
- function commentsWithBankruptcyV2(updates = {}) {
1052
- return step(
1053
- 'commentsWithBankruptcy',
1054
- [
1055
- commentsStepHeadline(updates),
1056
- comments({
1057
- label: typeof updates.label === 'undefined' ? DEFAULT_COMMENTS_LABEL : updates.label,
1058
- placeholder: updates.placeholder || DEFAULT_COMMENTS_PLACEHOLDER_DYNAMIC,
1059
- inputClass: typeof updates.inputClass === 'undefined' ? '!t-h-40' : updates.inputClass,
1060
- }),
1061
- bankruptcyCrossSell(),
1062
- {
1063
- $el: 'div',
1064
- if: '$get(CrossSell_Bankruptcy).value == true',
1065
- children: [
1066
- comments({
1067
- label: 'Bankruptcy or debt details:',
1068
- placeholder: 'Please describe your bankrtupcy or debt situation in a few words...',
1069
- inputClass: '!t-h-16'
1070
- }, 'CrossSell:Bankruptcy')
1071
- ],
1072
- }
1073
- ],
1074
- updates.nextOnEnter,
1075
- )
1557
+ function subHeadlineDefaults(updates = {}) {
1558
+ return {
1559
+ $el: 'h3',
1560
+ attrs: {
1561
+ class: 't-flex t-justify-center t-text-center !t-text-[1.2rem] t-font-medium t-text-blue-500 t-px-10' + ' ' + (updates.subheadlineClass || '')
1562
+ }
1563
+ }
1076
1564
  }
1077
1565
 
1078
- function contactInfoV2(updates = {}) {
1079
- return step(
1080
- 'contactInfo',
1081
- [
1082
- contactStepHeadline(updates),
1083
- contactStepSubHeadline(updates),
1084
- // Added TF everywhere
1085
- trustedFormScript(),
1086
- email(),
1087
- phone(),
1088
- TCPAConsent(),
1089
- secureIcon()
1090
- ],
1091
- updates.nextOnEnter
1566
+ function subHeadline(updates = {}) {
1567
+ return merge(
1568
+ subHeadlineDefaults(updates),
1569
+ updates
1092
1570
  )
1093
1571
  }
1094
1572
 
1095
- function firstAndLastV2(updates = {}) {
1096
- return step(
1097
- 'firstAndLast',
1098
- [
1099
- firstAndLastStepHeadline(updates),
1100
- firstName(),
1101
- lastName()
1102
- ],
1103
- updates.nextOnEnter
1104
- )
1105
- }
1573
+ const hiddenInputsBase = [
1574
+ {
1575
+ $formkit: 'hidden',
1576
+ name: "gclid",
1577
+ value: null
1578
+ },
1579
+ {
1580
+ $formkit: 'hidden',
1581
+ name: "campaignid",
1582
+ value: null
1583
+ },
1584
+ {
1585
+ $formkit: 'hidden',
1586
+ name: "s",
1587
+ value: null
1588
+ }
1589
+ ];
1106
1590
 
1107
- function repossessionTOLPQuestions(updates = {}) {
1108
- return step(
1109
- 'TOLPQuestions',
1110
- [
1111
- questionsStepHeadline(updates),
1112
- DebtAndCollectionsQuestions(),
1113
- CivilLawsuitQuestions(),
1114
- BankruptcyQuestions(),
1115
- NotSureOrOtherQuestions()
1116
- ],
1117
- updates.nextOnEnter
1591
+ const hiddenInputsLegal = [
1592
+ {
1593
+ $formkit: 'hidden',
1594
+ name: "vertical",
1595
+ value: "Legal"
1596
+ },
1597
+ {
1598
+ $formkit: 'hidden',
1599
+ name: "TCPA_Language",
1600
+ value: "$meta.tcpaLanguage"
1601
+ },
1602
+ ...hiddenInputsBase
1603
+ ];
1604
+
1605
+ const legalRedirectMapDefaults = {
1606
+ '*': LegalRedirectUrl()
1607
+ };
1608
+
1609
+
1610
+ function legalRedirectMap(updates) {
1611
+ return merge(
1612
+ legalRedirectMapDefaults,
1613
+ updates
1118
1614
  )
1119
1615
  }
1120
1616
 
1121
- const formNavigationV2 = () => ({
1122
- $el: 'div',
1123
- attrs: {
1124
- class: 'step-nav'
1617
+ const legalAllValueOverrideMap = {
1618
+ 'Civil_Defense': {
1619
+ 'Yes': {
1620
+ 'Type_Of_Legal_Problem': 'Defend a Lawsuit'
1621
+ },
1622
+ 'No': {
1623
+ 'Type_Of_Legal_Problem': 'File a Lawsuit'
1624
+ }
1125
1625
  },
1126
- children: [
1127
- {
1128
- $formkit: 'button',
1129
- name: 'back_button',
1130
- onClick: '$setPreviousStep($prevStepFunc($get(form)))',
1131
- children: 'Back',
1132
- style: {
1133
- if: '$activeStep === $firstStep()',
1134
- then: 'visibility: hidden;'
1135
- }
1626
+ 'Type_Of_Legal_Problem_Display': {
1627
+ // Accidents and PI
1628
+ 'Auto Accident': {
1629
+ 'Type_Of_Legal_Problem': 'Auto and Car Accidents'
1630
+ },
1631
+ 'Dog Bite': {
1632
+ 'Type_Of_Legal_Problem': 'Personal Injury'
1633
+ },
1634
+ 'Slip and Fall': {
1635
+ 'Type_Of_Legal_Problem': 'Personal Injury'
1636
+ },
1637
+ 'Workplace Injury': {
1638
+ 'Type_Of_Legal_Problem': 'Workers Compensation'
1639
+ },
1640
+ 'Trucking Accident': {
1641
+ 'Type_Of_Legal_Problem': 'Auto and Car Accidents'
1642
+ },
1643
+ 'Motorcycle Accident': {
1644
+ 'Type_Of_Legal_Problem': 'Auto and Car Accidents',
1645
+ },
1646
+ 'Other Accidents or Injuries': {
1647
+ 'Type_Of_Legal_Problem': 'Personal Injury'
1648
+ },
1649
+ // Civil
1650
+ 'Automobile Accident': {
1651
+ 'Type_Of_Legal_Problem': 'Auto and Car Accidents'
1652
+ },
1653
+ 'Contract Disputes': {
1654
+ 'Type_Of_Legal_Problem': 'Business Lawyers'
1655
+ },
1656
+ 'Defamation and Slander': {
1657
+ 'Type_Of_Legal_Problem': 'File a Lawsuit'
1658
+ },
1659
+ 'Dog Bite': {
1660
+ 'Type_Of_Legal_Problem': 'Personal Injury'
1661
+ },
1662
+ 'Employment and Workplace': {
1663
+ 'Type_Of_Legal_Problem': 'Employment and Workplace'
1664
+ },
1665
+ 'Fraud': {
1666
+ 'Type_Of_Legal_Problem': 'Consumer Lawyers'
1667
+ },
1668
+ 'Medical Malpractice': {
1669
+ 'Type_Of_Legal_Problem': 'Medical Malpractice'
1670
+ },
1671
+ 'Personal Injury': {
1672
+ 'Type_Of_Legal_Problem': 'Personal Injury'
1673
+ },
1674
+ 'Property Damage': {
1675
+ 'Type_Of_Legal_Problem': 'Property Damage'
1676
+ },
1677
+ 'Small Claims': {
1678
+ 'Type_Of_Legal_Problem': 'File a Lawsuit'
1679
+ },
1680
+ 'Real Estate': {
1681
+ 'Type_Of_Legal_Problem': 'Real Estate'
1682
+ },
1683
+ 'Other (describe on next page)': {
1684
+ 'Type_Of_Legal_Problem': 'Not Sure or Other'
1685
+ },
1686
+ // Contracts
1687
+ 'Contract Creation': {
1688
+ 'Type_Of_Legal_Problem': 'Business Lawyers',
1689
+ 'Business_Services': 'Contracts'
1690
+ },
1691
+ 'Contract Enforcement': {
1692
+ 'Type_Of_Legal_Problem': 'Business Lawyers',
1693
+ 'Business_Services': 'Contracts'
1694
+ },
1695
+ 'Contract Cancellation': {
1696
+ 'Type_Of_Legal_Problem': 'Business Lawyers',
1697
+ 'Business_Services': 'Contracts'
1698
+ },
1699
+ 'Contract Fraud': {
1700
+ 'Type_Of_Legal_Problem': 'Business Lawyers',
1701
+ 'Business_Services': 'Contracts'
1702
+ },
1703
+ 'Breach of Contract': {
1704
+ 'Type_Of_Legal_Problem': 'Business Lawyers',
1705
+ 'Business_Services': 'Contracts'
1706
+ },
1707
+ 'Other Contract Issues': {
1708
+ 'Type_Of_Legal_Problem': 'Business Lawyers',
1709
+ 'Business_Services': 'Contracts'
1710
+ },
1711
+ // Criminal
1712
+ 'Criminal Defense': {
1713
+ 'Type_Of_Legal_Problem': 'Criminal and Felony'
1714
+ },
1715
+ 'Victim of a Crime': {
1716
+ 'Type_Of_Legal_Problem': 'Victim of a Crime'
1717
+ },
1718
+ 'DUI and DWI': {
1719
+ 'Type_Of_Legal_Problem': 'DUI and DWI'
1720
+ },
1721
+ 'Expungement': {
1722
+ 'Type_Of_Legal_Problem': 'Expungement'
1723
+ },
1724
+ 'Harassment': {
1725
+ 'Type_Of_Legal_Problem': 'Criminal and Felony'
1726
+ },
1727
+ 'Not Sure or Other': {
1728
+ 'Type_Of_Legal_Problem': 'Not Sure or Other'
1729
+ },
1730
+ // Employment and Workplace
1731
+ 'Workplace Harassment': {
1732
+ 'Type_Of_Legal_Problem': 'Workplace Harassment'
1136
1733
  },
1137
- {
1138
- $formkit: 'button',
1139
- name: 'next_button',
1140
- onClick: '$setNextStep($fireStepEvent($get(form)), $preStepFunc($get(form)))',
1141
- children: {
1142
- if: '$activeStep === $firstStep()',
1143
- then: 'Start',
1144
- else: 'Next'
1145
- },
1146
- outerClass: {
1147
- if: '$activeStep === $lastStep()',
1148
- then: 't-hidden',
1149
- else: ''
1150
- },
1151
- style: {
1152
- if: '$activeStep === $lastStep()',
1153
- then: 'display: none;'
1154
- }
1734
+ 'Workplace Discrimination': {
1735
+ 'Type_Of_Legal_Problem': 'Workplace Discrimination'
1155
1736
  },
1156
- {
1157
- $formkit: 'submit',
1158
- name: 'submit_button',
1159
- label: 'Submit',
1160
- if: '$activeStep === $lastStep()',
1161
- style: {
1162
- if: '$activeStep !== $lastStep()',
1163
- then: 'display: none;'
1164
- }
1165
- }
1166
- ]
1167
- });
1168
-
1169
- const formDetails = () => ({
1170
- $el: 'pre',
1171
- if: '$urlParam("fdbg", "") == 1',
1172
- children: [
1173
- {
1174
- $el: 'pre',
1175
- children: '$stringify( $get(form).value )',
1176
- attrs: {
1177
- class: 't-text-xs',
1178
- style: 'overflow: scroll'
1179
- }
1737
+ 'Wrongful Termination': {
1738
+ 'Type_Of_Legal_Problem': 'Wrongful Termination'
1180
1739
  },
1181
- {
1182
- $el: 'pre',
1183
- children: ['activeStep: ', '$activeStep'],
1184
- attrs: {
1185
- class: 't-text-xs',
1186
- style: 'overflow: scroll'
1187
- }
1740
+ 'Payment Disputes': {
1741
+ 'Type_Of_Legal_Problem': 'Employment and Workplace'
1188
1742
  },
1189
- {
1190
- $el: 'pre',
1191
- children: ['stepHistory: ', '$stepHistory'],
1192
- attrs: {
1193
- class: 't-text-xs',
1194
- style: 'overflow: scroll'
1195
- }
1743
+ 'Workers Compensation': {
1744
+ 'Type_Of_Legal_Problem': 'Workers Compensation'
1196
1745
  },
1197
- {
1198
- $el: 'pre',
1199
- children: ['stepQueue: ', '$stepQueue'],
1200
- attrs: {
1201
- class: 't-text-xs',
1202
- style: 'overflow: scroll'
1203
- }
1746
+ 'Unemployment': {
1747
+ 'Type_Of_Legal_Problem': 'Unemployment'
1204
1748
  },
1205
- {
1206
- $el: 'pre',
1207
- children: ['steps: ', '$stepKeys()'],
1208
- attrs: {
1209
- class: 't-text-xs',
1210
- style: 'overflow: scroll'
1211
- }
1749
+ 'Other Workplace Issues': {
1750
+ 'Type_Of_Legal_Problem': 'Employment and Workplace'
1751
+ },
1752
+ // Malpractice
1753
+ 'Attorney Malpractice': {
1754
+ 'Type_Of_Legal_Problem': 'Civil Lawsuit'
1755
+ },
1756
+ 'Other Malpractice Issues': {
1757
+ 'Type_Of_Legal_Problem': 'Not Sure or Other'
1758
+ },
1759
+ // Repossession
1760
+ 'Vehicle Repossession': {
1761
+ 'Type_Of_Legal_Problem': 'Bankruptcy'
1762
+ },
1763
+ 'Property Repossession': {
1764
+ 'Type_Of_Legal_Problem': 'Bankruptcy'
1765
+ },
1766
+ 'Other Repossession Issues': {
1767
+ 'Type_Of_Legal_Problem': 'Not Sure or Other'
1768
+ },
1769
+ // Real Estate
1770
+ 'Contracts and Agreements': {
1771
+ 'Type_Of_Legal_Problem': 'Real Estate'
1772
+ },
1773
+ 'Deeds, Liens, and Titles': {
1774
+ 'Type_Of_Legal_Problem': 'Real Estate'
1775
+ },
1776
+ 'Foreclosure': {
1777
+ 'Type_Of_Legal_Problem': 'Foreclosure'
1778
+ },
1779
+ 'Insurance': {
1780
+ 'Type_Of_Legal_Problem': 'Insurance'
1781
+ },
1782
+ 'Landlord and Tenant': {
1783
+ 'Type_Of_Legal_Problem': 'Landlord and Tenant',
1784
+ },
1785
+ 'Loans and Mortgages': {
1786
+ 'Type_Of_Legal_Problem': 'Real Estate',
1787
+ },
1788
+ 'Wills, Trusts, and Estates': {
1789
+ 'Type_Of_Legal_Problem': 'Wills and Trusts'
1790
+ },
1791
+ 'Property Damage': {
1792
+ 'Type_Of_Legal_Problem': 'Property Damage'
1793
+ },
1794
+ 'Other Real Estate Issues': {
1795
+ 'Type_Of_Legal_Problem': 'Real Estate'
1212
1796
  }
1797
+ }
1798
+ };
1799
+
1800
+ const TOLPCommentsPlaceholders = {
1801
+ 'Adoption': 'Example: "I need help with adoption forms"',
1802
+ 'Asbestos and Mesothelioma': 'Example: "I was exposed to asbestos at work and would like to file a claim"',
1803
+ 'Auto and Car Accidents': 'Example: "A truck crashed into my car on the highway" or "I\'ve been involved in a hit and run accident"',
1804
+ 'Bankruptcy': 'Example: "I need help filing for bankruptcy"',
1805
+ 'Birth Certificate and Name Change': 'Example: "Just married and would like to change my last name"',
1806
+ 'Business Lawyers': 'Example: "I need help incorporating a business" or "I would like a legal contract reviewed"',
1807
+ 'Child Custody and Support': 'Example: "Need help getting custody" or "Issues with child support payments"',
1808
+ 'Child Custody': 'Example: "Need help getting custody"',
1809
+ 'Child Support': 'Example: "Issues with child support payments"',
1810
+ 'Civil Rights and Discrimination': 'Example: "Police brutality" or "Coworker keeps harassing me"',
1811
+ 'Civil Lawsuit': 'Example: "A contractor took my money and never completed the job" or "I am being sued by a neighbor"',
1812
+ 'File a Lawsuit': 'Example: "A contractor took my money and never completed the job"',
1813
+ 'Defend a Lawsuit': 'Example: "I am being sued by a neighbor"',
1814
+ 'Consumer Lawyers': 'Example: "Someone committed fraud against me" or "A contractor took my money and never completed the job"',
1815
+ 'Copyrights and Trademarks': 'Example: "I would like to register a trademark or copyright a name"',
1816
+ 'Criminal and Felony': 'Example: "I was arrested for DUI and need legal defense" or "I am being charged with assault"',
1817
+ 'Debt and Collections': 'Example: "I would like to consolidate my debt" or "A collection agency is harassing me"',
1818
+ 'Divorce and Separation': 'Example: "I would like to file for an uncontested divorce"',
1819
+ 'DUI and DWI': 'Example: "I was arrested for DUI and need legal defense"',
1820
+ 'Elder Law': 'Example: "I would like help with Estate Planning" or "I need help with a guardianship"',
1821
+ 'Employment and Workplace': 'Example: "I was injured while on the job" or "My company is discriminating against me"',
1822
+ 'Expungement': 'Example: "I would like to file for an expungement and clear my record"',
1823
+ 'Family Issues': 'Example: "I need help with guardianship" or "I need a simple will created"',
1824
+ 'Foreclosure': 'Example: "I need help to avoid foreclosure on my house"',
1825
+ 'Guardianship': 'Example: "I need help with guardianship documents"',
1826
+ 'Harassment and Discrimination': 'Example: "I am being discriminated at work" or "My neighbor is harassing me"',
1827
+ 'Sexual Harassment': 'Example: "I am being sexually harassed by a coworker"',
1828
+ 'Workplace Harassment': 'Example: "My coworker is being aggressive towards me"',
1829
+ 'Non-Workplace Harassment': 'Example: "My neighbor is harassing me"',
1830
+ 'Workplace Discrimination': 'Example: "I am being discriminated at work based on my age"',
1831
+ 'Non-Workplace Discrimination': 'Example: "I am being discriminated against by a local official"',
1832
+ 'Identity Theft': 'Example: "Someone stole my identity and I need help fixing the issue"',
1833
+ 'Immigration and Visas': 'Example: "I need help filing for a visa" or "Help with a green card"',
1834
+ 'Insurance': 'Example: "I need help filing an insurance claim for damage to my house"',
1835
+ 'Landlord and Tenant': 'Example: "I need help to fight an eviction" or "I would like a lawyer to review a rental contract"',
1836
+ 'Lemon Law': 'Example: "I purchased a new vehicle that broke down already and seller will not assist"',
1837
+ 'Long Term Disability': 'Example: "I was injured on the job and would like to file for benefits" or "I need help filing for disability benefits"',
1838
+ 'Medical Malpractice': 'Example: "A doctor performed surgery on the wrong limb and I would like to file a lawsuit"',
1839
+ 'Patents and Intellectual Property': 'Example: "I would like to file for a patent" or "I need to copyright a name"',
1840
+ 'Personal Injury': 'Example: "I was bit by the neighbor\'s dog" or "I fell in the icy grocery store parking lot"',
1841
+ 'Power of Attorney': 'Example: "I need help with a limited or general power of attorney"',
1842
+ 'Probate and Estates': 'Example: "I need help with planning for my estate" or "A family member passed without a will in place"',
1843
+ 'Product Liability': 'Example: "My car battery caught on fire" or "I purchased a faulty product"',
1844
+ 'Property Damage': 'Example: "The neighbor\'s tree fell on my fence" or "My car was hit in the parking lot"',
1845
+ 'Real Estate': 'Example: "I need help with a quitclaim deed" or "I need a lawyer to review a purchase and sales agreement"',
1846
+ 'Social Security Disability and Insurance': 'Example: "I would like help filing for disability benefits" or "I\'ve been denied for SSDI and would like to appeal"',
1847
+ 'Tax and IRS': 'Example: "I need help fighting an IRS tax claim" or "I need audit defense"',
1848
+ 'Traffic and Tickets': 'Example: "I need help reinstating a supsended license" or "I would like to fight a traffic ticket"',
1849
+ 'Unemployment': 'Example: "I need help filing for unemployment benefits"',
1850
+ 'Victim of a Crime': 'Example: "I was assaulted in the store" or "I am being discriminated against at work"',
1851
+ 'Wills and Trusts': 'Example: "I need a simple will created" or "I would like guidance on creating a trust fund"',
1852
+ 'Workers Compensation': 'Example: "I was injured at work and would like to file for workers compensation benefits"',
1853
+ 'Wrongful Death': 'Example: "A family member was killed on the job and we need legal representation"',
1854
+ 'Wrongful Termination': 'Example: "I was fired by my employer without cause"',
1855
+ 'Not Sure or Other': 'Example: "I was involved in a car accident" or "I need help setting up power of attorney"'
1856
+ };
1857
+
1858
+ const TOLPFinalHeadlines = {
1859
+ // 'Adoption': '',
1860
+ };
1861
+
1862
+ const TOLPFinalSubHeadlines = {
1863
+ 'Adoption': 'You may benefit from speaking with an adoption professional. Please verify your contact information.',
1864
+ // 'Asbestos and Mesothelioma': '',
1865
+ 'Auto and Car Accidents': 'You may benefit from speaking with an accident professional. Please verify your contact information.',
1866
+ 'Bankruptcy': 'You may benefit from speaking with a bankruptcy professional. Please verify your contact information.',
1867
+ // 'Birth Certificate and Name Change': '',
1868
+ // 'Business Lawyers': '',
1869
+ // 'Child Custody and Support': '',
1870
+ // 'Civil Rights and Discrimination': '',
1871
+ // 'Civil Lawsuit': '',
1872
+ // 'Consumer Lawyers': '',
1873
+ 'Copyrights and Trademarks': 'You may benefit from speaking with a copyright and trademark professional. Please verify your contact information.',
1874
+ // 'Criminal and Felony': '',
1875
+ // 'Debt and Collections': '',
1876
+ 'Divorce and Separation': 'You may benefit from speaking with a divorce professional. Please verify your contact information.',
1877
+ 'DUI and DWI': 'You may benefit from speaking with a DUI professional. Please verify your contact information.',
1878
+ 'Elder Law': 'You may benefit from speaking with an elder law professional. Please verify your contact information.',
1879
+ // 'Employment and Workplace': '',
1880
+ // 'Expungement': '',
1881
+ // 'Family Issues': '',
1882
+ 'Foreclosure': 'You may benefit from speaking with a foreclosure professional. Please verify your contact information.',
1883
+ 'Guardianship': 'You may benefit from speaking with a guardianship professional. Please verify your contact information.',
1884
+ // 'Harassment and Discrimination': '',
1885
+ // 'Identity Theft': '',
1886
+ 'Immigration and Visas': 'You may benefit from speaking with a immigration professional. Please verify your contact information.',
1887
+ // 'Insurance': '',
1888
+ 'Landlord and Tenant': 'You may benefit from speaking with a landlord and tenant legal professional. Please verify your contact information.',
1889
+ // 'Lemon Law': '',
1890
+ 'Long Term Disability': 'You may benefit from speaking with a disability legal professional. Please verify your contact information.',
1891
+ 'Medical Malpractice': 'You may benefit from speaking with a malpractice professional. Please verify your contact information.',
1892
+ 'Patents and Intellectual Property': 'You may benefit from speaking with a patent professional. Please verify your contact information.',
1893
+ 'Personal Injury': 'You may benefit from speaking with a personal injury professional. Please verify your contact information.',
1894
+ // 'Power of Attorney': '',
1895
+ 'Probate and Estates': 'You may benefit from speaking with a probate and estate professional. Please verify your contact information.',
1896
+ // 'Product Liability': '',
1897
+ // 'Property Damage': '',
1898
+ 'Real Estate': 'You may benefit from speaking with a real estate professional. Please verify your contact information.',
1899
+ 'Social Security Disability and Insurance': 'You may benefit from speaking with an SSDI professional. Please verify your contact information.',
1900
+ 'Tax and IRS': 'You may benefit from speaking with a tax professional. Please verify your contact information.',
1901
+ // 'Traffic and Tickets': '',
1902
+ 'Unemployment': 'You may benefit from speaking with an unemployment professional. Please verify your contact information.',
1903
+ // 'Victim of a Crime': '',
1904
+ // 'Wills and Trusts': '',
1905
+ 'Workers Compensation': 'You may benefit from speaking with a workers compensation professional. Please verify your contact information.',
1906
+ // 'Wrongful Death': '',
1907
+ // 'Wrongful Termination': '',
1908
+ // 'Not Sure or Other': ''
1909
+ // 'Sexual Harassment': '',
1910
+ // 'Workplace Harassment': '',
1911
+ // 'Non-Workplace Harassment': '',
1912
+ // 'Workplace Discrimination': '',
1913
+ // 'Non-Workplace Discrimination': '',
1914
+ };
1915
+
1916
+
1917
+ const nextStepsMapLegalLegacy = {
1918
+ '*': [
1919
+ 'TOLPQuestions',
1920
+ 'commentsWithBankruptcy',
1921
+ 'legalCrossSells',
1922
+ 'firstAndLast',
1923
+ 'contactInfo',
1213
1924
  ]
1214
- });
1925
+ };
1926
+
1927
+ const meta = defaultMetaProps();
1928
+
1929
+ meta.data.dynamicSchema = [
1930
+ repossessionTOLPQuestions(),
1931
+ commentsWithBankruptcy({
1932
+ placeholder: 'Example: "My car is being repossessed and I need help."',
1933
+ }),
1934
+ legalCrossSells(),
1935
+ autoAndCarAccidentCrossSellQuestions(),
1936
+ personalInjuryCrossSellQuestions(),
1937
+ workersCompensationCrossSellQuestions(),
1938
+ duiAndDWICrossSellQuestions(),
1939
+ ssdiCrossSellQuestions(),
1940
+ powerOfAttorneyCrossSellQuestions(),
1941
+ willsAndTrustsCrossSellQuestions(),
1942
+ divorceAndSeparationCrossSellQuestions(),
1943
+ childCustodyCrossSellQuestions(),
1944
+ firstAndLastV2(),
1945
+ ];
1215
1946
 
1216
1947
  const schema = [
1217
- defaultMetaProps(),
1948
+ meta,
1218
1949
  formAnchor(),
1219
1950
  {
1220
1951
  $cmp: 'FormKit',
@@ -1239,17 +1970,12 @@ const schema = [
1239
1970
  class: 'form-body'
1240
1971
  },
1241
1972
  children: [
1242
- repossessionTOLPAndZip(),
1243
- repossessionTOLPQuestions(),
1244
- commentsWithBankruptcyV2({
1245
- nextOnEnter: false,
1246
- placeholder: 'Example: "My car is being repossessed and I need help."',
1247
- }),
1248
- firstAndLastV2(),
1249
- contactInfoV2({
1250
- nextOnEnter: false
1973
+ repossessionTOLPAndZip({
1974
+ nextStepMap: nextStepsMapLegalLegacy
1251
1975
  }),
1252
- formNavigationV2(),
1976
+ dynamicSchemaNode,
1977
+ contactInfo(),
1978
+ formNavigation(),
1253
1979
  formDetails()
1254
1980
  ]
1255
1981
  }