bhl-forms 0.6.4 → 0.6.6

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 (74) 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 +1439 -864
  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 +789 -768
  11. package/dist/forms/childAndFamily.iife.js +1 -1
  12. package/dist/forms/childAndFamily.json +1 -1
  13. package/dist/forms/childAndFamilySingle.es.js +755 -750
  14. package/dist/forms/childAndFamilySingle.iife.js +1 -1
  15. package/dist/forms/childAndFamilySingle.json +1 -1
  16. package/dist/forms/civilLawsuit.es.js +835 -809
  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 -720
  22. package/dist/forms/contracts.iife.js +1 -1
  23. package/dist/forms/contracts.json +1 -1
  24. package/dist/forms/criminal.es.js +870 -828
  25. package/dist/forms/criminal.iife.js +1 -1
  26. package/dist/forms/criminal.json +1 -1
  27. package/dist/forms/employmentAndWorkplace.es.js +1827 -1193
  28. package/dist/forms/employmentAndWorkplace.iife.js +1 -1
  29. package/dist/forms/employmentAndWorkplace.json +1 -1
  30. package/dist/forms/generalLegal.es.js +852 -811
  31. package/dist/forms/generalLegal.iife.js +1 -1
  32. package/dist/forms/generalLegal.json +1 -1
  33. package/dist/forms/generalLegalPopUnder.es.js +852 -810
  34. package/dist/forms/generalLegalPopUnder.iife.js +1 -1
  35. package/dist/forms/generalLegalPopUnder.json +1 -1
  36. package/dist/forms/generalLegalSingle.es.js +1525 -1506
  37. package/dist/forms/generalLegalSingle.iife.js +1 -1
  38. package/dist/forms/generalLegalSingle.json +1 -1
  39. package/dist/forms/generalLegalThankYou.es.js +708 -698
  40. package/dist/forms/generalLegalThankYou.iife.js +1 -1
  41. package/dist/forms/generalLegalThankYou.json +1 -1
  42. package/dist/forms/harassmentAndDiscrimination.es.js +1481 -702
  43. package/dist/forms/harassmentAndDiscrimination.iife.js +1 -1
  44. package/dist/forms/harassmentAndDiscrimination.json +1 -1
  45. package/dist/forms/malpractice.es.js +1764 -1071
  46. package/dist/forms/malpractice.iife.js +1 -1
  47. package/dist/forms/malpractice.json +1 -1
  48. package/dist/forms/mechanics.es.js +115 -115
  49. package/dist/forms/mechanics.iife.js +1 -1
  50. package/dist/forms/realEstate.es.js +1556 -1213
  51. package/dist/forms/realEstate.iife.js +1 -1
  52. package/dist/forms/realEstate.json +1 -1
  53. package/dist/forms/repossession.es.js +1572 -851
  54. package/dist/forms/repossession.iife.js +1 -1
  55. package/dist/forms/repossession.json +1 -1
  56. package/dist/forms/ssdi.es.js +672 -677
  57. package/dist/forms/ssdi.iife.js +1 -1
  58. package/dist/forms/ssdi.json +1 -1
  59. package/dist/forms/testForm.es.js +473 -468
  60. package/dist/forms/testForm.iife.js +1 -1
  61. package/dist/forms/testForm.json +1 -1
  62. package/dist/forms/testRedirects.es.js +104 -101
  63. package/dist/forms/testRedirects.iife.js +1 -1
  64. package/dist/forms/testRedirects.json +1 -1
  65. package/dist/forms/vets.es.js +115 -115
  66. package/dist/forms/vets.iife.js +1 -1
  67. package/dist/forms/willsAndTrusts.es.js +1298 -710
  68. package/dist/forms/willsAndTrusts.iife.js +1 -1
  69. package/dist/forms/willsAndTrusts.json +1 -1
  70. package/dist/main.css +1 -1
  71. package/package.json +1 -1
  72. package/dist/forms/generalLegalPopUnderTF.es.js +0 -3092
  73. package/dist/forms/generalLegalPopUnderTF.iife.js +0 -1
  74. package/dist/forms/generalLegalPopUnderTF.json +0 -1
