bhl-forms 0.0.80 → 0.0.81

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.
@@ -12,16 +12,17 @@ const formPropDefaults = {
12
12
  type: 'form',
13
13
  id: 'form',
14
14
  config: { validationVisibility: 'submit' },
15
- onSubmit: '$submit("https://httpbin.org/post", $prepData, $handleRedirect)',
15
+ onSubmit: '$submit("https://httpbin.org/post", $prepData, $handleRedirect, "text/plain; charset=UTF-8")',
16
16
  plugins: '$plugins',
17
17
  actions: false,
18
18
  prepop: {
19
19
  fromURL: true
20
20
  },
21
21
  errorCodes: {
22
- 403: "An Error Occurred",
22
+ 403: { message: "An Error Occurred", abort: false },
23
23
  409: { abort: false },
24
- 429: "An Error Occurred"
24
+ 429: "An Error Occurred",
25
+ 504: { message: "An Error Occurred", abort: false },
25
26
  },
26
27
  formClass: '!t-max-w-[38rem]'
27
28
  };
@@ -101,11 +102,11 @@ function subHeadline(updates) {
101
102
  )
102
103
  }
103
104
 
104
- const privacyIconsDefault = {
105
+ const secureIconDefault = {
105
106
  $el: 'div',
106
107
  if: '$activeStep === $lastStep()',
107
108
  attrs: {
108
- class: 't-flex t-justify-center'
109
+ class: 't-flex t-justify-center t-items-center t-text-sm t-text-gray-500'
109
110
  },
110
111
  children: [
111
112
  {
@@ -113,18 +114,28 @@ const privacyIconsDefault = {
113
114
  attrs: {
114
115
  loading: 'lazy',
115
116
  alt: '',
116
- style: { border: 0 },
117
- src: 'https://d27hmee62k45vz.cloudfront.net/form-secure-privacy.png',
118
- width: '320',
119
- height: '100'
117
+ style: {
118
+ border: 0
119
+ },
120
+ width: '25',
121
+ height: '25',
122
+ src: 'https://d27hmee62k45vz.cloudfront.net/lock_icon_1.jpeg',
123
+ }
124
+ },
125
+ {
126
+ $el: 'span',
127
+ children: 'Secure & Encrypted',
128
+ attrs: {
129
+ class: 't-pl-2 t-pt-1 t-font-medium'
120
130
  }
121
131
  }
122
132
  ]
123
133
  };
124
134
 
125
- function privacyIcons(updates) {
135
+
136
+ function secureIcon(updates) {
126
137
  return merge(
127
- privacyIconsDefault,
138
+ secureIconDefault,
128
139
  updates
129
140
  )
130
141
  }
@@ -246,6 +257,163 @@ const legalCivilValueOverrideMap = {
246
257
  }
247
258
  };
248
259
 
260
+
261
+ const TOLPCommentsPlaceholders = {
262
+ 'Adoption': 'Example: "I need help with adoption forms"',
263
+ 'Asbestos and Mesothelioma': 'Example: "I was exposed to asbestos at work and would like to file a claim"',
264
+ '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"',
265
+ 'Bankruptcy': 'Example: "I need help filing for bankruptcy"',
266
+ 'Birth Certificate and Name Change': 'Example: "Just married and would like to change my last name"',
267
+ 'Business Lawyers': 'Example: "I need help incorporating a business" or "I would like a legal contract reviewed"',
268
+ 'Child Custody and Support': 'Example: "Need help getting custody" or "Issues with child support payments"',
269
+ 'Civil Rights and Discrimination': 'Example: "Police brutality" or "Coworker keeps harassing me"',
270
+ 'Civil Lawsuit': 'Example: "A contractor took my money and never completed the job" or "I am being sued by a neighbor"',
271
+ 'Consumer Lawyers': 'Example: "Someone committed fraud against me" or "A contractor took my money and never completed the job"',
272
+ 'Copyrights and Trademarks': 'Example: "I would like to register a trademark or copyright a name"',
273
+ 'Criminal and Felony': 'Example: "I was arrested for DUI and need legal defense" or "I am being charged with assault"',
274
+ 'Debt and Collections': 'Example: "I would like to consolidate my debt" or "A collection agency is harassing me"',
275
+ 'Divorce and Separation': 'Example: "I would like to file for an uncontested divorce"',
276
+ 'DUI and DWI': 'Example: "I was arrested for DUI and need legal defense"',
277
+ 'Elder Law': 'Example: "I would like help with Estate Planning" or "I need help with a guardianship"',
278
+ 'Employment and Workplace': 'Example: "I was injured while on the job" or "My company is discriminating against me"',
279
+ 'Expungement': 'Example: "I would like to file for an expungement and clear my record"',
280
+ 'Family Issues': 'Example: "I need help with guardianship" or "I need a simple will created"',
281
+ 'Foreclosure': 'Example: "I need help to avoid foreclosure on my house"',
282
+ 'Guardianship': 'Example: "I need help with guardianship documents"',
283
+ 'Harassment and Discrimination': 'Example: "I am being discriminated at work" or "My neighbor is harassing me"',
284
+ 'Identity Theft': 'Example: "Someone stole my identity and I need help fixing the issue"',
285
+ 'Immigration and Visas': 'Example: "I need help filing for a visa" or "Help with a green card"',
286
+ 'Insurance': 'Example: "I need help filing an insurance claim for damage to my house"',
287
+ 'Landlord and Tenant': 'Example: "I need help to fight an eviction" or "I would like a lawyer to review a rental contract"',
288
+ 'Lemon Law': 'Example: "I purchased a new vehicle that broke down already and seller will not assist"',
289
+ '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"',
290
+ 'Medical Malpractice': 'Example: "A doctor performed surgery on the wrong limb and I would like to file a lawsuit"',
291
+ 'Nursing Home Abuse': 'Example: "My mother\'s nursing home is physically abusing her"',
292
+ 'Patents and Intellectual Property': 'Example: "I would like to file for a patent" or "I need to copyright a name"',
293
+ 'Personal Injury': 'Example: "I was bit by the neighbor\'s dog" or "I fell in the icy grocery store parking lot"',
294
+ 'Power of Attorney': 'Example: "I need help with a limited or general power of attorney"',
295
+ 'Probate and Estates': 'Example: "I need help with planning for my estate" or "A family member passed without a will in place"',
296
+ 'Product Liability': 'Example: "My car battery caught on fire" or "I purchased a faulty product"',
297
+ 'Property Damage': 'Example: "The neighbor\'s tree fell on my fence" or "My car was hit in the parking lot"',
298
+ 'Real Estate': 'Example: "I need help with a quitclaim deed" or "I need a lawyer to review a purchase and sales agreement"',
299
+ '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"',
300
+ 'Tax and IRS': 'Example: "I need help fighting an IRS tax claim" or "I need audit defense"',
301
+ 'Traffic and Tickets': 'Example: "I need help reinstating a supsended license" or "I would like to fight a traffic ticket"',
302
+ 'Unemployment': 'Example: "I need help filing for unemployment benefits"',
303
+ 'Vaccination Injury': 'Example: "I was injured after receiving a vaccine and would like to file a lawsuit"',
304
+ 'Veteran\'s Disability': 'Example: "I would like help filing for disability benefits"',
305
+ 'Victim of a Crime': 'Example: "I was assaulted in the store" or "I am being discriminated against at work"',
306
+ 'Wills and Trusts': 'Example: "I need a simple will created" or "I would like guidance on creating a trust fund"',
307
+ 'Workers Compensation': 'Example: "I was injured at work and would like to file for workers compensation benefits"',
308
+ 'Wrongful Death': 'Example: "A family member was killed on the job and we need legal representation"',
309
+ 'Wrongful Termination': 'Example: "I was fired by my employer without cause"',
310
+ 'Not Sure or Other': 'Example: "I was involved in a car accident" or "I need help setting up power of attorney"'
311
+ };
312
+
313
+ const TOLPFinalHeadlines = {
314
+ // 'Adoption': '',
315
+ // 'Asbestos and Mesothelioma': '',
316
+ // 'Auto and Car Accidents': '',
317
+ // 'Bankruptcy': '',
318
+ // 'Birth Certificate and Name Change': '',
319
+ // 'Business Lawyers': '',
320
+ // 'Child Custody and Support': '',
321
+ // 'Civil Rights and Discrimination': '',
322
+ // 'Civil Lawsuit': '',
323
+ // 'Consumer Lawyers': '',
324
+ // 'Copyrights and Trademarks': '',
325
+ // 'Criminal and Felony': '',
326
+ // 'Debt and Collections': '',
327
+ // 'Divorce and Separation': '',
328
+ // 'DUI and DWI': '',
329
+ // 'Elder Law': '',
330
+ // 'Employment and Workplace': '',
331
+ // 'Expungement': '',
332
+ // 'Family Issues': '',
333
+ // 'Foreclosure': '',
334
+ // 'Guardianship': '',
335
+ // 'Harassment and Discrimination': '',
336
+ // 'Identity Theft': '',
337
+ // 'Immigration and Visas': '',
338
+ // 'Insurance': '',
339
+ // 'Landlord and Tenant': '',
340
+ // 'Lemon Law': '',
341
+ // 'Long Term Disability': '',
342
+ // 'Medical Malpractice': '',
343
+ // 'Nursing Home Abuse': '',
344
+ // 'Patents and Intellectual Property': '',
345
+ // 'Personal Injury': '',
346
+ // 'Power of Attorney': '',
347
+ // 'Probate and Estates': '',
348
+ // 'Product Liability': '',
349
+ // 'Property Damage': '',
350
+ // 'Real Estate': '',
351
+ // 'Social Security Disability and Insurance': '',
352
+ // 'Tax and IRS': '',
353
+ // 'Traffic and Tickets': '',
354
+ // 'Unemployment': '',
355
+ // 'Vaccination Injury': '',
356
+ // 'Veteran\'s Disability': '',
357
+ // 'Victim of a Crime': '',
358
+ // 'Wills and Trusts': '',
359
+ // 'Workers Compensation': '',
360
+ // 'Wrongful Death': '',
361
+ // 'Wrongful Termination': '',
362
+ // 'Not Sure or Other': ''
363
+ };
364
+
365
+ const TOLPFinalSubHeadlines = {
366
+ 'Adoption': 'You may benefit from speaking with an adoption professional. Please verify your contact information.',
367
+ // 'Asbestos and Mesothelioma': '',
368
+ 'Auto and Car Accidents': 'You may benefit from speaking with an accident professional. Please verify your contact information.',
369
+ 'Bankruptcy': 'You may benefit from speaking with a bankruptcy professional. Please verify your contact information.',
370
+ // 'Birth Certificate and Name Change': '',
371
+ // 'Business Lawyers': '',
372
+ // 'Child Custody and Support': '',
373
+ // 'Civil Rights and Discrimination': '',
374
+ // 'Civil Lawsuit': '',
375
+ // 'Consumer Lawyers': '',
376
+ 'Copyrights and Trademarks': 'You may benefit from speaking with a copyright and trademark professional. Please verify your contact information.',
377
+ // 'Criminal and Felony': '',
378
+ // 'Debt and Collections': '',
379
+ 'Divorce and Separation': 'You may benefit from speaking with a divorce professional. Please verify your contact information.',
380
+ 'DUI and DWI': 'You may benefit from speaking with a DUI professional. Please verify your contact information.',
381
+ 'Elder Law': 'You may benefit from speaking with an elder law professional. Please verify your contact information.',
382
+ // 'Employment and Workplace': '',
383
+ // 'Expungement': '',
384
+ // 'Family Issues': '',
385
+ 'Foreclosure': 'You may benefit from speaking with a foreclosure professional. Please verify your contact information.',
386
+ 'Guardianship': 'You may benefit from speaking with a guardianship professional. Please verify your contact information.',
387
+ // 'Harassment and Discrimination': '',
388
+ // 'Identity Theft': '',
389
+ 'Immigration and Visas': 'You may benefit from speaking with a immigration professional. Please verify your contact information.',
390
+ // 'Insurance': '',
391
+ 'Landlord and Tenant': 'You may benefit from speaking with a landlord and tenant legal professional. Please verify your contact information.',
392
+ // 'Lemon Law': '',
393
+ 'Long Term Disability': 'You may benefit from speaking with a disability legal professional. Please verify your contact information.',
394
+ 'Medical Malpractice': 'You may benefit from speaking with a malpractice professional. Please verify your contact information.',
395
+ // 'Nursing Home Abuse': '',
396
+ 'Patents and Intellectual Property': 'You may benefit from speaking with a patent professional. Please verify your contact information.',
397
+ 'Personal Injury': 'You may benefit from speaking with a personal injury professional. Please verify your contact information.',
398
+ // 'Power of Attorney': '',
399
+ 'Probate and Estates': 'You may benefit from speaking with a probate and estate professional. Please verify your contact information.',
400
+ // 'Product Liability': '',
401
+ // 'Property Damage': '',
402
+ 'Real Estate': 'You may benefit from speaking with a real estate professional. Please verify your contact information.',
403
+ 'Social Security Disability and Insurance': 'You may benefit from speaking with an SSDI professional. Please verify your contact information.',
404
+ 'Tax and IRS': 'You may benefit from speaking with a tax professional. Please verify your contact information.',
405
+ // 'Traffic and Tickets': '',
406
+ 'Unemployment': 'You may benefit from speaking with an unemployment professional. Please verify your contact information.',
407
+ // 'Vaccination Injury': '',
408
+ 'Veteran\'s Disability': 'You may benefit from speaking with a disability legal professional. Please verify your contact information.',
409
+ // 'Victim of a Crime': '',
410
+ // 'Wills and Trusts': '',
411
+ 'Workers Compensation': 'You may benefit from speaking with a workers compensation professional. Please verify your contact information.',
412
+ // 'Wrongful Death': '',
413
+ // 'Wrongful Termination': '',
414
+ // 'Not Sure or Other': ''
415
+ };
416
+
249
417
  // ------ Common Base Settings
250
418
 
251
419
  const checkbox = (updates) => {
@@ -1010,7 +1178,7 @@ const firstName = () => sbsText({
1010
1178
 
1011
1179
  const haveAttorney = () => sbsYesNoRadio({
1012
1180
  name: 'Have_Attorney',
1013
- label: 'Are You Currently Working with An Attorney?'
1181
+ label: 'Are You Already Working with An Attorney?'
1014
1182
  });
1015
1183
 
1016
1184
  const haveChildren = () => sbsYesNoRadio({
@@ -2338,48 +2506,72 @@ function civilLawsuitTOLPAndZip(updates = {}) {
2338
2506
  }
2339
2507
 
2340
2508
  const DEFAULT_COMMENTS_PLACEHOLDER = 'For Example: "I\'ve been involved in an auto accident" or "I need Power of Attorney"';
2509
+ const DEFAULT_COMMENTS_PLACEHOLDER_V2 = '$getKey($meta, "commentsPlaceholders." + $get(Type_Of_Legal_Problem).value, $meta.defaultCommentsPlaceholder)';
2341
2510
  const DEFAULT_COMMENTS_LABEL = 'Please briefly describe your legal issue in a few words:';
2342
2511
 
2343
- function commentsWithBankruptcy(updates = {}) {
2512
+ function commentsWithBankruptcyV2(updates = {}) {
2344
2513
  return step(
2345
2514
  'commentsWithBankruptcy',
2346
2515
  [
2516
+ {
2517
+ $el: 'h3',
2518
+ children: 'Additional Case Details',
2519
+ attrs: {
2520
+ 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-3'
2521
+ }
2522
+ },
2347
2523
  comments({
2348
2524
  label: updates.label || DEFAULT_COMMENTS_LABEL,
2349
- placeholder: updates.placeholder || DEFAULT_COMMENTS_PLACEHOLDER
2525
+ placeholder: updates.placeholder || DEFAULT_COMMENTS_PLACEHOLDER_V2
2350
2526
  }),
2351
2527
  bankruptcyCrossSell()
2352
2528
  ],
2353
2529
  updates.nextOnEnter
2354
2530
  )
2355
2531
  }
2532
+ const DEFAULT_FINAL_HEADLINE_V2 = 'We Found Matches For Your Case!';
2533
+ const DEFAULT_FINAL_HEADLINE_V2_b = '$getKey($meta, "finalHeadlines." + $get(Type_Of_Legal_Problem).value, $meta.defaultFinalHeadline)';
2534
+ const DEFAULT_FINAL_SUBHEADLINE_V2 = 'You may benefit from speaking with a legal professional. Please verify your contact information.';
2535
+ const DEFAULT_FINAL_SUBHEADLINE_V2_b = '$getKey($meta, "finalSubHeadlines." + $get(Type_Of_Legal_Problem).value, $meta.defaultFinalSubHeadline)';
2356
2536
 
2357
- const DEFAULT_FINAL_HEADLINE = "Based on your input, you may benefit from speaking with a legal professional. Please verify your contact information.";
2358
-
2359
- function contactInfo(updates = {}) {
2537
+ function contactInfoV2(updates = {}) {
2360
2538
  return step(
2361
2539
  'contactInfo',
2362
2540
  [
2363
2541
  {
2364
2542
  $el: 'h3',
2365
- children: updates.headline || DEFAULT_FINAL_HEADLINE,
2543
+ children: updates.headline || DEFAULT_FINAL_HEADLINE_V2_b,
2366
2544
  attrs: {
2367
- class: 't-flex t-justify-center t-text-center t-text-lg t-font-bold t-pb-5 t-pt-0 t-px-3'
2545
+ 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-3'
2546
+ }
2547
+ },
2548
+ {
2549
+ $el: 'h5',
2550
+ children: updates.subheadline || DEFAULT_FINAL_SUBHEADLINE_V2_b,
2551
+ attrs: {
2552
+ class: 't-flex t-justify-center t-text-center !t-text-lg t-font-semibold t-pb-7 t-pt-0 t-px-3'
2368
2553
  }
2369
2554
  },
2370
2555
  email(),
2371
2556
  phone(),
2372
2557
  TCPAConsent(),
2373
- privacyIcons()
2558
+ secureIcon()
2374
2559
  ],
2375
2560
  updates.nextOnEnter
2376
2561
  )
2377
2562
  }
2378
2563
 
2379
- function firstAndLast(updates = {}) {
2564
+ function firstAndLastV2(updates = {}) {
2380
2565
  return step(
2381
2566
  'firstAndLast',
2382
2567
  [
2568
+ {
2569
+ $el: 'h3',
2570
+ children: 'Please Provide a Contact Name',
2571
+ attrs: {
2572
+ 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-3'
2573
+ }
2574
+ },
2383
2575
  firstName(),
2384
2576
  lastName()
2385
2577
  ],
@@ -2447,7 +2639,7 @@ function generalLegalTOLPQuestions(updates = {}) {
2447
2639
  questions.unshift(
2448
2640
  {
2449
2641
  $el: 'h3',
2450
- children: updates.headline || "Please Complete the Following:",
2642
+ children: updates.headline || 'Tell Us More About Your Case',
2451
2643
  attrs: {
2452
2644
  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-3'
2453
2645
  }
@@ -2461,9 +2653,7 @@ function generalLegalTOLPQuestions(updates = {}) {
2461
2653
  )
2462
2654
  }
2463
2655
 
2464
- // ------ Utilities
2465
-
2466
- const formNavigation = () => ({
2656
+ const formNavigationV2 = () => ({
2467
2657
  $el: 'div',
2468
2658
  attrs: {
2469
2659
  class: 'step-nav'
@@ -2483,7 +2673,16 @@ const formNavigation = () => ({
2483
2673
  $formkit: 'button',
2484
2674
  name: 'next_button',
2485
2675
  onClick: '$setNextStep($fireStepEvent($get(form)), $preStepFunc($get(form)))',
2486
- children: 'Next',
2676
+ children: {
2677
+ if: '$activeStep === $firstStep()',
2678
+ then: 'Get Help',
2679
+ else: 'Next'
2680
+ },
2681
+ outerClass: {
2682
+ if: '$activeStep === $lastStep()',
2683
+ then: 't-hidden',
2684
+ else: ''
2685
+ },
2487
2686
  style: {
2488
2687
  if: '$activeStep === $lastStep()',
2489
2688
  then: 'display: none;'
@@ -2542,24 +2741,31 @@ const formDetails = () => ({
2542
2741
  });
2543
2742
 
2544
2743
  const schema = [
2545
- metaProps(),
2744
+ metaProps({
2745
+ defaultCommentsPlaceholder: DEFAULT_COMMENTS_PLACEHOLDER,
2746
+ commentsPlaceholders: TOLPCommentsPlaceholders,
2747
+ defaultFinalHeadline: DEFAULT_FINAL_HEADLINE_V2,
2748
+ finalHeadlines: TOLPFinalHeadlines,
2749
+ defaultFinalSubHeadline: DEFAULT_FINAL_SUBHEADLINE_V2,
2750
+ finalSubHeadlines: TOLPFinalSubHeadlines
2751
+ }),
2546
2752
  formAnchor(),
2547
2753
  {
2548
2754
  $cmp: 'FormKit',
2549
2755
  props: formProps({
2550
2756
  formId: 'civilLawsuit',
2551
- onSubmit: '$submit($submitUrl, $prepData, $handleRedirect)',
2757
+ onSubmit: '$submit($submitUrl, $prepData, $handleRedirect, "text/plain; charset=UTF-8")',
2552
2758
  redirectMap: legalRedirectMap(),
2553
2759
  anchorElement: 'form-anchor',
2554
2760
  valueOverrideMap: legalCivilValueOverrideMap
2555
2761
  }),
2556
2762
  children: [
2557
2763
  headline({
2558
- children: 'Schedule a Lawsuit Consultation',
2764
+ children: '$urlParam("hl", "Schedule a Lawsuit Consultation")',
2559
2765
  if: '$activeStep === $firstStep()'
2560
2766
  }),
2561
2767
  subHeadline({
2562
- children: 'Complete Our Form to Receive Your Free Consultation Today!',
2768
+ children: '$urlParam("shl", "Our Service is Fast, Easy, and Free!")',
2563
2769
  if: '$activeStep === $firstStep()'
2564
2770
  }),
2565
2771
  ...hiddenInputs,
@@ -2571,16 +2777,14 @@ const schema = [
2571
2777
  children: [
2572
2778
  civilLawsuitTOLPAndZip(),
2573
2779
  generalLegalTOLPQuestions(),
2574
- commentsWithBankruptcy({
2575
- nextOnEnter: false,
2576
- placeholder: 'For Example: "I was injured at work" or "I paid a contractor who never performed the work" or "I\'m being sued by someone for property damage"'
2780
+ commentsWithBankruptcyV2({
2781
+ nextOnEnter: false
2577
2782
  }),
2578
- firstAndLast(),
2579
- contactInfo({
2580
- headline: 'Based on your input, you may benefit from speaking with a lawsuit professional. Please verify your contact information.',
2783
+ firstAndLastV2(),
2784
+ contactInfoV2({
2581
2785
  nextOnEnter: false
2582
2786
  }),
2583
- formNavigation(),
2787
+ formNavigationV2(),
2584
2788
  formDetails()
2585
2789
  ]
2586
2790
  }