bhl-forms 0.5.3 → 0.6.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (80) hide show
  1. package/dist/bhl-forms.es.js +11139 -18467
  2. package/dist/bhl-forms.iife.js +11 -135
  3. package/dist/bhl-forms.umd.js +11 -135
  4. package/dist/main.css +1 -1
  5. package/package.json +12 -11
  6. package/dist/bhl-forms.modern.es.js +0 -29216
  7. package/dist/bhl-forms.modern.iife.js +0 -145
  8. package/dist/bhl-forms.modern.umd.js +0 -145
  9. package/dist/forms/accidentsAndInjuries.es.js +0 -1263
  10. package/dist/forms/accidentsAndInjuries.iife.js +0 -1
  11. package/dist/forms/accidentsAndInjuries.json +0 -1
  12. package/dist/forms/appraisals.es.js +0 -342
  13. package/dist/forms/appraisals.iife.js +0 -1
  14. package/dist/forms/appraisals.json +0 -1
  15. package/dist/forms/childAndFamily.es.js +0 -1662
  16. package/dist/forms/childAndFamily.iife.js +0 -1
  17. package/dist/forms/childAndFamily.json +0 -1
  18. package/dist/forms/childAndFamilySingle.es.js +0 -1793
  19. package/dist/forms/childAndFamilySingle.iife.js +0 -1
  20. package/dist/forms/childAndFamilySingle.json +0 -1
  21. package/dist/forms/civilLawsuit.es.js +0 -2133
  22. package/dist/forms/civilLawsuit.iife.js +0 -1
  23. package/dist/forms/civilLawsuit.json +0 -1
  24. package/dist/forms/coins.es.js +0 -342
  25. package/dist/forms/coins.iife.js +0 -1
  26. package/dist/forms/coins.json +0 -1
  27. package/dist/forms/contracts.es.js +0 -981
  28. package/dist/forms/contracts.iife.js +0 -1
  29. package/dist/forms/contracts.json +0 -1
  30. package/dist/forms/criminal.es.js +0 -3231
  31. package/dist/forms/criminal.iife.js +0 -1
  32. package/dist/forms/criminal.json +0 -1
  33. package/dist/forms/employmentAndWorkplace.es.js +0 -1364
  34. package/dist/forms/employmentAndWorkplace.iife.js +0 -1
  35. package/dist/forms/employmentAndWorkplace.json +0 -1
  36. package/dist/forms/generalLegal.es.js +0 -3370
  37. package/dist/forms/generalLegal.iife.js +0 -1
  38. package/dist/forms/generalLegal.json +0 -1
  39. package/dist/forms/generalLegalPopUnder.es.js +0 -3372
  40. package/dist/forms/generalLegalPopUnder.iife.js +0 -1
  41. package/dist/forms/generalLegalPopUnder.json +0 -1
  42. package/dist/forms/generalLegalPopUnderTF.es.js +0 -3071
  43. package/dist/forms/generalLegalPopUnderTF.iife.js +0 -1
  44. package/dist/forms/generalLegalPopUnderTF.json +0 -1
  45. package/dist/forms/generalLegalSingle.es.js +0 -4276
  46. package/dist/forms/generalLegalSingle.iife.js +0 -1
  47. package/dist/forms/generalLegalSingle.json +0 -1
  48. package/dist/forms/generalLegalThankYou.es.js +0 -3051
  49. package/dist/forms/generalLegalThankYou.iife.js +0 -1
  50. package/dist/forms/generalLegalThankYou.json +0 -1
  51. package/dist/forms/harassmentAndDiscrimination.es.js +0 -1017
  52. package/dist/forms/harassmentAndDiscrimination.iife.js +0 -1
  53. package/dist/forms/harassmentAndDiscrimination.json +0 -1
  54. package/dist/forms/malpractice.es.js +0 -1237
  55. package/dist/forms/malpractice.iife.js +0 -1
  56. package/dist/forms/malpractice.json +0 -1
  57. package/dist/forms/mechanics.es.js +0 -379
  58. package/dist/forms/mechanics.iife.js +0 -1
  59. package/dist/forms/mechanics.json +0 -1
  60. package/dist/forms/realEstate.es.js +0 -2934
  61. package/dist/forms/realEstate.iife.js +0 -1
  62. package/dist/forms/realEstate.json +0 -1
  63. package/dist/forms/repossession.es.js +0 -1248
  64. package/dist/forms/repossession.iife.js +0 -1
  65. package/dist/forms/repossession.json +0 -1
  66. package/dist/forms/ssdi.es.js +0 -1063
  67. package/dist/forms/ssdi.iife.js +0 -1
  68. package/dist/forms/ssdi.json +0 -1
  69. package/dist/forms/testForm.es.js +0 -725
  70. package/dist/forms/testForm.iife.js +0 -1
  71. package/dist/forms/testForm.json +0 -1
  72. package/dist/forms/testRedirects.es.js +0 -532
  73. package/dist/forms/testRedirects.iife.js +0 -1
  74. package/dist/forms/testRedirects.json +0 -1
  75. package/dist/forms/vets.es.js +0 -345
  76. package/dist/forms/vets.iife.js +0 -1
  77. package/dist/forms/vets.json +0 -1
  78. package/dist/forms/willsAndTrusts.es.js +0 -1198
  79. package/dist/forms/willsAndTrusts.iife.js +0 -1
  80. package/dist/forms/willsAndTrusts.json +0 -1
