bhl-forms 0.6.0 → 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 (79) hide show
  1. package/dist/bhl-forms.es.js +5244 -4973
  2. package/dist/bhl-forms.iife.js +9 -9
  3. package/dist/bhl-forms.umd.js +9 -9
  4. package/package.json +2 -2
  5. package/dist/bhl-forms.modern.es.js +0 -16865
  6. package/dist/bhl-forms.modern.iife.js +0 -21
  7. package/dist/bhl-forms.modern.umd.js +0 -21
  8. package/dist/forms/accidentsAndInjuries.es.js +0 -1279
  9. package/dist/forms/accidentsAndInjuries.iife.js +0 -1
  10. package/dist/forms/accidentsAndInjuries.json +0 -1
  11. package/dist/forms/appraisals.es.js +0 -345
  12. package/dist/forms/appraisals.iife.js +0 -1
  13. package/dist/forms/appraisals.json +0 -1
  14. package/dist/forms/childAndFamily.es.js +0 -1678
  15. package/dist/forms/childAndFamily.iife.js +0 -1
  16. package/dist/forms/childAndFamily.json +0 -1
  17. package/dist/forms/childAndFamilySingle.es.js +0 -1809
  18. package/dist/forms/childAndFamilySingle.iife.js +0 -1
  19. package/dist/forms/childAndFamilySingle.json +0 -1
  20. package/dist/forms/civilLawsuit.es.js +0 -2149
  21. package/dist/forms/civilLawsuit.iife.js +0 -1
  22. package/dist/forms/civilLawsuit.json +0 -1
  23. package/dist/forms/coins.es.js +0 -345
  24. package/dist/forms/coins.iife.js +0 -1
  25. package/dist/forms/coins.json +0 -1
  26. package/dist/forms/contracts.es.js +0 -994
  27. package/dist/forms/contracts.iife.js +0 -1
  28. package/dist/forms/contracts.json +0 -1
  29. package/dist/forms/criminal.es.js +0 -3247
  30. package/dist/forms/criminal.iife.js +0 -1
  31. package/dist/forms/criminal.json +0 -1
  32. package/dist/forms/employmentAndWorkplace.es.js +0 -1380
  33. package/dist/forms/employmentAndWorkplace.iife.js +0 -1
  34. package/dist/forms/employmentAndWorkplace.json +0 -1
  35. package/dist/forms/generalLegal.es.js +0 -3386
  36. package/dist/forms/generalLegal.iife.js +0 -1
  37. package/dist/forms/generalLegal.json +0 -1
  38. package/dist/forms/generalLegalPopUnder.es.js +0 -3388
  39. package/dist/forms/generalLegalPopUnder.iife.js +0 -1
  40. package/dist/forms/generalLegalPopUnder.json +0 -1
  41. package/dist/forms/generalLegalPopUnderTF.es.js +0 -3087
  42. package/dist/forms/generalLegalPopUnderTF.iife.js +0 -1
  43. package/dist/forms/generalLegalPopUnderTF.json +0 -1
  44. package/dist/forms/generalLegalSingle.es.js +0 -4305
  45. package/dist/forms/generalLegalSingle.iife.js +0 -1
  46. package/dist/forms/generalLegalSingle.json +0 -1
  47. package/dist/forms/generalLegalThankYou.es.js +0 -3067
  48. package/dist/forms/generalLegalThankYou.iife.js +0 -1
  49. package/dist/forms/generalLegalThankYou.json +0 -1
  50. package/dist/forms/harassmentAndDiscrimination.es.js +0 -1030
  51. package/dist/forms/harassmentAndDiscrimination.iife.js +0 -1
  52. package/dist/forms/harassmentAndDiscrimination.json +0 -1
  53. package/dist/forms/malpractice.es.js +0 -1253
  54. package/dist/forms/malpractice.iife.js +0 -1
  55. package/dist/forms/malpractice.json +0 -1
  56. package/dist/forms/mechanics.es.js +0 -385
  57. package/dist/forms/mechanics.iife.js +0 -1
  58. package/dist/forms/mechanics.json +0 -1
  59. package/dist/forms/realEstate.es.js +0 -2950
  60. package/dist/forms/realEstate.iife.js +0 -1
  61. package/dist/forms/realEstate.json +0 -1
  62. package/dist/forms/repossession.es.js +0 -1261
  63. package/dist/forms/repossession.iife.js +0 -1
  64. package/dist/forms/repossession.json +0 -1
  65. package/dist/forms/ssdi.es.js +0 -1073
  66. package/dist/forms/ssdi.iife.js +0 -1
  67. package/dist/forms/ssdi.json +0 -1
  68. package/dist/forms/testForm.es.js +0 -729
  69. package/dist/forms/testForm.iife.js +0 -1
  70. package/dist/forms/testForm.json +0 -1
  71. package/dist/forms/testRedirects.es.js +0 -541
  72. package/dist/forms/testRedirects.iife.js +0 -1
  73. package/dist/forms/testRedirects.json +0 -1
  74. package/dist/forms/vets.es.js +0 -348
  75. package/dist/forms/vets.iife.js +0 -1
  76. package/dist/forms/vets.json +0 -1
  77. package/dist/forms/willsAndTrusts.es.js +0 -1214
  78. package/dist/forms/willsAndTrusts.iife.js +0 -1
  79. package/dist/forms/willsAndTrusts.json +0 -1