@@ -15,624 +15,186 @@ 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
177
- },
178
- {
179
- $formkit: 'hidden',
180
- name: "campaignid",
181
- value: null
182
- },
183
- {
184
- $formkit: 'hidden',
185
- name: "s",
186
- value: null
187
- }
188
- ];
189
-
190
- const hiddenInputsLegal = [
191
- {
192
- $formkit: 'hidden',
193
- name: "vertical",
194
- value: "Legal"
195
- },
196
- {
197
- $formkit: 'hidden',
198
- name: "TCPA_Language",
199
- value: "$meta.tcpaLanguage"
200
- },
201
- ...hiddenInputsBase
202
- ];
203
-
204
- const legalRedirectMapDefaults = {
205
- '*': LegalRedirectUrl()
206
- };
207
-
208
-
209
- function legalRedirectMap(updates) {
210
- return merge(
211
- legalRedirectMapDefaults,
212
- updates
213
- )
214
- }
215
-
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'
223
- }
224
- },
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'
392
- },
393
- 'Other Real Estate Issues': {
394
- 'Type_Of_Legal_Problem': 'Real Estate'
395
- }
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"'
455
- };
456
-
457
- const TOLPFinalHeadlines = {
458
- // 'Adoption': '',
459
- };
460
-
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
- };
514
-
515
- // ------ Common Base Settings
516
-
517
- const checkbox = (updates) => {
518
- if (updates.name && !updates.id) {
519
- updates.id = updates.name;
520
- }
521
- return merge({
522
- $formkit: 'checkbox',
523
- validation: 'required',
524
- validationMessages: {
525
- required: 'Field is required'
526
- }
527
- }, updates)
528
- };
529
-
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
- };
538
-
539
- const radio = (updates) => {
540
- if (updates.name && !updates.id) {
541
- updates.id = updates.name;
542
- }
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
- };
553
-
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
- };
562
-
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
- };
571
-
572
- const sbsYesNoRadio = (updates) => {
573
- updates.options = ['Yes', 'No'];
574
- return sbs2ItemRadio(updates)
575
- };
576
-
577
- const select = (updates) => {
578
- if (updates.name && !updates.id) {
579
- updates.id = updates.name;
580
- }
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
- };
592
-
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
- };
600
-
601
- const text = (updates) => {
602
- if (updates.name && !updates.id) {
603
- updates.id = updates.name;
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',
604
191
  }
605
- return merge({
606
- $formkit: 'text',
607
- validation: 'required',
608
- validationMessages: {
609
- required: 'Field is required'
610
- },
611
- labelClass: 'required'
612
- }, updates)
613
- };
614
-
615
- const sbsText = (updates) => {
616
- updates.wrapperClass = 'side-by-side t-items-center';
617
- return text(updates)
618
- };
192
+ });
619
193
 
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
- };
194
+ const atFault = (scope) => sbsYesNoRadio({
195
+ name: scope ? scope + ':' + 'At_Fault' : 'At_Fault',
196
+ label: 'Were You at Fault?'
197
+ });
636
198
 