@@ -1,1263 +0,0 @@
1
- function merge() {
2
- return Object.assign({}, ...arguments)
3
- }
4
-
5
- function LegalRedirectUrl() {
6
- return 'https://listings.ziplawyer.com/api/v1/redirect?zone_id=4&vertical=Legal&category=${properties.Type_Of_Legal_Problem}&Degree_Of_Interest=${properties.Degree_Of_Interest}&zip_code=${properties.Zip}&sub_id=${properties.vid}'
7
- }
8
-
9
- var TCPA_LANGUAGE = "By checking this box, I a) agree to the Terms of Use, and b) consent to be contacted by lawyers, lawyer networks, and partners of this website using live, autodialed, pre-recorded, or artificial voice calls, as well as text messages. Your consent is not required as a condition of purchasing any goods or services. To submit this request without this consent, call 878-213-4937.";
10
-
11
- const DEFAULT_COMMENTS_PLACEHOLDER_DYNAMIC = '$getKey($meta, "commentsPlaceholders." + $get(Type_Of_Legal_Problem).value, $meta.defaultCommentsPlaceholder)';
12
- const DEFAULT_COMMENTS_LABEL = 'Please briefly describe your legal issue in a few words:';
13
- const DEFAULT_FINAL_HEADLINE = 'Submit Your Case';
14
- const DEFAULT_FINAL_HEADLINE_DYNAMIC = '$getKey($meta, "finalHeadlines." + $get(Type_Of_Legal_Problem).value, $meta.defaultFinalHeadline)';
15
- const DEFAULT_FINAL_SUBHEADLINE = 'You may benefit from speaking with a legal professional. Please verify your contact information.';
16
- const DEFAULT_FINAL_SUBHEADLINE_DYNAMIC = '$getKey($meta, "finalSubHeadlines." + $get(Type_Of_Legal_Problem).value, $meta.defaultFinalSubHeadline)';
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
- };
38
-
39
- function formProps(updates) {
40
- const props = merge(
41
- formPropDefaults,
42
- updates
43
- );
44
- if (props.formId && !props.name) {
45
- props.name = props.formId;
46
- }
47
- return props
48
- }
49
-
50
- const metaDefaults = {
51
- tcpaLanguage: TCPA_LANGUAGE
52
- };
53
-
54
- function metaProps(updates) {
55
- const data = merge(
56
- metaDefaults,
57
- updates
58
- );
59
- return {
60
- type: 'meta',
61
- data
62
- }
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
- }
77
-
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'
92
- }
93
- };
94
-
95
- function formAnchor(updates) {
96
- return merge(
97
- formAnchorDefaults,
98
- updates
99
- )
100
- }
101
-
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
- }
108
- }
109
- }
110
-
111
- function headline(updates = {}) {
112
- return merge(
113
- headlineDefaults(updates),
114
- updates
115
- )
116
- }
117
-
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
- }
125
- }
126
-
127
- function subHeadline(updates = {}) {
128
- return merge(
129
- subHeadlineDefaults(updates),
130
- updates
131
- )
132
- }
133
-
134
- function defaultSubHeadline() {
135
- return subHeadline({
136
- children: '$urlParam("shl", "Our Service is Fast and Free!")',
137
- if: '$activeStep === $firstStep()'
138
- })
139
- }
140
-
141
- const secureIconDefault = {
142
- $el: 'div',
143
- if: '$activeStep === $lastStep()',
144
- attrs: {
145
- class: 't-flex t-justify-center t-items-center t-text-sm t-text-gray-500'
146
- },
147
- children: [
148
- {
149
- $el: 'img',
150
- attrs: {
151
- loading: 'lazy',
152
- alt: '',
153
- style: {
154
- border: 0
155
- },
156
- width: '25',
157
- height: '25',
158
- src: 'https://d27hmee62k45vz.cloudfront.net/lock_icon_1.jpeg',
159
- }
160
- },
161
- {
162
- $el: 'span',
163
- children: 'Secure & Encrypted',
164
- attrs: {
165
- class: 't-pl-2 t-pt-1 t-font-medium'
166
- }
167
- }
168
- ]
169
- };
170
-
171
-
172
- function secureIcon(updates) {
173
- return merge(
174
- secureIconDefault,
175
- updates
176
- )
177
- }
178
-
179
- const hiddenInputsBase = [
180
- {
181
- $formkit: 'hidden',
182
- name: "gclid",
183
- value: null
184
- },
185
- {
186
- $formkit: 'hidden',
187
- name: "campaignid",
188
- value: null
189
- },
190
- {
191
- $formkit: 'hidden',
192
- name: "s",
193
- value: null
194
- }
195
- ];
196
-
197
- const hiddenInputsLegal = [
198
- {
199
- $formkit: 'hidden',
200
- name: "vertical",
201
- value: "Legal"
202
- },
203
- {
204
- $formkit: 'hidden',
205
- name: "TCPA_Language",
206
- value: "$meta.tcpaLanguage"
207
- },
208
- ...hiddenInputsBase
209
- ];
210
-
211
- const legalRedirectMapDefaults = {
212
- '*': LegalRedirectUrl()
213
- };
214
-
215
-
216
- function legalRedirectMap(updates) {
217
- return merge(
218
- legalRedirectMapDefaults,
219
- updates
220
- )
221
- }
222
-
223
- const legalAllValueOverrideMap = {
224
- 'Civil_Defense': {
225
- 'Yes': {
226
- 'Type_Of_Legal_Problem': 'Defend a Lawsuit'
227
- },
228
- 'No': {
229
- 'Type_Of_Legal_Problem': 'File a Lawsuit'
230
- }
231
- },
232
- 'Type_Of_Legal_Problem_Display': {
233
- // Accidents and PI
234
- 'Auto Accident': {
235
- 'Type_Of_Legal_Problem': 'Auto and Car Accidents'
236
- },
237
- 'Dog Bite': {
238
- 'Type_Of_Legal_Problem': 'Personal Injury'
239
- },
240
- 'Slip and Fall': {
241
- 'Type_Of_Legal_Problem': 'Personal Injury'
242
- },
243
- 'Workplace Injury': {
244
- 'Type_Of_Legal_Problem': 'Workers Compensation'
245
- },
246
- 'Trucking Accident': {
247
- 'Type_Of_Legal_Problem': 'Auto and Car Accidents'
248
- },
249
- 'Motorcycle Accident': {
250
- 'Type_Of_Legal_Problem': 'Auto and Car Accidents',
251
- },
252
- 'Other Accidents or Injuries': {
253
- 'Type_Of_Legal_Problem': 'Personal Injury'
254
- },
255
- // Civil
256
- 'Automobile Accident': {
257
- 'Type_Of_Legal_Problem': 'Auto and Car Accidents'
258
- },
259
- 'Contract Disputes': {
260
- 'Type_Of_Legal_Problem': 'Business Lawyers'
261
- },
262
- 'Defamation and Slander': {
263
- 'Type_Of_Legal_Problem': 'File a Lawsuit'
264
- },
265
- 'Dog Bite': {
266
- 'Type_Of_Legal_Problem': 'Personal Injury'
267
- },
268
- 'Employment and Workplace': {
269
- 'Type_Of_Legal_Problem': 'Employment and Workplace'
270
- },
271
- 'Fraud': {
272
- 'Type_Of_Legal_Problem': 'Consumer Lawyers'
273
- },
274
- 'Medical Malpractice': {
275
- 'Type_Of_Legal_Problem': 'Medical Malpractice'
276
- },
277
- 'Personal Injury': {
278
- 'Type_Of_Legal_Problem': 'Personal Injury'
279
- },
280
- 'Property Damage': {
281
- 'Type_Of_Legal_Problem': 'Property Damage'
282
- },
283
- 'Small Claims': {
284
- 'Type_Of_Legal_Problem': 'File a Lawsuit'
285
- },
286
- 'Real Estate': {
287
- 'Type_Of_Legal_Problem': 'Real Estate'
288
- },
289
- 'Other (describe on next page)': {
290
- 'Type_Of_Legal_Problem': 'Not Sure or Other'
291
- },
292
- // Contracts
293
- 'Contract Creation': {
294
- 'Type_Of_Legal_Problem': 'Business Lawyers',
295
- 'Business_Services': 'Contracts'
296
- },
297
- 'Contract Enforcement': {
298
- 'Type_Of_Legal_Problem': 'Business Lawyers',
299
- 'Business_Services': 'Contracts'
300
- },
301
- 'Contract Cancellation': {
302
- 'Type_Of_Legal_Problem': 'Business Lawyers',
303
- 'Business_Services': 'Contracts'
304
- },
305
- 'Contract Fraud': {
306
- 'Type_Of_Legal_Problem': 'Business Lawyers',
307
- 'Business_Services': 'Contracts'
308
- },
309
- 'Breach of Contract': {
310
- 'Type_Of_Legal_Problem': 'Business Lawyers',
311
- 'Business_Services': 'Contracts'
312
- },
313
- 'Other Contract Issues': {
314
- 'Type_Of_Legal_Problem': 'Business Lawyers',
315
- 'Business_Services': 'Contracts'
316
- },
317
- // Criminal
318
- 'Criminal Defense': {
319
- 'Type_Of_Legal_Problem': 'Criminal and Felony'
320
- },
321
- 'Victim of a Crime': {
322
- 'Type_Of_Legal_Problem': 'Victim of a Crime'
323
- },
324
- 'DUI and DWI': {
325
- 'Type_Of_Legal_Problem': 'DUI and DWI'
326
- },
327
- 'Expungement': {
328
- 'Type_Of_Legal_Problem': 'Expungement'
329
- },
330
- 'Harassment': {
331
- 'Type_Of_Legal_Problem': 'Criminal and Felony'
332
- },
333
- 'Not Sure or Other': {
334
- 'Type_Of_Legal_Problem': 'Not Sure or Other'
335
- },
336
- // Employment and Workplace
337
- 'Workplace Harassment': {
338
- 'Type_Of_Legal_Problem': 'Workplace Harassment'
339
- },
340
- 'Workplace Discrimination': {
341
- 'Type_Of_Legal_Problem': 'Workplace Discrimination'
342
- },
343
- 'Wrongful Termination': {
344
- 'Type_Of_Legal_Problem': 'Wrongful Termination'
345
- },
346
- 'Payment Disputes': {
347
- 'Type_Of_Legal_Problem': 'Employment and Workplace'
348
- },
349
- 'Workers Compensation': {
350
- 'Type_Of_Legal_Problem': 'Workers Compensation'
351
- },
352
- 'Unemployment': {
353
- 'Type_Of_Legal_Problem': 'Unemployment'
354
- },
355
- 'Other Workplace Issues': {
356
- 'Type_Of_Legal_Problem': 'Employment and Workplace'
357
- },
358
- // Malpractice
359
- 'Attorney Malpractice': {
360
- 'Type_Of_Legal_Problem': 'Civil Lawsuit'
361
- },
362
- 'Other Malpractice Issues': {
363
- 'Type_Of_Legal_Problem': 'Not Sure or Other'
364
- },
365
- // Repossession
366
- 'Vehicle Repossession': {
367
- 'Type_Of_Legal_Problem': 'Bankruptcy'
368
- },
369
- 'Property Repossession': {
370
- 'Type_Of_Legal_Problem': 'Bankruptcy'
371
- },
372
- 'Other Repossession Issues': {
373
- 'Type_Of_Legal_Problem': 'Not Sure or Other'
374
- },
375
- // Real Estate
376
- 'Contracts and Agreements': {
377
- 'Type_Of_Legal_Problem': 'Real Estate'
378
- },
379
- 'Deeds, Liens, and Titles': {
380
- 'Type_Of_Legal_Problem': 'Real Estate'
381
- },
382
- 'Foreclosure': {
383
- 'Type_Of_Legal_Problem': 'Foreclosure'
384
- },
385
- 'Insurance': {
386
- 'Type_Of_Legal_Problem': 'Insurance'
387
- },
388
- 'Landlord and Tenant': {
389
- 'Type_Of_Legal_Problem': 'Landlord and Tenant',
390
- },
391
- 'Loans and Mortgages': {
392
- 'Type_Of_Legal_Problem': 'Real Estate',
393
- },
394
- 'Wills, Trusts, and Estates': {
395
- 'Type_Of_Legal_Problem': 'Wills and Trusts'
396
- },
397
- 'Property Damage': {
398
- 'Type_Of_Legal_Problem': 'Property Damage'
399
- },
400
- 'Other Real Estate Issues': {
401
- 'Type_Of_Legal_Problem': 'Real Estate'
402
- }
403
- }
404
- };
405
-
406
- const TOLPCommentsPlaceholders = {
407
- 'Adoption': 'Example: "I need help with adoption forms"',
408
- 'Asbestos and Mesothelioma': 'Example: "I was exposed to asbestos at work and would like to file a claim"',
409
- '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"',
410
- 'Bankruptcy': 'Example: "I need help filing for bankruptcy"',
411
- 'Birth Certificate and Name Change': 'Example: "Just married and would like to change my last name"',
412
- 'Business Lawyers': 'Example: "I need help incorporating a business" or "I would like a legal contract reviewed"',
413
- 'Child Custody and Support': 'Example: "Need help getting custody" or "Issues with child support payments"',
414
- 'Child Custody': 'Example: "Need help getting custody"',
415
- 'Child Support': 'Example: "Issues with child support payments"',
416
- 'Civil Rights and Discrimination': 'Example: "Police brutality" or "Coworker keeps harassing me"',
417
- 'Civil Lawsuit': 'Example: "A contractor took my money and never completed the job" or "I am being sued by a neighbor"',
418
- 'File a Lawsuit': 'Example: "A contractor took my money and never completed the job"',
419
- 'Defend a Lawsuit': 'Example: "I am being sued by a neighbor"',
420
- 'Consumer Lawyers': 'Example: "Someone committed fraud against me" or "A contractor took my money and never completed the job"',
421
- 'Copyrights and Trademarks': 'Example: "I would like to register a trademark or copyright a name"',
422
- 'Criminal and Felony': 'Example: "I was arrested for DUI and need legal defense" or "I am being charged with assault"',
423
- 'Debt and Collections': 'Example: "I would like to consolidate my debt" or "A collection agency is harassing me"',
424
- 'Divorce and Separation': 'Example: "I would like to file for an uncontested divorce"',
425
- 'DUI and DWI': 'Example: "I was arrested for DUI and need legal defense"',
426
- 'Elder Law': 'Example: "I would like help with Estate Planning" or "I need help with a guardianship"',
427
- 'Employment and Workplace': 'Example: "I was injured while on the job" or "My company is discriminating against me"',
428
- 'Expungement': 'Example: "I would like to file for an expungement and clear my record"',
429
- 'Family Issues': 'Example: "I need help with guardianship" or "I need a simple will created"',
430
- 'Foreclosure': 'Example: "I need help to avoid foreclosure on my house"',
431
- 'Guardianship': 'Example: "I need help with guardianship documents"',
432
- 'Harassment and Discrimination': 'Example: "I am being discriminated at work" or "My neighbor is harassing me"',
433
- 'Sexual Harassment': 'Example: "I am being sexually harassed by a coworker"',
434
- 'Workplace Harassment': 'Example: "My coworker is being aggressive towards me"',
435
- 'Non-Workplace Harassment': 'Example: "My neighbor is harassing me"',
436
- 'Workplace Discrimination': 'Example: "I am being discriminated at work based on my age"',
437
- 'Non-Workplace Discrimination': 'Example: "I am being discriminated against by a local official"',
438
- 'Identity Theft': 'Example: "Someone stole my identity and I need help fixing the issue"',
439
- 'Immigration and Visas': 'Example: "I need help filing for a visa" or "Help with a green card"',
440
- 'Insurance': 'Example: "I need help filing an insurance claim for damage to my house"',
441
- 'Landlord and Tenant': 'Example: "I need help to fight an eviction" or "I would like a lawyer to review a rental contract"',
442
- 'Lemon Law': 'Example: "I purchased a new vehicle that broke down already and seller will not assist"',
443
- '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"',
444
- 'Medical Malpractice': 'Example: "A doctor performed surgery on the wrong limb and I would like to file a lawsuit"',
445
- 'Patents and Intellectual Property': 'Example: "I would like to file for a patent" or "I need to copyright a name"',
446
- 'Personal Injury': 'Example: "I was bit by the neighbor\'s dog" or "I fell in the icy grocery store parking lot"',
447
- 'Power of Attorney': 'Example: "I need help with a limited or general power of attorney"',
448
- 'Probate and Estates': 'Example: "I need help with planning for my estate" or "A family member passed without a will in place"',
449
- 'Product Liability': 'Example: "My car battery caught on fire" or "I purchased a faulty product"',
450
- 'Property Damage': 'Example: "The neighbor\'s tree fell on my fence" or "My car was hit in the parking lot"',
451
- 'Real Estate': 'Example: "I need help with a quitclaim deed" or "I need a lawyer to review a purchase and sales agreement"',
452
- '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"',
453
- 'Tax and IRS': 'Example: "I need help fighting an IRS tax claim" or "I need audit defense"',
454
- 'Traffic and Tickets': 'Example: "I need help reinstating a supsended license" or "I would like to fight a traffic ticket"',
455
- 'Unemployment': 'Example: "I need help filing for unemployment benefits"',
456
- 'Victim of a Crime': 'Example: "I was assaulted in the store" or "I am being discriminated against at work"',
457
- 'Wills and Trusts': 'Example: "I need a simple will created" or "I would like guidance on creating a trust fund"',
458
- 'Workers Compensation': 'Example: "I was injured at work and would like to file for workers compensation benefits"',
459
- 'Wrongful Death': 'Example: "A family member was killed on the job and we need legal representation"',
460
- 'Wrongful Termination': 'Example: "I was fired by my employer without cause"',
461
- 'Not Sure or Other': 'Example: "I was involved in a car accident" or "I need help setting up power of attorney"'
462
- };
463
-
464
- const TOLPFinalHeadlines = {
465
- // 'Adoption': '',
466
- };
467
-
468
- const TOLPFinalSubHeadlines = {
469
- 'Adoption': 'You may benefit from speaking with an adoption professional. Please verify your contact information.',
470
- // 'Asbestos and Mesothelioma': '',
471
- 'Auto and Car Accidents': 'You may benefit from speaking with an accident professional. Please verify your contact information.',
472
- 'Bankruptcy': 'You may benefit from speaking with a bankruptcy professional. Please verify your contact information.',
473
- // 'Birth Certificate and Name Change': '',
474
- // 'Business Lawyers': '',
475
- // 'Child Custody and Support': '',
476
- // 'Civil Rights and Discrimination': '',
477
- // 'Civil Lawsuit': '',
478
- // 'Consumer Lawyers': '',
479
- 'Copyrights and Trademarks': 'You may benefit from speaking with a copyright and trademark professional. Please verify your contact information.',
480
- // 'Criminal and Felony': '',
481
- // 'Debt and Collections': '',
482
- 'Divorce and Separation': 'You may benefit from speaking with a divorce professional. Please verify your contact information.',
483
- 'DUI and DWI': 'You may benefit from speaking with a DUI professional. Please verify your contact information.',
484
- 'Elder Law': 'You may benefit from speaking with an elder law professional. Please verify your contact information.',
485
- // 'Employment and Workplace': '',
486
- // 'Expungement': '',
487
- // 'Family Issues': '',
488
- 'Foreclosure': 'You may benefit from speaking with a foreclosure professional. Please verify your contact information.',
489
- 'Guardianship': 'You may benefit from speaking with a guardianship professional. Please verify your contact information.',
490
- // 'Harassment and Discrimination': '',
491
- // 'Identity Theft': '',
492
- 'Immigration and Visas': 'You may benefit from speaking with a immigration professional. Please verify your contact information.',
493
- // 'Insurance': '',
494
- 'Landlord and Tenant': 'You may benefit from speaking with a landlord and tenant legal professional. Please verify your contact information.',
495
- // 'Lemon Law': '',
496
- 'Long Term Disability': 'You may benefit from speaking with a disability legal professional. Please verify your contact information.',
497
- 'Medical Malpractice': 'You may benefit from speaking with a malpractice professional. Please verify your contact information.',
498
- 'Patents and Intellectual Property': 'You may benefit from speaking with a patent professional. Please verify your contact information.',
499
- 'Personal Injury': 'You may benefit from speaking with a personal injury professional. Please verify your contact information.',
500
- // 'Power of Attorney': '',
501
- 'Probate and Estates': 'You may benefit from speaking with a probate and estate professional. Please verify your contact information.',
502
- // 'Product Liability': '',
503
- // 'Property Damage': '',
504
- 'Real Estate': 'You may benefit from speaking with a real estate professional. Please verify your contact information.',
505
- 'Social Security Disability and Insurance': 'You may benefit from speaking with an SSDI professional. Please verify your contact information.',
506
- 'Tax and IRS': 'You may benefit from speaking with a tax professional. Please verify your contact information.',
507
- // 'Traffic and Tickets': '',
508
- 'Unemployment': 'You may benefit from speaking with an unemployment professional. Please verify your contact information.',
509
- // 'Victim of a Crime': '',
510
- // 'Wills and Trusts': '',
511
- 'Workers Compensation': 'You may benefit from speaking with a workers compensation professional. Please verify your contact information.',
512
- // 'Wrongful Death': '',
513
- // 'Wrongful Termination': '',
514
- // 'Not Sure or Other': ''
515
- // 'Sexual Harassment': '',
516
- // 'Workplace Harassment': '',
517
- // 'Non-Workplace Harassment': '',
518
- // 'Workplace Discrimination': '',
519
- // 'Non-Workplace Discrimination': '',
520
- };
521
-
522
- // ------ Common Base Settings
523
-
524
- const checkbox = (updates) => {
525
- return merge({
526
- $formkit: 'checkbox',
527
- validation: 'required',
528
- validationMessages: {
529
- required: 'Field is required'
530
- }
531
- }, updates)
532
- };
533
-
534
- const sbsCheckbox = (updates) => {
535
- updates.legendClass = 'legend-left required';
536
- updates.fieldsetClass = '$reset side-by-side';
537
- updates.optionsClass = 't-pl-1';
538
- updates.innerClass = 't-flex t-items-center';
539
- updates.wrapperClass = 't-mb-3';
540
- return checkbox(updates)
541
- };
542
-
543
- const radio = (updates) => {
544
- return merge({
545
- $formkit: 'radio',
546
- validation: 'required',
547
- validationMessages: {
548
- required: 'Field is required'
549
- },
550
- optionsClass: 't-pt-3 t-pl-1',
551
- legendClass: 'required'
552
- }, updates)
553
- };
554
-
555
- const col2Radio = (updates) => {
556
- updates.legendClass = 'required';
557
- updates.fieldsetClass = '$reset';
558
- updates.optionsClass = 't-pl-2 t-pt-3 t-grid t-grid-cols-1 md:t-grid-cols-2';
559
- updates.innerClass = 't-items-start';
560
- updates.wrapperClass = '$reset t-flex t-cursor-pointer t-mb-3';
561
- return radio(updates)
562
- };
563
-
564
- const sbs2ColRadio = (updates) => {
565
- updates.legendClass = 'legend-left-flex md:t-max-w-[40%] required';
566
- updates.fieldsetClass = '$reset side-by-side-flex';
567
- updates.optionsClass = 'md:t-ml-4 md:t-mt-2 t-grid t-grid-cols-1 md:t-grid-cols-2-125';
568
- updates.innerClass = 't-flex t-items-start';
569
- updates.wrapperClass = '$reset t-flex t-cursor-pointer t-mb-3';
570
- return radio(updates)
571
- };
572
-
573
- const sbs2ItemRadio = (updates) => {
574
- updates.legendClass = 'legend-left t-pb-1 required';
575
- updates.fieldsetClass = '$reset side-by-side t-items-center';
576
- updates.optionsClass = 't-mt-1 t-grid t-grid-cols-1 md:t-grid-cols-2-125 t-items-center';
577
- updates.innerClass = 't-flex t-items-center';
578
- updates.optionClass = 't-pr-1';
579
- return radio(updates)
580
- };
581
-
582
- const sbsYesNoRadio = (updates) => {
583
- updates.options = ['Yes', 'No'];
584
- return sbs2ItemRadio(updates)
585
- };
586
-
587
- const select = (updates) => {
588
- return merge({
589
- $formkit: 'select',
590
- placeholder: "Please Select",
591
- validation: 'required',
592
- validationMessages: {
593
- required: 'Field is required'
594
- },
595
- inputClass: 't-bg-white',
596
- labelClass: 'required'
597
- }, updates)
598
- };
599
-
600
- const sbsSelect = (updates) => {
601
- updates.labelClass = 'required';
602
- updates.wrapperClass = 'side-by-side t-items-center';
603
- updates.innerClass = 'select-height-content';
604
- updates.helpClass = 't-mt-2.5 md:t-text-right md:t-mt-[-5px]';
605
- return select(updates)
606
- };
607
-
608
- const text = (updates) => {
609
- return merge({
610
- $formkit: 'text',
611
- validation: 'required',
612
- validationMessages: {
613
- required: 'Field is required'
614
- },
615
- labelClass: 'required'
616
- }, updates)
617
- };
618
-
619
- const sbsText = (updates) => {
620
- updates.wrapperClass = 'side-by-side t-items-center';
621
- return text(updates)
622
- };
623
-
624
- const textArea = (updates) => {
625
- return merge({
626
- $formkit: 'textarea',
627
- rows: 5,
628
- maxlength: 500,
629
- validation: 'required',
630
- validationMessages: {
631
- required: 'Field is required'
632
- },
633
- innerClass: 't-max-w-xl',
634
- labelClass: 'required'
635
- }, updates)
636
- };
637
-
638
- const date = (updates) => {
639
- return merge({
640
- $formkit: 'DatePicker',
641
- validation: 'required',
642
- validationMessages: {
643
- required: 'Field is required'
644
- },
645
- labelClass: 'required t-block t-mb-3 t-font-semibold t-text-base formkit-invalid:t-text-red-500',
646
- innerClass: 't-border t-border-gray-400 formkit-invalid:t-border-red-500 t-rounded t-mb-1 focus-within:t-border-blue-500'
647
- }, updates)
648
- };
649
-
650
- const sbsDate = (updates) => {
651
- updates.wrapperClass = 'side-by-side t-items-center';
652
- return date(updates)
653
- };
654
-
655
- // ------ Inputs
656
-
657
-
658
- const accidentsAndInjuriesTOLPDisplay = (updates) => col2Radio(merge({
659
- name: 'Type_Of_Legal_Problem_Display',
660
- if: '$get(Type_Of_Legal_Problem).value == "Auto and Car Accidents"',
661
- label: 'Select The Issue:',
662
- options: [
663
- 'Auto Accident',
664
- 'Workplace Injury',
665
- 'Dog Bite',
666
- 'Slip and Fall',
667
- 'Trucking Accident',
668
- 'Motorcycle Accident',
669
- 'Other Accidents or Injuries'
670
- ]
671
- }, updates));
672
-
673
- const atFault = (scope) => sbsYesNoRadio({
674
- name: scope ? scope + ':' + 'At_Fault' : 'At_Fault',
675
- label: 'Were You at Fault?'
676
- });
677
-
678
- const bankruptcyCrossSell = () => sbsCheckbox({
679
- label: "I'd also like a consultation for bankruptcy or debt elimination (optional)",
680
- help: "Note: you will be contacted separately by a bankruptcy/debt expert",
681
- name: 'CrossSell_Bankruptcy',
682
- id: 'CrossSell_Bankruptcy',
683
- if: '$getVal($get(form), "Type_Of_Legal_Problem") != "Bankruptcy" && ($getVal($get(form), "Degree_Of_Interest") == "Absolutely Can\'t Afford" || $getVal($get(form), "Degree_Of_Interest") == "Maybe" || $getVal($get(form), "Degree_Of_Interest") == "Probably")',
684
- validation: null,
685
- helpClass: "!t-text-sm"
686
- });
687
-
688
- const causeOfInjury = (scope) => sbsSelect({
689
- name: scope ? scope + ':' + 'Cause_Of_Injury' : 'Cause_Of_Injury',
690
- label: 'Cause of Injury:',
691
- options: [
692
- "Traumatic Physical Injury (Accident)",
693
- "Repeated Trauma Injury",
694
- "Mental Injury",
695
- "Occupational Disease",
696
- "Not Sure"
697
- ]
698
- });
699
-
700
- const claimStatus = (scope) => sbsSelect({
701
- name: scope ? scope + ':' + 'Claim_Status' : 'Claim_Status',
702
- label: "Status of Claim:",
703
- options: [
704
- "No action taken yet",
705
- "Demand for compensation made",
706
- "Lawsuit filed",
707
- "Other"
708
- ]
709
- });
710
-
711
- const comments = (updates, scope) => textArea(
712
- merge({
713
- name: scope ? scope + ':' + 'Comments' : 'Comments',
714
- label: 'Please briefly describe your situation in a few words:',
715
- placeholder: 'For Example: "I would like help with child support payments" or "I need help with visitation rights"'
716
- }, updates)
717
- );
718
-
719
- const doctorTreatment = (scope) => sbsYesNoRadio({
720
- name: scope ? scope + ':' + 'Doctor_Treatment' : 'Doctor_Treatment',
721
- label: 'Have You Recently Been Treated by a Doctor, Hospital or Clinic?',
722
- });
723
-
724
- const email = () => sbsText({
725
- $formkit: 'email',
726
- name: 'Email',
727
- label: 'Email Address:',
728
- placeholder: 'email@domain.com',
729
- autocomplete: 'email',
730
- 'data-tf-sensitive': 'false',
731
- validation: 'required|email',
732
- validationMessages: {
733
- required: 'Email is required',
734
- email: 'Invalid Email'
735
- }
736
- });
737
-
738
- const firstName = () => sbsText({
739
- $formkit: 'text',
740
- label: 'First Name:',
741
- placeholder: 'First',
742
- name: 'First_Name',
743
- autocomplete: "given-name",
744
- validationMessages: {
745
- required: 'First Name is required'
746
- }
747
- });
748
-
749
- const haveAttorney = (scope) => sbsYesNoRadio({
750
- name: scope ? scope + ':' + 'Have_Attorney' : 'Have_Attorney',
751
- label: 'Already Working with An Attorney?'
752
- });
753
-
754
- const incidentDate = (scope) => sbsDate({
755
- name: scope ? scope + ':' + 'Incident_Date' : 'Incident_Date',
756
- label: 'Date of Incident:',
757
- });
758
-
759
- const lastName = () => sbsText({
760
- $formkit: 'text',
761
- label: 'Last Name:',
762
- placeholder: 'Last',
763
- name: 'Last_Name',
764
- autocomplete: "family-name",
765
- validationMessages: {
766
- required: 'Last Name is required'
767
- }
768
- });
769
-
770
- const phone = () => sbsText({
771
- $formkit: 'tel',
772
- name: 'Primary_Phone',
773
- label: 'Phone Number:',
774
- placeholder: '###-###-####',
775
- maxlength: 12,
776
- help: '10-digit phone number, hyphens optional',
777
- autocomplete: 'tel-national',
778
- 'data-tf-sensitive': 'false',
779
- validation: 'required|matches:/^[0-9]{3}-?[0-9]{3}-?[0-9]{4}$/|valid_phone',
780
- validationMessages: {
781
- required: 'Field is required',
782
- matches: 'Invalid Phone Format, use ###-###-####',
783
- valid_phone: 'Invalid Phone Number'
784
- },
785
- helpClass: "t-mt-2.5 md:t-text-right md:t-mt-[-2px]"
786
- });
787
-
788
- const primaryInjury = (scope) => sbs2ColRadio({
789
- name: scope ? scope + ':' + 'Primary_Injury' : 'Primary_Injury',
790
- label: 'Primary Injury:',
791
- options: [
792
- "Anxiety",
793
- "Back or Neck Pain",
794
- "Broken Bones",
795
- "Cuts and Bruises",
796
- "Headaches",
797
- "Memory Loss",
798
- "Loss of Limb",
799
- "Other (describe on next page)"
800
- ]
801
- });
802
-
803
- const policeReportFiled = (scope) => sbsYesNoRadio({
804
- name: scope ? scope + ':' + 'Police_Report_Filed' : 'Police_Report_Filed',
805
- label: 'Was a Police Report Filed?'
806
- });
807
-
808
- const TCPAConsent = () => ({
809
- $formkit: 'checkbox',
810
- label: '$meta.tcpaLanguage',
811
- name: 'TCPA_Opt_In',
812
- 'data-tf-sensitive': 'false',
813
- validation: 'required|accepted',
814
- validationMessages: {
815
- required: 'Consent is required',
816
- accepted: 'Consent is required'
817
- },
818
- classes: {
819
- label: "t-text-xs t-text-slate-500 t-font-normal"
820
- }
821
- });
822
-
823
- const zipcode = () => sbsText({
824
- label: 'Zip Code:',
825
- placeholder: '#####',
826
- name: 'Zip',
827
- maxlength: 5,
828
- inputmode: "numeric",
829
- autocomplete: 'postal-code',
830
- validation: 'required|matches:/^[0-9]{5}$/',
831
- validationMessages: {
832
- required: 'Zip Code is required',
833
- matches: 'Invalid Zip Code'
834
- }
835
- });
836
-
837
-
838
- // ------ Question Groups
839
-
840
- // NOTE: name must be unique within a form!
841
- const group = (name, updates) => {
842
- return merge({
843
- $cmp: 'FormKit',
844
- props: {
845
- type: 'group',
846
- key: name,
847
- id: name,
848
- name: name
849
- }
850
- }, updates)
851
- };
852
-
853
- const AutoAndCarAccidentsQuestions = (condition, scope) => group(
854
- 'AutoAndCarAccidentsQuestions',
855
- {
856
- if: (condition || '$get(Type_Of_Legal_Problem).value == "Auto and Car Accidents"'),
857
- children: [
858
- haveAttorney(scope),
859
- incidentDate(scope),
860
- atFault(scope),
861
- primaryInjury(scope),
862
- doctorTreatment(scope),
863
- policeReportFiled(scope)
864
- ]
865
- }
866
- );
867
-
868
- const PersonalInjuryQuestions = (condition, scope) => group(
869
- 'PersonalInjuryQuestions',
870
- {
871
- if: (condition || '$get(Type_Of_Legal_Problem).value == "Personal Injury"'),
872
- children: [
873
- haveAttorney(scope),
874
- incidentDate(scope),
875
- claimStatus(scope),
876
- atFault(scope),
877
- primaryInjury(scope),
878
- doctorTreatment(scope)
879
- ]
880
- }
881
- );
882
-
883
- const WorkersCompensationQuestions = (condition, scope) => group(
884
- 'WorkersCompensationQuestions',
885
- {
886
- if: (condition || '$get(Type_Of_Legal_Problem).value == "Workers Compensation"'),
887
- children: [
888
- haveAttorney(scope),
889
- incidentDate(scope),
890
- claimStatus(scope),
891
- primaryInjury(scope),
892
- causeOfInjury(scope),
893
- doctorTreatment(scope)
894
- ]
895
- }
896
- );
897
-
898
- const NEXT_ON_ENTER = '$onEnter($setNextStep($fireStepEvent($get(form)), $preStepFunc($get(form))))';
899
- const NEXT_ON_INPUT = '$onInput($setNextStep($fireStepEvent($get(form)), $preStepFunc($get(form))))';
900
-
901
- const isInput = (n) => { return (n.type !== 'group' && n.type !== 'section' && n.type !== 'form' && n.$formkit !== 'hidden' && !n.children) };
902
-
903
- const findLastInput = (n) => {
904
- if (isInput(n)) {
905
- return n
906
- }
907
- for (var i = n.children.length - 1; i >= 0; i--) {
908
- if (typeof n.children === 'string') {
909
- continue
910
- }
911
- const child = n.children[i];
912
- if (isInput(child)) {
913
- return child
914
- }
915
- const res = findLastInput(child);
916
- if (res) {
917
- return res
918
- }
919
- }
920
- return null
921
- };
922
-
923
- function questionsStepHeadline(updates) {
924
- return {
925
- $el: 'h3',
926
- children: updates.headline || 'Tell Us About Your Situation',
927
- attrs: {
928
- 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'
929
- }
930
- }
931
- }
932
-
933
-
934
-
935
- function commentsStepHeadline(updates) {
936
- return {
937
- $el: 'h3',
938
- children: updates.headline || 'Additional Case Details',
939
- attrs: {
940
- 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 || '')
941
- }
942
- }
943
- }
944
-
945
- function firstAndLastStepHeadline(updates) {
946
- return {
947
- $el: 'h3',
948
- children: updates.headline || 'Please Provide a Contact Name',
949
- attrs: {
950
- 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 || '')
951
- }
952
- }
953
- }
954
-
955
- function contactStepHeadline(updates) {
956
- return {
957
- $el: 'h3',
958
- children: updates.headline || DEFAULT_FINAL_HEADLINE_DYNAMIC,
959
- attrs: {
960
- 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 || '')
961
- }
962
- }
963
- }
964
-
965
- function contactStepSubHeadline(updates) {
966
- return {
967
- $el: 'h5',
968
- children: updates.subheadline || DEFAULT_FINAL_SUBHEADLINE_DYNAMIC,
969
- attrs: {
970
- 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 || '')
971
- }
972
- }
973
- }
974
-
975
- const TRUSTED_FORM_JS = `(function() {
976
- if (window.xxTrustedFormLoaded) {
977
- return
978
- }
979
- var vid = '';
980
- if (typeof window.zar !== 'undefined') {
981
- vid = window.zar.getVID();
982
- }
983
- window.xxTrustedFormLoaded = true;
984
- var sandbox = document.location.hostname.indexOf('localhost') > -1 ? 'true' : 'false'
985
- var tf = document.createElement('script');
986
- tf.type = 'text/javascript'; tf.async = true;
987
- 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();
988
- var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(tf, s);
989
- })();`;
990
-
991
- function trustedFormScript() {
992
- return {
993
- $el: 'script',
994
- // if: '$activeStep === $lastStep() && $getKey($meta, "trustedFormTOLPs." + $get(Type_Of_Legal_Problem).value, false) == true',
995
- // Added everywhere:
996
- if: '$activeStep === $lastStep()',
997
- children: TRUSTED_FORM_JS
998
- }
999
- }
1000
-
1001
- const stepDefaults = (step, stepKey) => ({
1002
- $el: 'section',
1003
- if: '$stepEnabled("' + step + '")',
1004
- attrs: {
1005
- hidden: '$activeStep !== "' + step + '"',
1006
- key: stepKey ? stepKey : step
1007
- }
1008
- });
1009
-
1010
- function step(name, inputs, nextOnEnter = true, nextOnInput = false, stepKey = undefined, nextStepMap = undefined) {
1011
- if (typeof nextOnEnter === 'undefined') {
1012
- nextOnEnter = true;
1013
- }
1014
- if (inputs && inputs.length && (nextOnEnter || nextOnInput)) {
1015
- const lastInput = findLastInput(inputs[inputs.length - 1]);
1016
- if (lastInput && nextOnEnter === true) {
1017
- lastInput.onKeypress = NEXT_ON_ENTER;
1018
- }
1019
- if (lastInput && nextOnInput === true) {
1020
- lastInput.onInput = NEXT_ON_INPUT;
1021
- }
1022
- }
1023
-
1024
- return merge(
1025
- stepDefaults(name, stepKey),
1026
- {
1027
- children: [
1028
- {
1029
- $formkit: 'group',
1030
- id: name,
1031
- name: name,
1032
- nextStepMap: nextStepMap,
1033
- children: inputs
1034
- }
1035
- ]
1036
- }
1037
- )
1038
- }
1039
-
1040
- function accidentsAndInjuriesTOLPAndZip(updates = {}) {
1041
- return step(
1042
- 'accidentsAndInjuriesTOLPAndZip',
1043
- [
1044
- {
1045
- $formkit: 'hidden',
1046
- name: "Type_Of_Legal_Problem",
1047
- id: "Type_Of_Legal_Problem",
1048
- value: "Auto and Car Accidents"
1049
- },
1050
- accidentsAndInjuriesTOLPDisplay({
1051
- if: 'true'
1052
- }),
1053
- zipcode()
1054
- ],
1055
- updates.nextOnEnter
1056
- )
1057
- }
1058
-
1059
- function accidentsAndInjuriesTOLPQuestions(updates = {}) {
1060
- return step(
1061
- 'TOLPQuestions',
1062
- [
1063
- questionsStepHeadline(updates),
1064
- AutoAndCarAccidentsQuestions(),
1065
- PersonalInjuryQuestions(),
1066
- WorkersCompensationQuestions()
1067
- ],
1068
- updates.nextOnEnter
1069
- )
1070
- }
1071
-
1072
- function commentsWithBankruptcyV2(updates = {}) {
1073
- return step(
1074
- 'commentsWithBankruptcy',
1075
- [
1076
- commentsStepHeadline(updates),
1077
- comments({
1078
- label: updates.label === undefined ? DEFAULT_COMMENTS_LABEL : updates.label,
1079
- placeholder: updates.placeholder || DEFAULT_COMMENTS_PLACEHOLDER_DYNAMIC,
1080
- inputClass: updates.inputClass === undefined ? '!t-h-40' : updates.inputClass,
1081
- }),
1082
- bankruptcyCrossSell(),
1083
- {
1084
- $el: 'div',
1085
- if: '$get(CrossSell_Bankruptcy).value == true',
1086
- children: [
1087
- comments({
1088
- label: 'Bankruptcy or debt details:',
1089
- placeholder: 'Please describe your bankrtupcy or debt situation in a few words...',
1090
- inputClass: '!t-h-16'
1091
- }, 'CrossSell:Bankruptcy')
1092
- ],
1093
- }
1094
- ],
1095
- updates.nextOnEnter
1096
- )
1097
- }
1098
-
1099
- function contactInfoV2(updates = {}) {
1100
- return step(
1101
- 'contactInfo',
1102
- [
1103
- contactStepHeadline(updates),
1104
- contactStepSubHeadline(updates),
1105
- // Added TF everywhere
1106
- trustedFormScript(),
1107
- email(),
1108
- phone(),
1109
- TCPAConsent(),
1110
- secureIcon()
1111
- ],
1112
- updates.nextOnEnter
1113
- )
1114
- }
1115
-
1116
- function firstAndLastV2(updates = {}) {
1117
- return step(
1118
- 'firstAndLast',
1119
- [
1120
- firstAndLastStepHeadline(updates),
1121
- firstName(),
1122
- lastName()
1123
- ],
1124
- updates.nextOnEnter
1125
- )
1126
- }
1127
-
1128
- const formNavigationV2 = () => ({
1129
- $el: 'div',
1130
- attrs: {
1131
- class: 'step-nav'
1132
- },
1133
- children: [
1134
- {
1135
- $formkit: 'button',
1136
- name: 'back_button',
1137
- onClick: '$setPreviousStep($prevStepFunc($get(form)))',
1138
- children: 'Back',
1139
- style: {
1140
- if: '$activeStep === $firstStep()',
1141
- then: 'visibility: hidden;'
1142
- }
1143
- },
1144
- {
1145
- $formkit: 'button',
1146
- name: 'next_button',
1147
- onClick: '$setNextStep($fireStepEvent($get(form)), $preStepFunc($get(form)))',
1148
- children: {
1149
- if: '$activeStep === $firstStep()',
1150
- then: 'Start',
1151
- else: 'Next'
1152
- },
1153
- outerClass: {
1154
- if: '$activeStep === $lastStep()',
1155
- then: 't-hidden',
1156
- else: ''
1157
- },
1158
- style: {
1159
- if: '$activeStep === $lastStep()',
1160
- then: 'display: none;'
1161
- }
1162
- },
1163
- {
1164
- $formkit: 'submit',
1165
- name: 'submit_button',
1166
- label: 'Submit',
1167
- if: '$activeStep === $lastStep()',
1168
- style: {
1169
- if: '$activeStep !== $lastStep()',
1170
- then: 'display: none;'
1171
- }
1172
- }
1173
- ]
1174
- });
1175
-
1176
- const formDetails = () => ({
1177
- $el: 'pre',
1178
- if: '$urlParam("fdbg", "") == 1',
1179
- children: [
1180
- {
1181
- $el: 'pre',
1182
- children: '$stringify( $get(form).value )',
1183
- attrs: {
1184
- class: 't-text-xs',
1185
- style: 'overflow: scroll'
1186
- }
1187
- },
1188
- {
1189
- $el: 'pre',
1190
- children: ['activeStep: ', '$activeStep'],
1191
- attrs: {
1192
- class: 't-text-xs',
1193
- style: 'overflow: scroll'
1194
- }
1195
- },
1196
- {
1197
- $el: 'pre',
1198
- children: ['stepHistory: ', '$stepHistory'],
1199
- attrs: {
1200
- class: 't-text-xs',
1201
- style: 'overflow: scroll'
1202
- }
1203
- },
1204
- {
1205
- $el: 'pre',
1206
- children: ['stepQueue: ', '$stepQueue'],
1207
- attrs: {
1208
- class: 't-text-xs',
1209
- style: 'overflow: scroll'
1210
- }
1211
- },
1212
- {
1213
- $el: 'pre',
1214
- children: ['steps: ', '$stepKeys()'],
1215
- attrs: {
1216
- class: 't-text-xs',
1217
- style: 'overflow: scroll'
1218
- }
1219
- }
1220
- ]
1221
- });
1222
-
1223
- const schema = [
1224
- defaultMetaProps(),
1225
- formAnchor(),
1226
- {
1227
- $cmp: 'FormKit',
1228
- props: formProps({
1229
- formId: 'accidentsAndInjuries',
1230
- redirectMap: legalRedirectMap(),
1231
- valueOverrideMap: legalAllValueOverrideMap
1232
- }),
1233
- children: [
1234
- headline({
1235
- children: '$urlParam("hl", "Get Accident & Injury Help Now")',
1236
- if: '$activeStep === $firstStep()'
1237
- }),
1238
- defaultSubHeadline(),
1239
- ...hiddenInputsLegal,
1240
- {
1241
- $el: 'div',
1242
- attrs: {
1243
- class: 'form-body'
1244
- },
1245
- children: [
1246
- accidentsAndInjuriesTOLPAndZip(),
1247
- accidentsAndInjuriesTOLPQuestions(),
1248
- commentsWithBankruptcyV2({
1249
- nextOnEnter: false
1250
- }),
1251
- firstAndLastV2(),
1252
- contactInfoV2({
1253
- nextOnEnter: false
1254
- }),
1255
- formNavigationV2(),
1256
- formDetails()
1257
- ]
1258
- }
1259
- ]
1260
- }
1261
- ];
1262
-
1263
- export { schema as default };