@@ -1,1261 +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
- 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
- }
153
- },
154
- {
155
- $el: 'span',
156
- children: 'Secure & Encrypted',
157
- attrs: {
158
- class: 't-pl-2 t-pt-1 t-font-medium'
159
- }
160
- }
161
- ]
162
- };
163
-
164
-
165
- function secureIcon(updates) {
166
- return merge(
167
- secureIconDefault,
168
- updates
169
- )
170
- }
171
-
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;
604
- }
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
- };
619
-
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
- };
636
-
637
- const bankruptcyCrossSell = () => sbsCheckbox({
638
- label: "I'd also like a consultation for bankruptcy or debt elimination (optional)",
639
- help: "Note: you will be contacted separately by a bankruptcy/debt expert",
640
- name: 'CrossSell_Bankruptcy',
641
- id: 'CrossSell_Bankruptcy',
642
- if: '$getVal($get(form), "Type_Of_Legal_Problem") != "Bankruptcy" && ($getVal($get(form), "Degree_Of_Interest") == "Absolutely Can\'t Afford" || $getVal($get(form), "Degree_Of_Interest") == "Maybe" || $getVal($get(form), "Degree_Of_Interest") == "Probably")',
643
- validation: null,
644
- helpClass: "!t-text-sm"
645
- });
646
-
647
- const comments = (updates, scope) => textArea(
648
- merge({
649
- name: scope ? scope + ':' + 'Comments' : 'Comments',
650
- label: 'Please briefly describe your situation in a few words:',
651
- placeholder: 'For Example: "I would like help with child support payments" or "I need help with visitation rights"'
652
- }, updates)
653
- );
654
-
655
- const degreeOfInterest = (scope, help) => sbsSelect({
656
- name: scope ? scope + ':' + 'Degree_Of_Interest' : 'Degree_Of_Interest',
657
- id: scope ? scope + ':' + 'Degree_Of_Interest' : 'Degree_Of_Interest',
658
- label: 'How Likely Are You to Pay if Your Issue Could be Resolved?',
659
- help: help,
660
- options: [
661
- 'Definitely',
662
- 'Probably',
663
- 'Maybe',
664
- "Absolutely Can't Afford"
665
- ]
666
- });
667
-
668
- const degreeOfInterestHelp = (scope) => degreeOfInterest(scope, 'No payment necessary to speak with lawyers.');
669
-
670
- const email = () => sbsText({
671
- $formkit: 'email',
672
- name: 'Email',
673
- label: 'Email Address:',
674
- placeholder: 'email@domain.com',
675
- autocomplete: 'email',
676
- 'data-tf-sensitive': 'false',
677
- validation: 'required|email',
678
- validationMessages: {
679
- required: 'Email is required',
680
- email: 'Invalid Email'
681
- }
682
- });
683
-
684
- const firstName = () => sbsText({
685
- $formkit: 'text',
686
- label: 'First Name:',
687
- placeholder: 'First',
688
- name: 'First_Name',
689
- autocomplete: "given-name",
690
- validationMessages: {
691
- required: 'First Name is required'
692
- }
693
- });
694
-
695
- const haveAttorney = (scope) => sbsYesNoRadio({
696
- name: scope ? scope + ':' + 'Have_Attorney' : 'Have_Attorney',
697
- label: 'Already Working with An Attorney?'
698
- });
699
-
700
- const lastName = () => sbsText({
701
- $formkit: 'text',
702
- label: 'Last Name:',
703
- placeholder: 'Last',
704
- name: 'Last_Name',
705
- autocomplete: "family-name",
706
- validationMessages: {
707
- required: 'Last Name is required'
708
- }
709
- });
710
-
711
- const lawsuitOtherParty = () => sbsSelect({
712
- label: 'The Other Party is a:',
713
- name: 'Lawsuit_Other_Party',
714
- options: [
715
- "Individual",
716
- "Small Business",
717
- "Large Corporation",
718
- "Government Entity"
719
- ]
720
- });
721
-
722
- const ownRealEstate = () => sbsYesNoRadio({
723
- name: 'Own_Real_Estate',
724
- label: 'Do You Own Real Estate?'
725
- });
726
-
727
- const phone = () => sbsText({
728
- $formkit: 'tel',
729
- name: 'Primary_Phone',
730
- label: 'Phone Number:',
731
- placeholder: '###-###-####',
732
- maxlength: 12,
733
- help: '10-digit phone number, hyphens optional',
734
- autocomplete: 'tel-national',
735
- 'data-tf-sensitive': 'false',
736
- validation: 'required|matches:/^[0-9]{3}-?[0-9]{3}-?[0-9]{4}$/|valid_phone',
737
- validationMessages: {
738
- required: 'Field is required',
739
- matches: 'Invalid Phone Format, use ###-###-####',
740
- valid_phone: 'Invalid Phone Number'
741
- },
742
- helpClass: "t-mt-2.5 md:t-text-right md:t-mt-[-2px]"
743
- });
744
-
745
- const repossessionTOLPDisplay = (updates) => col2Radio(merge({
746
- name: 'Type_Of_Legal_Problem_Display',
747
- label: 'Select The Repossession Issue:',
748
- options: [
749
- 'Vehicle Repossession',
750
- 'Property Repossession',
751
- 'Other Repossession Issues'
752
- ]
753
- }, updates));
754
-
755
- const totalDebt = () => sbsSelect({
756
- label: 'Total Debt?',
757
- name: 'Total_Debt',
758
- options: [
759
- "Less than 5K",
760
- "5K to 10K",
761
- "10K to 20K",
762
- "20K to 50K",
763
- "More than 50K"
764
- ]
765
- });
766
-
767
-
768
- const totalMonthlyIncome = () => sbsSelect({
769
- label: 'Total Monthly Income?',
770
- name: 'Total_Monthly_Income',
771
- options: [
772
- "Less than 1K",
773
- "1K to 2K",
774
- "2K to 3K",
775
- "3K to 4K",
776
- "4K to 5K",
777
- "5K to 7K",
778
- "7K to 10K",
779
- "10K to 15K",
780
- "More than 15K"
781
- ]
782
- });
783
-
784
- const TCPAConsent = () => ({
785
- $formkit: 'checkbox',
786
- label: '$meta.tcpaLanguage',
787
- name: 'TCPA_Opt_In',
788
- 'data-tf-sensitive': 'false',
789
- validation: 'required|accepted',
790
- validationMessages: {
791
- required: 'Consent is required',
792
- accepted: 'Consent is required'
793
- },
794
- classes: {
795
- label: "t-text-xs t-text-slate-500 t-font-normal"
796
- }
797
- });
798
-
799
- const valueOfAssets = (scope) => sbsSelect({
800
- name: scope ? scope + ':' + 'Value_Of_Assets' : 'Value_Of_Assets',
801
- label: 'Value of Your Assets?',
802
- options: [
803
- "Less than 50K",
804
- "50K to 100K",
805
- "100K to 250K",
806
- "250K to 500K",
807
- "500K to 1M",
808
- "More than 1M"
809
- ]
810
- });
811
-
812
- const zipcode = () => sbsText({
813
- label: 'Zip Code:',
814
- placeholder: '#####',
815
- name: 'Zip',
816
- maxlength: 5,
817
- inputmode: "numeric",
818
- autocomplete: 'postal-code',
819
- validation: 'required|matches:/^[0-9]{5}$/',
820
- validationMessages: {
821
- required: 'Zip Code is required',
822
- matches: 'Invalid Zip Code'
823
- }
824
- });
825
-
826
-
827
- // ------ Question Groups
828
-
829
- // NOTE: name must be unique within a form!
830
- const group = (name, updates) => {
831
- return merge({
832
- $cmp: 'FormKit',
833
- props: {
834
- type: 'group',
835
- key: name,
836
- id: name,
837
- name: name
838
- }
839
- }, updates)
840
- };
841
-
842
- const BankruptcyQuestions = (condition, scope) => group(
843
- 'BankruptcyQuestions',
844
- {
845
- if: (condition || '$get(Type_Of_Legal_Problem).value == "Bankruptcy"'),
846
- children: [
847
- haveAttorney(scope),
848
- totalMonthlyIncome(),
849
- totalDebt(),
850
- ownRealEstate(),
851
- valueOfAssets(scope),
852
- degreeOfInterestHelp(scope)
853
- ]
854
- }
855
- );
856
-
857
- const CivilLawsuitQuestions = () => group(
858
- 'CivilLawsuitQuestions',
859
- {
860
- if: '$get(Type_Of_Legal_Problem).value == "Civil Lawsuit"',
861
- children: [
862
- haveAttorney(),
863
- lawsuitOtherParty(),
864
- degreeOfInterestHelp()
865
- ]
866
- }
867
- );
868
-
869
- const DebtAndCollectionsQuestions = () => group(
870
- 'DebtAndCollectionsQuestions',
871
- {
872
- if: '$get(Type_Of_Legal_Problem).value == "Debt and Collections"',
873
- children: [
874
- haveAttorney(),
875
- totalMonthlyIncome(),
876
- totalDebt(),
877
- ownRealEstate(),
878
- valueOfAssets(),
879
- degreeOfInterestHelp()
880
- ]
881
- }
882
- );
883
-
884
- const NotSureOrOtherQuestions = () => group(
885
- 'NotSureOrOtherQuestions',
886
- {
887
- if: '$get(Type_Of_Legal_Problem).value == "Not Sure or Other"',
888
- children: [
889
- haveAttorney(),
890
- degreeOfInterestHelp()
891
- ]
892
- }
893
- );
894
-
895
- const NEXT_ON_ENTER = '$onEnter($setNextStep($fireStepEvent($get(form)), $preStepFunc($get(form))))';
896
- const NEXT_ON_INPUT = '$onInput($setNextStep($fireStepEvent($get(form)), $preStepFunc($get(form))))';
897
-
898
- const isInput = (n) => { return (n.type !== 'group' && n.type !== 'section' && n.type !== 'form' && n.$formkit !== 'hidden' && !n.children) };
899
-
900
- const findLastInput = (n) => {
901
- if (isInput(n)) {
902
- return n
903
- }
904
- for (var i = n.children.length - 1; i >= 0; i--) {
905
- if (typeof n.children === 'string') {
906
- continue
907
- }
908
- const child = n.children[i];
909
- if (isInput(child)) {
910
- return child
911
- }
912
- const res = findLastInput(child);
913
- if (res) {
914
- return res
915
- }
916
- }
917
- return null
918
- };
919
-
920
- function questionsStepHeadline(updates) {
921
- return {
922
- $el: 'h3',
923
- children: updates.headline || 'Tell Us About Your Situation',
924
- attrs: {
925
- class: 't-flex t-justify-center t-text-center t-text-2xl t-font-bold t-text-blue-500 t-pb-5 t-pt-0 t-px-1'
926
- }
927
- }
928
- }
929
-
930
-
931
-
932
- function commentsStepHeadline(updates) {
933
- return {
934
- $el: 'h3',
935
- children: updates.headline || 'Additional Case Details',
936
- attrs: {
937
- 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 || '')
938
- }
939
- }
940
- }
941
-
942
- function firstAndLastStepHeadline(updates) {
943
- return {
944
- $el: 'h3',
945
- children: updates.headline || 'Please Provide a Contact Name',
946
- attrs: {
947
- 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 || '')
948
- }
949
- }
950
- }
951
-
952
- function contactStepHeadline(updates) {
953
- return {
954
- $el: 'h3',
955
- children: updates.headline || DEFAULT_FINAL_HEADLINE_DYNAMIC,
956
- attrs: {
957
- 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 || '')
958
- }
959
- }
960
- }
961
-
962
- function contactStepSubHeadline(updates) {
963
- return {
964
- $el: 'h5',
965
- children: updates.subheadline || DEFAULT_FINAL_SUBHEADLINE_DYNAMIC,
966
- attrs: {
967
- 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 || '')
968
- }
969
- }
970
- }
971
-
972
- const TRUSTED_FORM_JS = `(function() {
973
- if (window.xxTrustedFormLoaded) {
974
- return
975
- }
976
- var vid = '';
977
- if (typeof window.zar !== 'undefined') {
978
- vid = window.zar.getVID();
979
- }
980
- window.xxTrustedFormLoaded = true;
981
- var sandbox = document.location.hostname.indexOf('localhost') > -1 ? 'true' : 'false'
982
- var tf = document.createElement('script');
983
- tf.type = 'text/javascript'; tf.async = true;
984
- 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();
985
- var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(tf, s);
986
- })();`;
987
-
988
- function trustedFormScript() {
989
- return {
990
- $el: 'script',
991
- if: '$activeStep === $lastStep()',
992
- children: TRUSTED_FORM_JS
993
- }
994
- }
995
-
996
- const stepDefaults = (step, stepKey) => ({
997
- $el: 'section',
998
- if: '$stepEnabled("' + step + '")',
999
- attrs: {
1000
- hidden: '$activeStep !== "' + step + '"',
1001
- key: stepKey ? stepKey : step
1002
- }
1003
- });
1004
-
1005
- function step(name, inputs, nextOnEnter = true, nextOnInput = false, stepKey = undefined, nextStepMap = undefined) {
1006
- if (typeof nextOnEnter === 'undefined') {
1007
- nextOnEnter = true;
1008
- }
1009
- if (inputs && inputs.length && (nextOnEnter || nextOnInput)) {
1010
- const lastInput = findLastInput(inputs[inputs.length - 1]);
1011
- if (lastInput && nextOnEnter === true) {
1012
- lastInput.onKeypress = NEXT_ON_ENTER;
1013
- }
1014
- if (lastInput && nextOnInput === true) {
1015
- lastInput.onInput = NEXT_ON_INPUT;
1016
- }
1017
- }
1018
-
1019
- return merge(
1020
- stepDefaults(name, stepKey),
1021
- {
1022
- children: [
1023
- {
1024
- $formkit: 'group',
1025
- id: name,
1026
- name: name,
1027
- nextStepMap: nextStepMap,
1028
- children: inputs
1029
- }
1030
- ]
1031
- }
1032
- )
1033
- }
1034
-
1035
- function repossessionTOLPAndZip(updates = {}) {
1036
- return step(
1037
- 'repossessionTOLPAndZip',
1038
- [
1039
- {
1040
- $formkit: 'hidden',
1041
- name: "Type_Of_Legal_Problem",
1042
- id: "Type_Of_Legal_Problem",
1043
- value: "Debt and Collections"
1044
- },
1045
- repossessionTOLPDisplay(),
1046
- zipcode()
1047
- ],
1048
- updates.nextOnEnter
1049
- )
1050
- }
1051
-
1052
- function commentsWithBankruptcyV2(updates = {}) {
1053
- return step(
1054
- 'commentsWithBankruptcy',
1055
- [
1056
- commentsStepHeadline(updates),
1057
- comments({
1058
- label: updates.label === undefined ? DEFAULT_COMMENTS_LABEL : updates.label,
1059
- placeholder: updates.placeholder || DEFAULT_COMMENTS_PLACEHOLDER_DYNAMIC,
1060
- inputClass: updates.inputClass === undefined ? '!t-h-40' : updates.inputClass,
1061
- }),
1062
- bankruptcyCrossSell(),
1063
- {
1064
- $el: 'div',
1065
- if: '$get(CrossSell_Bankruptcy).value == true',
1066
- children: [
1067
- comments({
1068
- label: 'Bankruptcy or debt details:',
1069
- placeholder: 'Please describe your bankrtupcy or debt situation in a few words...',
1070
- inputClass: '!t-h-16'
1071
- }, 'CrossSell:Bankruptcy')
1072
- ],
1073
- }
1074
- ],
1075
- updates.nextOnEnter
1076
- )
1077
- }
1078
-
1079
- function contactInfoV2(updates = {}) {
1080
- return step(
1081
- 'contactInfo',
1082
- [
1083
- contactStepHeadline(updates),
1084
- contactStepSubHeadline(updates),
1085
- // Added TF everywhere
1086
- trustedFormScript(),
1087
- email(),
1088
- phone(),
1089
- TCPAConsent(),
1090
- secureIcon()
1091
- ],
1092
- updates.nextOnEnter
1093
- )
1094
- }
1095
-
1096
- function firstAndLastV2(updates = {}) {
1097
- return step(
1098
- 'firstAndLast',
1099
- [
1100
- firstAndLastStepHeadline(updates),
1101
- firstName(),
1102
- lastName()
1103
- ],
1104
- updates.nextOnEnter
1105
- )
1106
- }
1107
-
1108
- function repossessionTOLPQuestions(updates = {}) {
1109
- return step(
1110
- 'TOLPQuestions',
1111
- [
1112
- questionsStepHeadline(updates),
1113
- DebtAndCollectionsQuestions(),
1114
- CivilLawsuitQuestions(),
1115
- BankruptcyQuestions(),
1116
- NotSureOrOtherQuestions()
1117
- ],
1118
- updates.nextOnEnter
1119
- )
1120
- }
1121
-
1122
- const formNavigationV2 = () => ({
1123
- $el: 'div',
1124
- attrs: {
1125
- class: 'step-nav'
1126
- },
1127
- children: [
1128
- {
1129
- $formkit: 'button',
1130
- name: 'back_button',
1131
- onClick: '$setPreviousStep($prevStepFunc($get(form)))',
1132
- children: 'Back',
1133
- style: {
1134
- if: '$activeStep === $firstStep()',
1135
- then: 'visibility: hidden;'
1136
- }
1137
- },
1138
- {
1139
- $formkit: 'button',
1140
- name: 'next_button',
1141
- onClick: '$setNextStep($fireStepEvent($get(form)), $preStepFunc($get(form)))',
1142
- children: {
1143
- if: '$activeStep === $firstStep()',
1144
- then: 'Start',
1145
- else: 'Next'
1146
- },
1147
- outerClass: {
1148
- if: '$activeStep === $lastStep()',
1149
- then: 't-hidden',
1150
- else: ''
1151
- },
1152
- style: {
1153
- if: '$activeStep === $lastStep()',
1154
- then: 'display: none;'
1155
- }
1156
- },
1157
- {
1158
- $formkit: 'submit',
1159
- name: 'submit_button',
1160
- label: 'Submit',
1161
- if: '$activeStep === $lastStep()',
1162
- style: {
1163
- if: '$activeStep !== $lastStep()',
1164
- then: 'display: none;'
1165
- }
1166
- }
1167
- ]
1168
- });
1169
-
1170
- const formDetails = () => ({
1171
- $el: 'pre',
1172
- if: '$urlParam("fdbg", "") == 1',
1173
- children: [
1174
- {
1175
- $el: 'pre',
1176
- children: '$stringify( $get(form).value )',
1177
- attrs: {
1178
- class: 't-text-xs',
1179
- style: 'overflow: scroll'
1180
- }
1181
- },
1182
- {
1183
- $el: 'pre',
1184
- children: ['activeStep: ', '$activeStep'],
1185
- attrs: {
1186
- class: 't-text-xs',
1187
- style: 'overflow: scroll'
1188
- }
1189
- },
1190
- {
1191
- $el: 'pre',
1192
- children: ['stepHistory: ', '$stepHistory'],
1193
- attrs: {
1194
- class: 't-text-xs',
1195
- style: 'overflow: scroll'
1196
- }
1197
- },
1198
- {
1199
- $el: 'pre',
1200
- children: ['stepQueue: ', '$stepQueue'],
1201
- attrs: {
1202
- class: 't-text-xs',
1203
- style: 'overflow: scroll'
1204
- }
1205
- },
1206
- {
1207
- $el: 'pre',
1208
- children: ['steps: ', '$stepKeys()'],
1209
- attrs: {
1210
- class: 't-text-xs',
1211
- style: 'overflow: scroll'
1212
- }
1213
- }
1214
- ]
1215
- });
1216
-
1217
- const schema = [
1218
- defaultMetaProps(),
1219
- formAnchor(),
1220
- {
1221
- $cmp: 'FormKit',
1222
- props: formProps({
1223
- formId: 'repossession',
1224
- redirectMap: legalRedirectMap(),
1225
- valueOverrideMap: legalAllValueOverrideMap
1226
- }),
1227
- children: [
1228
- headline({
1229
- children: '$urlParam("hl", "Get Repossession Help Today!")',
1230
- if: '$activeStep === $firstStep()'
1231
- }),
1232
- subHeadline({
1233
- children: '$urlParam("shl", "Our Service is Fast, Easy, and Free")',
1234
- if: '$activeStep === $firstStep()'
1235
- }),
1236
- ...hiddenInputsLegal,
1237
- {
1238
- $el: 'div',
1239
- attrs: {
1240
- class: 'form-body'
1241
- },
1242
- children: [
1243
- repossessionTOLPAndZip(),
1244
- repossessionTOLPQuestions(),
1245
- commentsWithBankruptcyV2({
1246
- nextOnEnter: false,
1247
- placeholder: 'Example: "My car is being repossessed and I need help."',
1248
- }),
1249
- firstAndLastV2(),
1250
- contactInfoV2({
1251
- nextOnEnter: false
1252
- }),
1253
- formNavigationV2(),
1254
- formDetails()
1255
- ]
1256
- }
1257
- ]
1258
- }
1259
- ];
1260
-
1261
- export { schema as default };