bhl-forms 0.6.5 → 0.6.6

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