637
199
  const bankruptcyCrossSell = () => sbsCheckbox({
638
200
  label: "I'd also like a consult for bankruptcy or debt elimination (optional)",
@@ -644,6 +206,77 @@ const bankruptcyCrossSell = () => sbsCheckbox({
644
206
  helpClass: "!t-text-sm"
645
207
  });
646
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
+
647
280
  const comments = (updates, scope) => textArea(
648
281
  merge({
649
282
  name: scope ? scope + ':' + 'Comments' : 'Comments',
@@ -667,6 +300,21 @@ const degreeOfInterest = (scope, help) => sbsSelect({
667
300
 
668
301
  const degreeOfInterestHelp = (scope) => degreeOfInterest(scope, 'No payment necessary to speak with lawyers.');
669
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
+
670
318
  const email = () => sbsText({
671
319
  $formkit: 'email',
672
320
  name: 'Email',
@@ -681,6 +329,19 @@ const email = () => sbsText({
681
329
  }
682
330
  });
683
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
+
684
345
  const firstName = () => sbsText({
685
346
  $formkit: 'text',
686
347
  label: 'First Name:',
@@ -697,6 +358,16 @@ const haveAttorney = (scope) => sbsYesNoRadio({
697
358
  label: 'Already Working with An Attorney?'
698
359
  });
699
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
+
700
371
  const lastName = () => sbsText({
701
372
  $formkit: 'text',
702
373
  label: 'Last Name:',
@@ -719,11 +390,114 @@ const lawsuitOtherParty = () => sbsSelect({
719
390
  ]
720
391
  });
721
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
+
722
491
  const ownRealEstate = () => sbsYesNoRadio({
723
492
  name: 'Own_Real_Estate',
724
493
  label: 'Do You Own Real Estate?'
725
494
  });
726
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
+
727
501
  const phone = () => sbsText({
728
502
  $formkit: 'tel',
729
503
  name: 'Primary_Phone',
@@ -742,6 +516,31 @@ const phone = () => sbsText({
742
516
  helpClass: "t-mt-2.5 md:t-text-right md:t-mt-[-2px]"
743
517
  });
744
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
+ "Other (describe on next page)"
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
+
745
544
  const repossessionTOLPDisplay = (updates) => col2Radio(merge({
746
545
  name: 'Type_Of_Legal_Problem_Display',
747
546
  label: 'Select The Repossession Issue:',
@@ -752,6 +551,22 @@ const repossessionTOLPDisplay = (updates) => col2Radio(merge({
752
551
  ]
753
552
  }, updates));
754
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
+
755
570
  const totalDebt = () => sbsSelect({
756
571
  label: 'Total Debt?',
757
572
  name: 'Total_Debt',
@@ -796,6 +611,33 @@ const TCPAConsent = () => ({
796
611
  }
797
612
  });
798
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
+
799
641
  const valueOfAssets = (scope) => sbsSelect({
800
642
  name: scope ? scope + ':' + 'Value_Of_Assets' : 'Value_Of_Assets',
801
643
  label: 'Value of Your Assets?',
@@ -839,6 +681,21 @@ const group = (name, updates) => {
839
681
  }, updates)
840
682
  };
841
683
 
684
+ const AutoAndCarAccidentsQuestions = (condition, scope) => group(
685
+ 'AutoAndCarAccidentsQuestions',
686
+ {
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
+
842
699
  const BankruptcyQuestions = (condition, scope) => group(
843
700
  'BankruptcyQuestions',
844
701
  {
@@ -854,6 +711,21 @@ const BankruptcyQuestions = (condition, scope) => group(
854
711
  }
855
712
  );
856
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
+
857
729
  const CivilLawsuitQuestions = () => group(
858
730
  'CivilLawsuitQuestions',
859
731
  {
@@ -881,6 +753,107 @@ const DebtAndCollectionsQuestions = () => group(
881
753
  }
882
754
  );
883
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
+ ]
824
+ }
825
+ );
826
+
827
+ const WillsAndTrustsQuestions = (condition, scope) => group(
828
+ 'WillsAndTrustsQuestions',
829
+ {
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',
844
+ {
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
+ );
856
+
884
857
  const NotSureOrOtherQuestions = () => group(
885
858
  'NotSureOrOtherQuestions',
886
859
  {
@@ -914,312 +887,1065 @@ const findLastInput = (n) => {
914
887
  return res
915
888
  }
916
889
  }
917
- return null
918
- };
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'
898
+ },
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
+ }
912
+ },
913
+ {
914
+ $el: 'span',
915
+ children: 'Secure & Encrypted',
916
+ attrs: {
917
+ class: 't-pl-2 t-pt-1 t-font-medium'
918
+ }
919
+ }
920
+ ]
921
+ };
922
+
923
+ function secureIcon(updates) {
924
+ return merge(
925
+ secureIconDefault,
926
+ updates
927
+ )
928
+ }
929
+
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
+ }
939
+
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
+ }
949
+
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
+ }
957
+ }
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 || '')
966
+ }
967
+ }
968
+ }
919
969
 
920
- function questionsStepHeadline(updates) {
970
+ function firstAndLastStepHeadline(updates) {
921
971
  return {
922
972
  $el: 'h3',
923
- children: updates.headline || 'Tell Us About Your Situation',
973
+ children: updates.headline || 'Please Provide a Contact Name',
924
974
  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'
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 || '')
926
976
  }
927
977
  }
928
978
  }
929
979
 
930
- function commentsStepHeadline(updates) {
980
+ function legalCrossSellsStepHeadline(updates) {
931
981
  return {
932
982
  $el: 'h3',
933
- children: updates.headline || 'Additional Case Details',
983
+ children: updates.headline || 'Do any of the following situations apply?',
934
984
  attrs: {
935
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 || '')
936
986
  }
937
987
  }
938
988
  }
939
989
 
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
- }
947
- }
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
+ }
999
+
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
+ }
1009
+
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
+ })();`;
1025
+
1026
+ function trustedFormScript() {
1027
+ return {
1028
+ $el: 'script',
1029
+ if: '$activeStep === $lastStep()',
1030
+ children: TRUSTED_FORM_JS
1031
+ }
1032
+ }
1033
+
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
+ });
1042
+
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
+ }
1055
+ }
1056
+
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
+ }
1073
+
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
+ }
1093
+
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
+ }
1120
+
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
+ }
1136
+
1137
+ function firstAndLastV2(updates = {}) {
1138
+ return step(
1139
+ 'firstAndLast',
1140
+ [
1141
+ firstAndLastStepHeadline(updates),
1142
+ firstName(),
1143
+ lastName()
1144
+ ],
1145
+ updates.nextOnEnter
1146
+ )
1147
+ }
1148
+
1149
+
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
+ }
1169
+
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
+ }
1188
+
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
+ }
1207
+
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
+ }
1226
+
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
+ }
1246
+
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
+ }
1266
+
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
+ }
1285
+
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
+ }
1304
+
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
+ }
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
+ }
1338
+
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
+ )
948
1351
  }
949
1352
 
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 || '')
1353
+ // ------ Common
1354
+
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
+ }
956
1399
  }
957
- }
958
- }
1400
+ ]
1401
+ });
959
1402
 
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 || '')
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
+ }
966
1446
  }
1447
+ ]
1448
+ });
1449
+
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]'
1469
+ };
1470
+
1471
+ function formProps(updates) {
1472
+ const props = merge(
1473
+ formPropDefaults,
1474
+ updates
1475
+ );
1476
+ if (props.formId && !props.name) {
1477
+ props.name = props.formId;
967
1478
  }
1479
+ return props
968
1480
  }
969
1481
 
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
- })();`;
1482
+ const metaDefaults = {
1483
+ tcpaLanguage: TCPA_LANGUAGE
1484
+ };
985
1485
 
986
- function trustedFormScript() {
1486
+ function metaProps(updates) {
1487
+ const data = merge(
1488
+ metaDefaults,
1489
+ updates
1490
+ );
987
1491
  return {
988
- $el: 'script',
989
- if: '$activeStep === $lastStep()',
990
- children: TRUSTED_FORM_JS
1492
+ type: 'meta',
1493
+ data
991
1494
  }
992
1495
  }
993
1496
 
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
- });
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
+ })
1506
+ }
1002
1507
 
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
- }
1508
+ const dynamicSchemaNode = {
1509
+ $cmp: 'FormKitSchema',
1510
+ if: '$get(Type_Of_Legal_Problem).value',
1511
+ props: {
1512
+ schema: '$meta.dynamicSchema',
1513
+ data: '$buildData($meta)'
1015
1514
  }
1515
+ };
1016
1516
 
1017
- return merge(
1018
- stepDefaults(name, stepKey),
1517
+ const formAnchorDefaults = {
1518
+ $el: 'div',
1519
+ children: [
1019
1520
  {
1020
- children: [
1021
- {
1022
- $formkit: 'group',
1023
- id: name,
1024
- name: name,
1025
- nextStepMap: nextStepMap,
1026
- autoFocus: autoFocus,
1027
- children: inputs
1028
- }
1029
- ]
1521
+ $el: 'div',
1522
+ attrs: {
1523
+ id: 'form-anchor',
1524
+ class: 't-absolute',
1525
+ style: { top: '-30px', left: 0 }
1526
+ }
1030
1527
  }
1528
+ ],
1529
+ attrs: {
1530
+ class: 't-relative'
1531
+ }
1532
+ };
1533
+
1534
+ function formAnchor(updates) {
1535
+ return merge(
1536
+ formAnchorDefaults,
1537
+ updates
1031
1538
  )
1032
1539
  }
1033
1540
 
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
1048
- )
1049
- }
1050
-
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
- // TODO: UGLY: use named params!
1075
- updates.nextOnEnter,
1076
- false,
1077
- undefined,
1078
- undefined,
1079
- false
1080
- )
1541
+ function headlineDefaults(updates = {}) {
1542
+ return {
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 || '')
1546
+ }
1547
+ }
1081
1548
  }
1082
1549
 
1083
- function contactInfoV2(updates = {}) {
1084
- return step(
1085
- 'contactInfo',
1086
- [
1087
- contactStepHeadline(updates),
1088
- contactStepSubHeadline(updates),
1089
- // Added TF everywhere
1090
- trustedFormScript(),
1091
- email(),
1092
- phone(),
1093
- TCPAConsent(),
1094
- secureIcon()
1095
- ],
1096
- updates.nextOnEnter
1550
+ function headline(updates = {}) {
1551
+ return merge(
1552
+ headlineDefaults(updates),
1553
+ updates
1097
1554
  )
1098
1555
  }
1099
1556
 
1100
- function firstAndLastV2(updates = {}) {
1101
- return step(
1102
- 'firstAndLast',
1103
- [
1104
- firstAndLastStepHeadline(updates),
1105
- firstName(),
1106
- lastName()
1107
- ],
1108
- updates.nextOnEnter
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
+ }
1564
+ }
1565
+
1566
+ function subHeadline(updates = {}) {
1567
+ return merge(
1568
+ subHeadlineDefaults(updates),
1569
+ updates
1109
1570
  )
1110
1571
  }
1111
1572
 
1112
- function repossessionTOLPQuestions(updates = {}) {
1113
- return step(
1114
- 'TOLPQuestions',
1115
- [
1116
- questionsStepHeadline(updates),
1117
- DebtAndCollectionsQuestions(),
1118
- CivilLawsuitQuestions(),
1119
- BankruptcyQuestions(),
1120
- NotSureOrOtherQuestions()
1121
- ],
1122
- updates.nextOnEnter
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
+ ];
1590
+
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
1123
1614
  )
1124
1615
  }
1125
1616
 
1126
- const formNavigationV2 = () => ({
1127
- $el: 'div',
1128
- attrs: {
1129
- 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
+ }
1130
1625
  },
1131
- children: [
1132
- {
1133
- $formkit: 'button',
1134
- name: 'back_button',
1135
- onClick: '$setPreviousStep($prevStepFunc($get(form)))',
1136
- children: 'Back',
1137
- style: {
1138
- if: '$activeStep === $firstStep()',
1139
- then: 'visibility: hidden;'
1140
- }
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'
1141
1733
  },
1142
- {
1143
- $formkit: 'button',
1144
- name: 'next_button',
1145
- onClick: '$setNextStep($fireStepEvent($get(form)), $preStepFunc($get(form)))',
1146
- children: {
1147
- if: '$activeStep === $firstStep()',
1148
- then: 'Start',
1149
- else: 'Next'
1150
- },
1151
- outerClass: {
1152
- if: '$activeStep === $lastStep()',
1153
- then: 't-hidden',
1154
- else: ''
1155
- },
1156
- style: {
1157
- if: '$activeStep === $lastStep()',
1158
- then: 'display: none;'
1159
- }
1734
+ 'Workplace Discrimination': {
1735
+ 'Type_Of_Legal_Problem': 'Workplace Discrimination'
1160
1736
  },
1161
- {
1162
- $formkit: 'submit',
1163
- name: 'submit_button',
1164
- label: 'Submit',
1165
- if: '$activeStep === $lastStep()',
1166
- style: {
1167
- if: '$activeStep !== $lastStep()',
1168
- then: 'display: none;'
1169
- }
1170
- }
1171
- ]
1172
- });
1173
-
1174
- const formDetails = () => ({
1175
- $el: 'pre',
1176
- if: '$urlParam("fdbg", "") == 1',
1177
- children: [
1178
- {
1179
- $el: 'pre',
1180
- children: '$stringify( $get(form).value )',
1181
- attrs: {
1182
- class: 't-text-xs',
1183
- style: 'overflow: scroll'
1184
- }
1737
+ 'Wrongful Termination': {
1738
+ 'Type_Of_Legal_Problem': 'Wrongful Termination'
1185
1739
  },
1186
- {
1187
- $el: 'pre',
1188
- children: ['activeStep: ', '$activeStep'],
1189
- attrs: {
1190
- class: 't-text-xs',
1191
- style: 'overflow: scroll'
1192
- }
1740
+ 'Payment Disputes': {
1741
+ 'Type_Of_Legal_Problem': 'Employment and Workplace'
1193
1742
  },
1194
- {
1195
- $el: 'pre',
1196
- children: ['stepHistory: ', '$stepHistory'],
1197
- attrs: {
1198
- class: 't-text-xs',
1199
- style: 'overflow: scroll'
1200
- }
1743
+ 'Workers Compensation': {
1744
+ 'Type_Of_Legal_Problem': 'Workers Compensation'
1201
1745
  },
1202
- {
1203
- $el: 'pre',
1204
- children: ['stepQueue: ', '$stepQueue'],
1205
- attrs: {
1206
- class: 't-text-xs',
1207
- style: 'overflow: scroll'
1208
- }
1746
+ 'Unemployment': {
1747
+ 'Type_Of_Legal_Problem': 'Unemployment'
1209
1748
  },
1210
- {
1211
- $el: 'pre',
1212
- children: ['steps: ', '$stepKeys()'],
1213
- attrs: {
1214
- class: 't-text-xs',
1215
- style: 'overflow: scroll'
1216
- }
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'
1217
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',
1218
1924
  ]
1219
- });
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
+ ];
1220
1946
 
1221
1947
  const schema = [
1222
- defaultMetaProps(),
1948
+ meta,
1223
1949
  formAnchor(),
1224
1950
  {
1225
1951
  $cmp: 'FormKit',
@@ -1244,17 +1970,12 @@ const schema = [
1244
1970
  class: 'form-body'
1245
1971
  },
1246
1972
  children: [
1247
- repossessionTOLPAndZip(),
1248
- repossessionTOLPQuestions(),
1249
- commentsWithBankruptcyV2({
1250
- nextOnEnter: false,
1251
- placeholder: 'Example: "My car is being repossessed and I need help."',
1252
- }),
1253
- firstAndLastV2(),
1254
- contactInfoV2({
1255
- nextOnEnter: false
1973
+ repossessionTOLPAndZip({
1974
+ nextStepMap: nextStepsMapLegalLegacy
1256
1975
  }),
1257
- formNavigationV2(),
1976
+ dynamicSchemaNode,
1977
+ contactInfo(),
1978
+ formNavigation(),
1258
1979
  formDetails()
1259
1980
  ]
1260
1981
  }