bhl-forms 0.6.5 → 0.6.7
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.
- package/dist/bhl-forms.iife.js +1 -1
- package/dist/bhl-forms.modern.iife.js +1 -1
- package/dist/bhl-forms.modern.umd.js +1 -1
- package/dist/bhl-forms.umd.js +1 -1
- package/dist/forms/accidentsAndInjuries.es.js +1442 -862
- package/dist/forms/accidentsAndInjuries.iife.js +1 -1
- package/dist/forms/accidentsAndInjuries.json +1 -1
- package/dist/forms/appraisals.es.js +115 -115
- package/dist/forms/appraisals.iife.js +1 -1
- package/dist/forms/childAndFamily.es.js +790 -764
- package/dist/forms/childAndFamily.iife.js +1 -1
- package/dist/forms/childAndFamily.json +1 -1
- package/dist/forms/childAndFamilySingle.es.js +1136 -757
- package/dist/forms/childAndFamilySingle.iife.js +1 -1
- package/dist/forms/childAndFamilySingle.json +1 -1
- package/dist/forms/civilLawsuit.es.js +2001 -1352
- package/dist/forms/civilLawsuit.iife.js +1 -1
- package/dist/forms/civilLawsuit.json +1 -1
- package/dist/forms/coins.es.js +115 -115
- package/dist/forms/coins.iife.js +1 -1
- package/dist/forms/contracts.es.js +1454 -715
- package/dist/forms/contracts.iife.js +1 -1
- package/dist/forms/contracts.json +1 -1
- package/dist/forms/criminal.es.js +1891 -2482
- package/dist/forms/criminal.iife.js +1 -1
- package/dist/forms/criminal.json +1 -1
- package/dist/forms/employmentAndWorkplace.es.js +2178 -934
- package/dist/forms/employmentAndWorkplace.iife.js +1 -1
- package/dist/forms/employmentAndWorkplace.json +1 -1
- package/dist/forms/generalLegal.es.js +854 -808
- package/dist/forms/generalLegal.iife.js +1 -1
- package/dist/forms/generalLegal.json +1 -1
- package/dist/forms/generalLegalPopUnder.es.js +854 -807
- package/dist/forms/generalLegalPopUnder.iife.js +1 -1
- package/dist/forms/generalLegalPopUnder.json +1 -1
- package/dist/forms/generalLegalPopUnderSingle.es.js +4383 -0
- package/dist/forms/generalLegalPopUnderSingle.iife.js +1 -0
- package/dist/forms/generalLegalPopUnderSingle.json +1 -0
- package/dist/forms/generalLegalSingle.es.js +1672 -1629
- package/dist/forms/generalLegalSingle.iife.js +1 -1
- package/dist/forms/generalLegalSingle.json +1 -1
- package/dist/forms/generalLegalThankYou.es.js +710 -695
- package/dist/forms/generalLegalThankYou.iife.js +1 -1
- package/dist/forms/generalLegalThankYou.json +1 -1
- package/dist/forms/harassmentAndDiscrimination.es.js +1465 -681
- package/dist/forms/harassmentAndDiscrimination.iife.js +1 -1
- package/dist/forms/harassmentAndDiscrimination.json +1 -1
- package/dist/forms/malpractice.es.js +1764 -1066
- package/dist/forms/malpractice.iife.js +1 -1
- package/dist/forms/malpractice.json +1 -1
- package/dist/forms/mechanics.es.js +115 -115
- package/dist/forms/mechanics.iife.js +1 -1
- package/dist/forms/realEstate.es.js +1557 -1209
- package/dist/forms/realEstate.iife.js +1 -1
- package/dist/forms/realEstate.json +1 -1
- package/dist/forms/repossession.es.js +1811 -1085
- package/dist/forms/repossession.iife.js +1 -1
- package/dist/forms/repossession.json +1 -1
- package/dist/forms/ssdi.es.js +672 -672
- package/dist/forms/ssdi.iife.js +1 -1
- package/dist/forms/ssdi.json +1 -1
- package/dist/forms/testForm.es.js +473 -468
- package/dist/forms/testForm.iife.js +1 -1
- package/dist/forms/testForm.json +1 -1
- package/dist/forms/testRedirects.es.js +105 -102
- package/dist/forms/testRedirects.iife.js +1 -1
- package/dist/forms/testRedirects.json +1 -1
- package/dist/forms/vets.es.js +115 -115
- package/dist/forms/vets.iife.js +1 -1
- package/dist/forms/willsAndTrusts.es.js +1298 -705
- package/dist/forms/willsAndTrusts.iife.js +1 -1
- package/dist/forms/willsAndTrusts.json +1 -1
- package/dist/main.css +1 -1
- package/package.json +1 -1
- package/dist/forms/generalLegalPopUnderTF.es.js +0 -3087
- package/dist/forms/generalLegalPopUnderTF.iife.js +0 -1
- package/dist/forms/generalLegalPopUnderTF.json +0 -1
package/dist/forms/ssdi.es.js
CHANGED
|
@@ -15,188 +15,282 @@ 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
|
-
|
|
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
|
-
|
|
40
|
-
|
|
41
|
-
|
|
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
|
|
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
|
|
51
|
-
|
|
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
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
updates
|
|
58
|
-
);
|
|
59
|
-
return {
|
|
60
|
-
type: 'meta',
|
|
61
|
-
data
|
|
42
|
+
const radio = (updates) => {
|
|
43
|
+
if (updates.name && !updates.id) {
|
|
44
|
+
updates.id = updates.name;
|
|
62
45
|
}
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
// Added everywhere for now
|
|
74
|
-
// trustedFormTOLPs: trustedFormTOLPs
|
|
75
|
-
})
|
|
76
|
-
}
|
|
46
|
+
return merge({
|
|
47
|
+
$formkit: 'radio',
|
|
48
|
+
validation: 'required',
|
|
49
|
+
validationMessages: {
|
|
50
|
+
required: 'Field is required'
|
|
51
|
+
},
|
|
52
|
+
optionsClass: 't-pt-3 t-pl-1',
|
|
53
|
+
legendClass: 'required'
|
|
54
|
+
}, updates)
|
|
55
|
+
};
|
|
77
56
|
|
|
78
|
-
const
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
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'
|
|
57
|
+
const verticalButtonRadio = (updates) => {
|
|
58
|
+
updates.legendClass = 'legend-left';
|
|
59
|
+
updates.fieldsetClass = '$reset t-flex t-justify-center t-items-center';
|
|
60
|
+
if (typeof updates.optionsClass === 'undefined') {
|
|
61
|
+
updates.optionsClass = 't-flex t-flex-col sm:t-flex-row t-justify-center t-my-3';
|
|
92
62
|
}
|
|
63
|
+
updates.optionClass = 'radiobtn t-my-2 sm:t-my-0 t-mx-2 md:t-mx-5';
|
|
64
|
+
updates.wrapperClass = '$reset formkit-wrapper t-mb-0 t-flex t-items-center t-h-[100%]';
|
|
65
|
+
updates.labelClass = 't-font-semibold t-text-[#1e448f] t-w-[100%]';
|
|
66
|
+
updates.decoratorIcon = false;
|
|
67
|
+
updates.messagesClass = 't-flex t-justify-center';
|
|
68
|
+
return radio(updates)
|
|
93
69
|
};
|
|
94
70
|
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
}
|
|
71
|
+
const verticalYesNoRadio = (updates) => {
|
|
72
|
+
updates.options = ['Yes', 'No'];
|
|
73
|
+
updates.optionsClass = 't-flex t-justify-center t-my-3';
|
|
74
|
+
return verticalButtonRadio(updates)
|
|
75
|
+
};
|
|
101
76
|
|
|
102
|
-
const
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
children: [
|
|
112
|
-
{
|
|
113
|
-
$el: 'div',
|
|
114
|
-
attrs: {
|
|
115
|
-
class: 't-flex t-justify-center'
|
|
116
|
-
},
|
|
117
|
-
children: [
|
|
118
|
-
{
|
|
119
|
-
$el: 'span',
|
|
120
|
-
attrs: {
|
|
121
|
-
id: 'progress-bar-text',
|
|
122
|
-
class: 't-text-sm t-mb-1'
|
|
123
|
-
},
|
|
124
|
-
children: [
|
|
125
|
-
"0% Complete"
|
|
126
|
-
]
|
|
127
|
-
},
|
|
128
|
-
]
|
|
77
|
+
const text = (updates) => {
|
|
78
|
+
if (updates.name && !updates.id) {
|
|
79
|
+
updates.id = updates.name;
|
|
80
|
+
}
|
|
81
|
+
return merge({
|
|
82
|
+
$formkit: 'text',
|
|
83
|
+
validation: 'required',
|
|
84
|
+
validationMessages: {
|
|
85
|
+
required: 'Field is required'
|
|
129
86
|
},
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
attrs: {
|
|
133
|
-
class: 't-bg-gray-100 t-w-9/12 t-rounded'
|
|
134
|
-
},
|
|
135
|
-
children: [
|
|
136
|
-
{
|
|
137
|
-
$el: 'div',
|
|
138
|
-
attrs: {
|
|
139
|
-
id: 'progress-bar',
|
|
140
|
-
class: 't-flex t-flex-col t-justify-center t-text-center t-whitespace-nowrap t-w-[10%] t-h-1.5 t-rounded t-text-white t-bg-[#007bff]',
|
|
141
|
-
style: {
|
|
142
|
-
transition: 'width 0.5s ease'
|
|
143
|
-
},
|
|
144
|
-
},
|
|
145
|
-
}
|
|
146
|
-
]
|
|
147
|
-
}
|
|
148
|
-
]
|
|
87
|
+
labelClass: 'required'
|
|
88
|
+
}, updates)
|
|
149
89
|
};
|
|
150
90
|
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
)
|
|
156
|
-
}
|
|
157
|
-
|
|
158
|
-
function headlineDefaults(updates = {}) {
|
|
159
|
-
return {
|
|
160
|
-
$el: 'h1',
|
|
161
|
-
attrs: {
|
|
162
|
-
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 || '')
|
|
163
|
-
}
|
|
164
|
-
}
|
|
165
|
-
}
|
|
91
|
+
const sbsText = (updates) => {
|
|
92
|
+
updates.wrapperClass = 'side-by-side t-items-center';
|
|
93
|
+
return text(updates)
|
|
94
|
+
};
|
|
166
95
|
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
)
|
|
172
|
-
}
|
|
96
|
+
const verticalText = (updates) => {
|
|
97
|
+
updates.wrapperClass = 't-flex t-justify-center';
|
|
98
|
+
updates.messagesClass = 't-flex t-justify-center';
|
|
99
|
+
updates.inputClass = 't-text-center';
|
|
100
|
+
return text(updates)
|
|
101
|
+
};
|
|
173
102
|
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
attrs: {
|
|
178
|
-
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 || '')
|
|
179
|
-
}
|
|
103
|
+
const textArea = (updates) => {
|
|
104
|
+
if (updates.name && !updates.id) {
|
|
105
|
+
updates.id = updates.name;
|
|
180
106
|
}
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
}
|
|
107
|
+
return merge({
|
|
108
|
+
$formkit: 'textarea',
|
|
109
|
+
rows: 5,
|
|
110
|
+
maxlength: 500,
|
|
111
|
+
validation: 'required',
|
|
112
|
+
validationMessages: {
|
|
113
|
+
required: 'Field is required'
|
|
114
|
+
},
|
|
115
|
+
innerClass: 't-max-w-xl',
|
|
116
|
+
labelClass: 'required'
|
|
117
|
+
}, updates)
|
|
118
|
+
};
|
|
189
119
|
|
|
190
|
-
const
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
120
|
+
const applicantAgeCenter = (scope) => verticalText({
|
|
121
|
+
name: scope ? scope + ':' + 'Applicant_Age' : 'Applicant_Age',
|
|
122
|
+
value: "50",
|
|
123
|
+
placeholder: 'Age between 18 and 65',
|
|
124
|
+
maxlength: 2,
|
|
125
|
+
inputmode: "numeric",
|
|
126
|
+
validation: "required|min:18,max:65",
|
|
127
|
+
validationMessages: {
|
|
128
|
+
required: 'Applicant Age is required',
|
|
129
|
+
min: 'Invalid Age - must be between 18 and 65',
|
|
130
|
+
max: 'Invalid Age - must be between 18 and 65',
|
|
195
131
|
},
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
132
|
+
});
|
|
133
|
+
|
|
134
|
+
const bankruptcyCrossSell = () => sbsCheckbox({
|
|
135
|
+
label: "I'd also like a consult for bankruptcy or debt elimination (optional)",
|
|
136
|
+
help: "Note: you will be contacted separately by a bankruptcy/debt expert",
|
|
137
|
+
name: 'CrossSell_Bankruptcy',
|
|
138
|
+
id: 'CrossSell_Bankruptcy',
|
|
139
|
+
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")',
|
|
140
|
+
validation: null,
|
|
141
|
+
helpClass: "!t-text-sm"
|
|
142
|
+
});
|
|
143
|
+
|
|
144
|
+
const comments = (updates, scope) => textArea(
|
|
145
|
+
merge({
|
|
146
|
+
name: scope ? scope + ':' + 'Comments' : 'Comments',
|
|
147
|
+
label: 'Please briefly describe your situation in a few words:',
|
|
148
|
+
placeholder: 'For Example: "I would like help with child support payments" or "I need help with visitation rights"'
|
|
149
|
+
}, updates)
|
|
150
|
+
);
|
|
151
|
+
|
|
152
|
+
const disabilityConditionStopWorkCenter = (scope) => verticalYesNoRadio({
|
|
153
|
+
name: scope ? scope + ':' + 'Disability_Condition_Stop_Work' : 'Disability_Condition_Stop_Work',
|
|
154
|
+
});
|
|
155
|
+
|
|
156
|
+
const disabilityWorkHistoryCenter = (scope) => verticalYesNoRadio({
|
|
157
|
+
name: scope ? scope + ':' + 'Disability_Work_History' : 'Disability_Work_History',
|
|
158
|
+
});
|
|
159
|
+
|
|
160
|
+
const doctorTreatmentCenter = () => verticalYesNoRadio({
|
|
161
|
+
name: 'Doctor_Treatment',
|
|
162
|
+
});
|
|
163
|
+
|
|
164
|
+
const email = () => sbsText({
|
|
165
|
+
$formkit: 'email',
|
|
166
|
+
name: 'Email',
|
|
167
|
+
label: 'Email Address:',
|
|
168
|
+
placeholder: 'email@domain.com',
|
|
169
|
+
autocomplete: 'email',
|
|
170
|
+
'data-tf-sensitive': 'false',
|
|
171
|
+
validation: 'required|email',
|
|
172
|
+
validationMessages: {
|
|
173
|
+
required: 'Email is required',
|
|
174
|
+
email: 'Invalid Email'
|
|
175
|
+
}
|
|
176
|
+
});
|
|
177
|
+
|
|
178
|
+
const firstName = () => sbsText({
|
|
179
|
+
$formkit: 'text',
|
|
180
|
+
label: 'First Name:',
|
|
181
|
+
placeholder: 'First',
|
|
182
|
+
name: 'First_Name',
|
|
183
|
+
autocomplete: "given-name",
|
|
184
|
+
validationMessages: {
|
|
185
|
+
required: 'First Name is required'
|
|
186
|
+
}
|
|
187
|
+
});
|
|
188
|
+
|
|
189
|
+
const haveAttorneyCenter = () => verticalYesNoRadio({
|
|
190
|
+
name: 'Have_Attorney',
|
|
191
|
+
});
|
|
192
|
+
|
|
193
|
+
const lastName = () => sbsText({
|
|
194
|
+
$formkit: 'text',
|
|
195
|
+
label: 'Last Name:',
|
|
196
|
+
placeholder: 'Last',
|
|
197
|
+
name: 'Last_Name',
|
|
198
|
+
autocomplete: "family-name",
|
|
199
|
+
validationMessages: {
|
|
200
|
+
required: 'Last Name is required'
|
|
201
|
+
}
|
|
202
|
+
});
|
|
203
|
+
|
|
204
|
+
const phone = () => sbsText({
|
|
205
|
+
$formkit: 'tel',
|
|
206
|
+
name: 'Primary_Phone',
|
|
207
|
+
label: 'Phone Number:',
|
|
208
|
+
placeholder: '###-###-####',
|
|
209
|
+
maxlength: 12,
|
|
210
|
+
help: '10-digit phone number, hyphens optional',
|
|
211
|
+
autocomplete: 'tel-national',
|
|
212
|
+
'data-tf-sensitive': 'false',
|
|
213
|
+
validation: 'required|matches:/^[0-9]{3}-?[0-9]{3}-?[0-9]{4}$/|valid_phone',
|
|
214
|
+
validationMessages: {
|
|
215
|
+
required: 'Field is required',
|
|
216
|
+
matches: 'Invalid Phone Format, use ###-###-####',
|
|
217
|
+
valid_phone: 'Invalid Phone Number'
|
|
218
|
+
},
|
|
219
|
+
helpClass: "t-mt-2.5 md:t-text-right md:t-mt-[-2px]"
|
|
220
|
+
});
|
|
221
|
+
|
|
222
|
+
const socialSecurityDisabilityReceivingBenefitsCenter = (scope) => verticalYesNoRadio({
|
|
223
|
+
name: scope ? scope + ':' + 'Social_Security_Disability_Receiving_Benefits' : 'Social_Security_Disability_Receiving_Benefits',
|
|
224
|
+
});
|
|
225
|
+
|
|
226
|
+
const TCPAConsent = () => ({
|
|
227
|
+
$formkit: 'checkbox',
|
|
228
|
+
label: '$meta.tcpaLanguage',
|
|
229
|
+
name: 'TCPA_Opt_In',
|
|
230
|
+
'data-tf-sensitive': 'false',
|
|
231
|
+
validation: 'required|accepted',
|
|
232
|
+
validationMessages: {
|
|
233
|
+
required: 'Consent is required',
|
|
234
|
+
accepted: 'Consent is required'
|
|
235
|
+
},
|
|
236
|
+
classes: {
|
|
237
|
+
label: "t-text-xs t-text-slate-500 t-font-normal"
|
|
238
|
+
}
|
|
239
|
+
});
|
|
240
|
+
|
|
241
|
+
const zipcodeCenter = () => text({
|
|
242
|
+
placeholder: '#####',
|
|
243
|
+
help: "We try to match you with local legal help",
|
|
244
|
+
name: 'Zip',
|
|
245
|
+
maxlength: 5,
|
|
246
|
+
inputmode: "numeric",
|
|
247
|
+
autocomplete: 'postal-code',
|
|
248
|
+
validation: 'required|matches:/^[0-9]{5}$/',
|
|
249
|
+
validationMessages: {
|
|
250
|
+
required: 'Zip Code is required',
|
|
251
|
+
matches: 'Invalid Zip Code'
|
|
252
|
+
},
|
|
253
|
+
wrapperClass: 't-flex t-justify-center',
|
|
254
|
+
messagesClass: 't-flex t-justify-center',
|
|
255
|
+
inputClass: 't-text-center',
|
|
256
|
+
helpClass: 't-mt-2.5 !t-text-sm t-text-center'
|
|
257
|
+
});
|
|
258
|
+
|
|
259
|
+
const NEXT_ON_ENTER = '$onEnter($setNextStep($fireStepEvent($get(form)), $preStepFunc($get(form))))';
|
|
260
|
+
const NEXT_ON_INPUT = '$onInput($setNextStep($fireStepEvent($get(form)), $preStepFunc($get(form))))';
|
|
261
|
+
|
|
262
|
+
const isInput = (n) => { return (n.type !== 'group' && n.type !== 'section' && n.type !== 'form' && n.$formkit !== 'hidden' && !n.children) };
|
|
263
|
+
|
|
264
|
+
const findLastInput = (n) => {
|
|
265
|
+
if (isInput(n)) {
|
|
266
|
+
return n
|
|
267
|
+
}
|
|
268
|
+
for (var i = n.children.length - 1; i >= 0; i--) {
|
|
269
|
+
if (typeof n.children === 'string') {
|
|
270
|
+
continue
|
|
271
|
+
}
|
|
272
|
+
const child = n.children[i];
|
|
273
|
+
if (isInput(child)) {
|
|
274
|
+
return child
|
|
275
|
+
}
|
|
276
|
+
const res = findLastInput(child);
|
|
277
|
+
if (res) {
|
|
278
|
+
return res
|
|
279
|
+
}
|
|
280
|
+
}
|
|
281
|
+
return null
|
|
282
|
+
};
|
|
283
|
+
|
|
284
|
+
const secureIconDefault = {
|
|
285
|
+
$el: 'div',
|
|
286
|
+
if: '$activeStep === $lastStep()',
|
|
287
|
+
attrs: {
|
|
288
|
+
class: 't-flex t-justify-center t-items-center t-text-sm t-text-gray-500'
|
|
289
|
+
},
|
|
290
|
+
children: [
|
|
291
|
+
{
|
|
292
|
+
$el: 'img',
|
|
293
|
+
attrs: {
|
|
200
294
|
loading: 'lazy',
|
|
201
295
|
alt: '',
|
|
202
296
|
style: {
|
|
@@ -217,7 +311,6 @@ const secureIconDefault = {
|
|
|
217
311
|
]
|
|
218
312
|
};
|
|
219
313
|
|
|
220
|
-
|
|
221
314
|
function secureIcon(updates) {
|
|
222
315
|
return merge(
|
|
223
316
|
secureIconDefault,
|
|
@@ -225,516 +318,102 @@ function secureIcon(updates) {
|
|
|
225
318
|
)
|
|
226
319
|
}
|
|
227
320
|
|
|
228
|
-
|
|
229
|
-
{
|
|
230
|
-
$
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
$formkit: 'hidden',
|
|
236
|
-
name: "campaignid",
|
|
237
|
-
value: null
|
|
238
|
-
},
|
|
239
|
-
{
|
|
240
|
-
$formkit: 'hidden',
|
|
241
|
-
name: "s",
|
|
242
|
-
value: null
|
|
321
|
+
function verticalStepHeadline(updates) {
|
|
322
|
+
return {
|
|
323
|
+
$el: 'h3',
|
|
324
|
+
children: updates.headline || 'Tell Us About Your Situation',
|
|
325
|
+
attrs: {
|
|
326
|
+
class: 't-flex t-justify-center t-text-center t-text-2xl t-font-bold t-text-dark t-pb-5 t-pt-0 t-px-1' + ' ' + (updates.headlineClass || '')
|
|
327
|
+
}
|
|
243
328
|
}
|
|
244
|
-
|
|
329
|
+
}
|
|
245
330
|
|
|
246
|
-
|
|
247
|
-
{
|
|
248
|
-
$
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
value: "$meta.tcpaLanguage"
|
|
256
|
-
},
|
|
257
|
-
...hiddenInputsBase
|
|
258
|
-
];
|
|
331
|
+
function commentsStepHeadline(updates) {
|
|
332
|
+
return {
|
|
333
|
+
$el: 'h3',
|
|
334
|
+
children: updates.headline || 'Additional Case Details',
|
|
335
|
+
attrs: {
|
|
336
|
+
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 || '')
|
|
337
|
+
}
|
|
338
|
+
}
|
|
339
|
+
}
|
|
259
340
|
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
'Business Lawyers': 'Example: "I need help incorporating a business" or "I would like a legal contract reviewed"',
|
|
267
|
-
'Child Custody and Support': 'Example: "Need help getting custody" or "Issues with child support payments"',
|
|
268
|
-
'Child Custody': 'Example: "Need help getting custody"',
|
|
269
|
-
'Child Support': 'Example: "Issues with child support payments"',
|
|
270
|
-
'Civil Rights and Discrimination': 'Example: "Police brutality" or "Coworker keeps harassing me"',
|
|
271
|
-
'Civil Lawsuit': 'Example: "A contractor took my money and never completed the job" or "I am being sued by a neighbor"',
|
|
272
|
-
'File a Lawsuit': 'Example: "A contractor took my money and never completed the job"',
|
|
273
|
-
'Defend a Lawsuit': 'Example: "I am being sued by a neighbor"',
|
|
274
|
-
'Consumer Lawyers': 'Example: "Someone committed fraud against me" or "A contractor took my money and never completed the job"',
|
|
275
|
-
'Copyrights and Trademarks': 'Example: "I would like to register a trademark or copyright a name"',
|
|
276
|
-
'Criminal and Felony': 'Example: "I was arrested for DUI and need legal defense" or "I am being charged with assault"',
|
|
277
|
-
'Debt and Collections': 'Example: "I would like to consolidate my debt" or "A collection agency is harassing me"',
|
|
278
|
-
'Divorce and Separation': 'Example: "I would like to file for an uncontested divorce"',
|
|
279
|
-
'DUI and DWI': 'Example: "I was arrested for DUI and need legal defense"',
|
|
280
|
-
'Elder Law': 'Example: "I would like help with Estate Planning" or "I need help with a guardianship"',
|
|
281
|
-
'Employment and Workplace': 'Example: "I was injured while on the job" or "My company is discriminating against me"',
|
|
282
|
-
'Expungement': 'Example: "I would like to file for an expungement and clear my record"',
|
|
283
|
-
'Family Issues': 'Example: "I need help with guardianship" or "I need a simple will created"',
|
|
284
|
-
'Foreclosure': 'Example: "I need help to avoid foreclosure on my house"',
|
|
285
|
-
'Guardianship': 'Example: "I need help with guardianship documents"',
|
|
286
|
-
'Harassment and Discrimination': 'Example: "I am being discriminated at work" or "My neighbor is harassing me"',
|
|
287
|
-
'Sexual Harassment': 'Example: "I am being sexually harassed by a coworker"',
|
|
288
|
-
'Workplace Harassment': 'Example: "My coworker is being aggressive towards me"',
|
|
289
|
-
'Non-Workplace Harassment': 'Example: "My neighbor is harassing me"',
|
|
290
|
-
'Workplace Discrimination': 'Example: "I am being discriminated at work based on my age"',
|
|
291
|
-
'Non-Workplace Discrimination': 'Example: "I am being discriminated against by a local official"',
|
|
292
|
-
'Identity Theft': 'Example: "Someone stole my identity and I need help fixing the issue"',
|
|
293
|
-
'Immigration and Visas': 'Example: "I need help filing for a visa" or "Help with a green card"',
|
|
294
|
-
'Insurance': 'Example: "I need help filing an insurance claim for damage to my house"',
|
|
295
|
-
'Landlord and Tenant': 'Example: "I need help to fight an eviction" or "I would like a lawyer to review a rental contract"',
|
|
296
|
-
'Lemon Law': 'Example: "I purchased a new vehicle that broke down already and seller will not assist"',
|
|
297
|
-
'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"',
|
|
298
|
-
'Medical Malpractice': 'Example: "A doctor performed surgery on the wrong limb and I would like to file a lawsuit"',
|
|
299
|
-
'Patents and Intellectual Property': 'Example: "I would like to file for a patent" or "I need to copyright a name"',
|
|
300
|
-
'Personal Injury': 'Example: "I was bit by the neighbor\'s dog" or "I fell in the icy grocery store parking lot"',
|
|
301
|
-
'Power of Attorney': 'Example: "I need help with a limited or general power of attorney"',
|
|
302
|
-
'Probate and Estates': 'Example: "I need help with planning for my estate" or "A family member passed without a will in place"',
|
|
303
|
-
'Product Liability': 'Example: "My car battery caught on fire" or "I purchased a faulty product"',
|
|
304
|
-
'Property Damage': 'Example: "The neighbor\'s tree fell on my fence" or "My car was hit in the parking lot"',
|
|
305
|
-
'Real Estate': 'Example: "I need help with a quitclaim deed" or "I need a lawyer to review a purchase and sales agreement"',
|
|
306
|
-
'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"',
|
|
307
|
-
'Tax and IRS': 'Example: "I need help fighting an IRS tax claim" or "I need audit defense"',
|
|
308
|
-
'Traffic and Tickets': 'Example: "I need help reinstating a supsended license" or "I would like to fight a traffic ticket"',
|
|
309
|
-
'Unemployment': 'Example: "I need help filing for unemployment benefits"',
|
|
310
|
-
'Victim of a Crime': 'Example: "I was assaulted in the store" or "I am being discriminated against at work"',
|
|
311
|
-
'Wills and Trusts': 'Example: "I need a simple will created" or "I would like guidance on creating a trust fund"',
|
|
312
|
-
'Workers Compensation': 'Example: "I was injured at work and would like to file for workers compensation benefits"',
|
|
313
|
-
'Wrongful Death': 'Example: "A family member was killed on the job and we need legal representation"',
|
|
314
|
-
'Wrongful Termination': 'Example: "I was fired by my employer without cause"',
|
|
315
|
-
'Not Sure or Other': 'Example: "I was involved in a car accident" or "I need help setting up power of attorney"'
|
|
316
|
-
};
|
|
317
|
-
|
|
318
|
-
const TOLPFinalHeadlines = {
|
|
319
|
-
// 'Adoption': '',
|
|
320
|
-
};
|
|
321
|
-
|
|
322
|
-
const TOLPFinalSubHeadlines = {
|
|
323
|
-
'Adoption': 'You may benefit from speaking with an adoption professional. Please verify your contact information.',
|
|
324
|
-
// 'Asbestos and Mesothelioma': '',
|
|
325
|
-
'Auto and Car Accidents': 'You may benefit from speaking with an accident professional. Please verify your contact information.',
|
|
326
|
-
'Bankruptcy': 'You may benefit from speaking with a bankruptcy professional. Please verify your contact information.',
|
|
327
|
-
// 'Birth Certificate and Name Change': '',
|
|
328
|
-
// 'Business Lawyers': '',
|
|
329
|
-
// 'Child Custody and Support': '',
|
|
330
|
-
// 'Civil Rights and Discrimination': '',
|
|
331
|
-
// 'Civil Lawsuit': '',
|
|
332
|
-
// 'Consumer Lawyers': '',
|
|
333
|
-
'Copyrights and Trademarks': 'You may benefit from speaking with a copyright and trademark professional. Please verify your contact information.',
|
|
334
|
-
// 'Criminal and Felony': '',
|
|
335
|
-
// 'Debt and Collections': '',
|
|
336
|
-
'Divorce and Separation': 'You may benefit from speaking with a divorce professional. Please verify your contact information.',
|
|
337
|
-
'DUI and DWI': 'You may benefit from speaking with a DUI professional. Please verify your contact information.',
|
|
338
|
-
'Elder Law': 'You may benefit from speaking with an elder law professional. Please verify your contact information.',
|
|
339
|
-
// 'Employment and Workplace': '',
|
|
340
|
-
// 'Expungement': '',
|
|
341
|
-
// 'Family Issues': '',
|
|
342
|
-
'Foreclosure': 'You may benefit from speaking with a foreclosure professional. Please verify your contact information.',
|
|
343
|
-
'Guardianship': 'You may benefit from speaking with a guardianship professional. Please verify your contact information.',
|
|
344
|
-
// 'Harassment and Discrimination': '',
|
|
345
|
-
// 'Identity Theft': '',
|
|
346
|
-
'Immigration and Visas': 'You may benefit from speaking with a immigration professional. Please verify your contact information.',
|
|
347
|
-
// 'Insurance': '',
|
|
348
|
-
'Landlord and Tenant': 'You may benefit from speaking with a landlord and tenant legal professional. Please verify your contact information.',
|
|
349
|
-
// 'Lemon Law': '',
|
|
350
|
-
'Long Term Disability': 'You may benefit from speaking with a disability legal professional. Please verify your contact information.',
|
|
351
|
-
'Medical Malpractice': 'You may benefit from speaking with a malpractice professional. Please verify your contact information.',
|
|
352
|
-
'Patents and Intellectual Property': 'You may benefit from speaking with a patent professional. Please verify your contact information.',
|
|
353
|
-
'Personal Injury': 'You may benefit from speaking with a personal injury professional. Please verify your contact information.',
|
|
354
|
-
// 'Power of Attorney': '',
|
|
355
|
-
'Probate and Estates': 'You may benefit from speaking with a probate and estate professional. Please verify your contact information.',
|
|
356
|
-
// 'Product Liability': '',
|
|
357
|
-
// 'Property Damage': '',
|
|
358
|
-
'Real Estate': 'You may benefit from speaking with a real estate professional. Please verify your contact information.',
|
|
359
|
-
'Social Security Disability and Insurance': 'You may benefit from speaking with an SSDI professional. Please verify your contact information.',
|
|
360
|
-
'Tax and IRS': 'You may benefit from speaking with a tax professional. Please verify your contact information.',
|
|
361
|
-
// 'Traffic and Tickets': '',
|
|
362
|
-
'Unemployment': 'You may benefit from speaking with an unemployment professional. Please verify your contact information.',
|
|
363
|
-
// 'Victim of a Crime': '',
|
|
364
|
-
// 'Wills and Trusts': '',
|
|
365
|
-
'Workers Compensation': 'You may benefit from speaking with a workers compensation professional. Please verify your contact information.',
|
|
366
|
-
// 'Wrongful Death': '',
|
|
367
|
-
// 'Wrongful Termination': '',
|
|
368
|
-
// 'Not Sure or Other': ''
|
|
369
|
-
// 'Sexual Harassment': '',
|
|
370
|
-
// 'Workplace Harassment': '',
|
|
371
|
-
// 'Non-Workplace Harassment': '',
|
|
372
|
-
// 'Workplace Discrimination': '',
|
|
373
|
-
// 'Non-Workplace Discrimination': '',
|
|
374
|
-
};
|
|
375
|
-
|
|
376
|
-
// ------ Common Base Settings
|
|
377
|
-
|
|
378
|
-
const checkbox = (updates) => {
|
|
379
|
-
if (updates.name && !updates.id) {
|
|
380
|
-
updates.id = updates.name;
|
|
381
|
-
}
|
|
382
|
-
return merge({
|
|
383
|
-
$formkit: 'checkbox',
|
|
384
|
-
validation: 'required',
|
|
385
|
-
validationMessages: {
|
|
386
|
-
required: 'Field is required'
|
|
341
|
+
function firstAndLastStepHeadline(updates) {
|
|
342
|
+
return {
|
|
343
|
+
$el: 'h3',
|
|
344
|
+
children: updates.headline || 'Please Provide a Contact Name',
|
|
345
|
+
attrs: {
|
|
346
|
+
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 || '')
|
|
387
347
|
}
|
|
388
|
-
}, updates)
|
|
389
|
-
};
|
|
390
|
-
|
|
391
|
-
const sbsCheckbox = (updates) => {
|
|
392
|
-
updates.legendClass = 'legend-left required';
|
|
393
|
-
updates.fieldsetClass = '$reset side-by-side';
|
|
394
|
-
updates.optionsClass = 't-pl-1';
|
|
395
|
-
updates.innerClass = 't-flex t-items-center';
|
|
396
|
-
updates.wrapperClass = 't-mb-3';
|
|
397
|
-
return checkbox(updates)
|
|
398
|
-
};
|
|
399
|
-
|
|
400
|
-
const radio = (updates) => {
|
|
401
|
-
if (updates.name && !updates.id) {
|
|
402
|
-
updates.id = updates.name;
|
|
403
348
|
}
|
|
404
|
-
|
|
405
|
-
$formkit: 'radio',
|
|
406
|
-
validation: 'required',
|
|
407
|
-
validationMessages: {
|
|
408
|
-
required: 'Field is required'
|
|
409
|
-
},
|
|
410
|
-
optionsClass: 't-pt-3 t-pl-1',
|
|
411
|
-
legendClass: 'required'
|
|
412
|
-
}, updates)
|
|
413
|
-
};
|
|
349
|
+
}
|
|
414
350
|
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
351
|
+
function contactStepHeadline(updates) {
|
|
352
|
+
return {
|
|
353
|
+
$el: 'h3',
|
|
354
|
+
children: updates.headline || DEFAULT_FINAL_HEADLINE_DYNAMIC,
|
|
355
|
+
attrs: {
|
|
356
|
+
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 || '')
|
|
357
|
+
}
|
|
420
358
|
}
|
|
421
|
-
|
|
422
|
-
updates.wrapperClass = '$reset formkit-wrapper t-mb-0 t-flex t-items-center t-h-[100%]';
|
|
423
|
-
updates.labelClass = 't-font-semibold t-text-[#1e448f] t-w-[100%]';
|
|
424
|
-
updates.decoratorIcon = false;
|
|
425
|
-
updates.messagesClass = 't-flex t-justify-center';
|
|
426
|
-
return radio(updates)
|
|
427
|
-
};
|
|
428
|
-
|
|
429
|
-
const verticalYesNoRadio = (updates) => {
|
|
430
|
-
updates.options = ['Yes', 'No'];
|
|
431
|
-
updates.optionsClass = 't-flex t-justify-center t-my-3';
|
|
432
|
-
return verticalButtonRadio(updates)
|
|
433
|
-
};
|
|
359
|
+
}
|
|
434
360
|
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
361
|
+
function contactStepSubHeadline(updates) {
|
|
362
|
+
return {
|
|
363
|
+
$el: 'h5',
|
|
364
|
+
children: updates.subheadline || DEFAULT_FINAL_SUBHEADLINE_DYNAMIC,
|
|
365
|
+
attrs: {
|
|
366
|
+
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 || '')
|
|
367
|
+
}
|
|
438
368
|
}
|
|
439
|
-
|
|
440
|
-
$formkit: 'text',
|
|
441
|
-
validation: 'required',
|
|
442
|
-
validationMessages: {
|
|
443
|
-
required: 'Field is required'
|
|
444
|
-
},
|
|
445
|
-
labelClass: 'required'
|
|
446
|
-
}, updates)
|
|
447
|
-
};
|
|
448
|
-
|
|
449
|
-
const sbsText = (updates) => {
|
|
450
|
-
updates.wrapperClass = 'side-by-side t-items-center';
|
|
451
|
-
return text(updates)
|
|
452
|
-
};
|
|
453
|
-
|
|
454
|
-
const verticalText = (updates) => {
|
|
455
|
-
updates.wrapperClass = 't-flex t-justify-center';
|
|
456
|
-
updates.messagesClass = 't-flex t-justify-center';
|
|
457
|
-
updates.inputClass = 't-text-center';
|
|
458
|
-
return text(updates)
|
|
459
|
-
};
|
|
369
|
+
}
|
|
460
370
|
|
|
461
|
-
const
|
|
462
|
-
if (
|
|
463
|
-
|
|
371
|
+
const TRUSTED_FORM_JS = `(function() {
|
|
372
|
+
if (window.xxTrustedFormLoaded) {
|
|
373
|
+
return
|
|
464
374
|
}
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
};
|
|
375
|
+
var vid = '';
|
|
376
|
+
if (typeof window.zar !== 'undefined') {
|
|
377
|
+
vid = window.zar.getVID();
|
|
378
|
+
}
|
|
379
|
+
window.xxTrustedFormLoaded = true;
|
|
380
|
+
var sandbox = document.location.hostname.indexOf('localhost') > -1 ? 'true' : 'false'
|
|
381
|
+
var tf = document.createElement('script');
|
|
382
|
+
tf.type = 'text/javascript'; tf.async = true;
|
|
383
|
+
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();
|
|
384
|
+
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(tf, s);
|
|
385
|
+
})();`;
|
|
477
386
|
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
validationMessages: {
|
|
486
|
-
required: 'Applicant Age is required',
|
|
487
|
-
min: 'Invalid Age - must be between 18 and 65',
|
|
488
|
-
max: 'Invalid Age - must be between 18 and 65',
|
|
489
|
-
},
|
|
490
|
-
});
|
|
387
|
+
function trustedFormScript() {
|
|
388
|
+
return {
|
|
389
|
+
$el: 'script',
|
|
390
|
+
if: '$activeStep === $lastStep()',
|
|
391
|
+
children: TRUSTED_FORM_JS
|
|
392
|
+
}
|
|
393
|
+
}
|
|
491
394
|
|
|
492
|
-
const
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
helpClass: "!t-text-sm"
|
|
395
|
+
const stepDefaults = (step, stepKey) => ({
|
|
396
|
+
$el: 'section',
|
|
397
|
+
if: '$stepEnabled("' + step + '")',
|
|
398
|
+
attrs: {
|
|
399
|
+
hidden: '$activeStep !== "' + step + '"',
|
|
400
|
+
key: stepKey ? stepKey : step
|
|
401
|
+
}
|
|
500
402
|
});
|
|
501
403
|
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
)
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
name: scope ? scope + ':' + 'Disability_Work_History' : 'Disability_Work_History',
|
|
516
|
-
});
|
|
517
|
-
|
|
518
|
-
const doctorTreatmentCenter = () => verticalYesNoRadio({
|
|
519
|
-
name: 'Doctor_Treatment',
|
|
520
|
-
});
|
|
521
|
-
|
|
522
|
-
const email = () => sbsText({
|
|
523
|
-
$formkit: 'email',
|
|
524
|
-
name: 'Email',
|
|
525
|
-
label: 'Email Address:',
|
|
526
|
-
placeholder: 'email@domain.com',
|
|
527
|
-
autocomplete: 'email',
|
|
528
|
-
'data-tf-sensitive': 'false',
|
|
529
|
-
validation: 'required|email',
|
|
530
|
-
validationMessages: {
|
|
531
|
-
required: 'Email is required',
|
|
532
|
-
email: 'Invalid Email'
|
|
533
|
-
}
|
|
534
|
-
});
|
|
535
|
-
|
|
536
|
-
const firstName = () => sbsText({
|
|
537
|
-
$formkit: 'text',
|
|
538
|
-
label: 'First Name:',
|
|
539
|
-
placeholder: 'First',
|
|
540
|
-
name: 'First_Name',
|
|
541
|
-
autocomplete: "given-name",
|
|
542
|
-
validationMessages: {
|
|
543
|
-
required: 'First Name is required'
|
|
544
|
-
}
|
|
545
|
-
});
|
|
546
|
-
|
|
547
|
-
const haveAttorneyCenter = () => verticalYesNoRadio({
|
|
548
|
-
name: 'Have_Attorney',
|
|
549
|
-
});
|
|
550
|
-
|
|
551
|
-
const lastName = () => sbsText({
|
|
552
|
-
$formkit: 'text',
|
|
553
|
-
label: 'Last Name:',
|
|
554
|
-
placeholder: 'Last',
|
|
555
|
-
name: 'Last_Name',
|
|
556
|
-
autocomplete: "family-name",
|
|
557
|
-
validationMessages: {
|
|
558
|
-
required: 'Last Name is required'
|
|
559
|
-
}
|
|
560
|
-
});
|
|
561
|
-
|
|
562
|
-
const phone = () => sbsText({
|
|
563
|
-
$formkit: 'tel',
|
|
564
|
-
name: 'Primary_Phone',
|
|
565
|
-
label: 'Phone Number:',
|
|
566
|
-
placeholder: '###-###-####',
|
|
567
|
-
maxlength: 12,
|
|
568
|
-
help: '10-digit phone number, hyphens optional',
|
|
569
|
-
autocomplete: 'tel-national',
|
|
570
|
-
'data-tf-sensitive': 'false',
|
|
571
|
-
validation: 'required|matches:/^[0-9]{3}-?[0-9]{3}-?[0-9]{4}$/|valid_phone',
|
|
572
|
-
validationMessages: {
|
|
573
|
-
required: 'Field is required',
|
|
574
|
-
matches: 'Invalid Phone Format, use ###-###-####',
|
|
575
|
-
valid_phone: 'Invalid Phone Number'
|
|
576
|
-
},
|
|
577
|
-
helpClass: "t-mt-2.5 md:t-text-right md:t-mt-[-2px]"
|
|
578
|
-
});
|
|
579
|
-
|
|
580
|
-
const socialSecurityDisabilityReceivingBenefitsCenter = (scope) => verticalYesNoRadio({
|
|
581
|
-
name: scope ? scope + ':' + 'Social_Security_Disability_Receiving_Benefits' : 'Social_Security_Disability_Receiving_Benefits',
|
|
582
|
-
});
|
|
583
|
-
|
|
584
|
-
const TCPAConsent = () => ({
|
|
585
|
-
$formkit: 'checkbox',
|
|
586
|
-
label: '$meta.tcpaLanguage',
|
|
587
|
-
name: 'TCPA_Opt_In',
|
|
588
|
-
'data-tf-sensitive': 'false',
|
|
589
|
-
validation: 'required|accepted',
|
|
590
|
-
validationMessages: {
|
|
591
|
-
required: 'Consent is required',
|
|
592
|
-
accepted: 'Consent is required'
|
|
593
|
-
},
|
|
594
|
-
classes: {
|
|
595
|
-
label: "t-text-xs t-text-slate-500 t-font-normal"
|
|
596
|
-
}
|
|
597
|
-
});
|
|
598
|
-
|
|
599
|
-
const zipcodeCenter = () => text({
|
|
600
|
-
placeholder: '#####',
|
|
601
|
-
help: "We try to match you with local legal help",
|
|
602
|
-
name: 'Zip',
|
|
603
|
-
maxlength: 5,
|
|
604
|
-
inputmode: "numeric",
|
|
605
|
-
autocomplete: 'postal-code',
|
|
606
|
-
validation: 'required|matches:/^[0-9]{5}$/',
|
|
607
|
-
validationMessages: {
|
|
608
|
-
required: 'Zip Code is required',
|
|
609
|
-
matches: 'Invalid Zip Code'
|
|
610
|
-
},
|
|
611
|
-
wrapperClass: 't-flex t-justify-center',
|
|
612
|
-
messagesClass: 't-flex t-justify-center',
|
|
613
|
-
inputClass: 't-text-center',
|
|
614
|
-
helpClass: 't-mt-2.5 !t-text-sm t-text-center'
|
|
615
|
-
});
|
|
616
|
-
|
|
617
|
-
const NEXT_ON_ENTER = '$onEnter($setNextStep($fireStepEvent($get(form)), $preStepFunc($get(form))))';
|
|
618
|
-
const NEXT_ON_INPUT = '$onInput($setNextStep($fireStepEvent($get(form)), $preStepFunc($get(form))))';
|
|
619
|
-
|
|
620
|
-
const isInput = (n) => { return (n.type !== 'group' && n.type !== 'section' && n.type !== 'form' && n.$formkit !== 'hidden' && !n.children) };
|
|
621
|
-
|
|
622
|
-
const findLastInput = (n) => {
|
|
623
|
-
if (isInput(n)) {
|
|
624
|
-
return n
|
|
625
|
-
}
|
|
626
|
-
for (var i = n.children.length - 1; i >= 0; i--) {
|
|
627
|
-
if (typeof n.children === 'string') {
|
|
628
|
-
continue
|
|
629
|
-
}
|
|
630
|
-
const child = n.children[i];
|
|
631
|
-
if (isInput(child)) {
|
|
632
|
-
return child
|
|
633
|
-
}
|
|
634
|
-
const res = findLastInput(child);
|
|
635
|
-
if (res) {
|
|
636
|
-
return res
|
|
637
|
-
}
|
|
638
|
-
}
|
|
639
|
-
return null
|
|
640
|
-
};
|
|
641
|
-
|
|
642
|
-
function verticalStepHeadline(updates) {
|
|
643
|
-
return {
|
|
644
|
-
$el: 'h3',
|
|
645
|
-
children: updates.headline || 'Tell Us About Your Situation',
|
|
646
|
-
attrs: {
|
|
647
|
-
class: 't-flex t-justify-center t-text-center t-text-2xl t-font-bold t-text-dark t-pb-5 t-pt-0 t-px-1' + ' ' + (updates.headlineClass || '')
|
|
648
|
-
}
|
|
649
|
-
}
|
|
650
|
-
}
|
|
651
|
-
|
|
652
|
-
function commentsStepHeadline(updates) {
|
|
653
|
-
return {
|
|
654
|
-
$el: 'h3',
|
|
655
|
-
children: updates.headline || 'Additional Case Details',
|
|
656
|
-
attrs: {
|
|
657
|
-
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 || '')
|
|
658
|
-
}
|
|
659
|
-
}
|
|
660
|
-
}
|
|
661
|
-
|
|
662
|
-
function firstAndLastStepHeadline(updates) {
|
|
663
|
-
return {
|
|
664
|
-
$el: 'h3',
|
|
665
|
-
children: updates.headline || 'Please Provide a Contact Name',
|
|
666
|
-
attrs: {
|
|
667
|
-
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 || '')
|
|
668
|
-
}
|
|
669
|
-
}
|
|
670
|
-
}
|
|
671
|
-
|
|
672
|
-
function contactStepHeadline(updates) {
|
|
673
|
-
return {
|
|
674
|
-
$el: 'h3',
|
|
675
|
-
children: updates.headline || DEFAULT_FINAL_HEADLINE_DYNAMIC,
|
|
676
|
-
attrs: {
|
|
677
|
-
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 || '')
|
|
678
|
-
}
|
|
679
|
-
}
|
|
680
|
-
}
|
|
681
|
-
|
|
682
|
-
function contactStepSubHeadline(updates) {
|
|
683
|
-
return {
|
|
684
|
-
$el: 'h5',
|
|
685
|
-
children: updates.subheadline || DEFAULT_FINAL_SUBHEADLINE_DYNAMIC,
|
|
686
|
-
attrs: {
|
|
687
|
-
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 || '')
|
|
688
|
-
}
|
|
689
|
-
}
|
|
690
|
-
}
|
|
691
|
-
|
|
692
|
-
const TRUSTED_FORM_JS = `(function() {
|
|
693
|
-
if (window.xxTrustedFormLoaded) {
|
|
694
|
-
return
|
|
695
|
-
}
|
|
696
|
-
var vid = '';
|
|
697
|
-
if (typeof window.zar !== 'undefined') {
|
|
698
|
-
vid = window.zar.getVID();
|
|
699
|
-
}
|
|
700
|
-
window.xxTrustedFormLoaded = true;
|
|
701
|
-
var sandbox = document.location.hostname.indexOf('localhost') > -1 ? 'true' : 'false'
|
|
702
|
-
var tf = document.createElement('script');
|
|
703
|
-
tf.type = 'text/javascript'; tf.async = true;
|
|
704
|
-
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();
|
|
705
|
-
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(tf, s);
|
|
706
|
-
})();`;
|
|
707
|
-
|
|
708
|
-
function trustedFormScript() {
|
|
709
|
-
return {
|
|
710
|
-
$el: 'script',
|
|
711
|
-
if: '$activeStep === $lastStep()',
|
|
712
|
-
children: TRUSTED_FORM_JS
|
|
713
|
-
}
|
|
714
|
-
}
|
|
715
|
-
|
|
716
|
-
const stepDefaults = (step, stepKey) => ({
|
|
717
|
-
$el: 'section',
|
|
718
|
-
if: '$stepEnabled("' + step + '")',
|
|
719
|
-
attrs: {
|
|
720
|
-
hidden: '$activeStep !== "' + step + '"',
|
|
721
|
-
key: stepKey ? stepKey : step
|
|
722
|
-
}
|
|
723
|
-
});
|
|
724
|
-
|
|
725
|
-
function step(name, inputs, nextOnEnter = true, nextOnInput = false, stepKey = undefined, nextStepMap = undefined, autoFocus = undefined) {
|
|
726
|
-
if (typeof nextOnEnter === 'undefined') {
|
|
727
|
-
nextOnEnter = true;
|
|
728
|
-
}
|
|
729
|
-
if (inputs && inputs.length && (nextOnEnter || nextOnInput)) {
|
|
730
|
-
const lastInput = findLastInput(inputs[inputs.length - 1]);
|
|
731
|
-
if (lastInput && nextOnEnter === true) {
|
|
732
|
-
lastInput.onKeypress = NEXT_ON_ENTER;
|
|
733
|
-
}
|
|
734
|
-
if (lastInput && nextOnInput === true) {
|
|
735
|
-
lastInput.onInput = NEXT_ON_INPUT;
|
|
736
|
-
}
|
|
737
|
-
}
|
|
404
|
+
function step(name, inputs, nextOnEnter = true, nextOnInput = false, stepKey = undefined, nextStepMap = undefined, autoFocus = undefined) {
|
|
405
|
+
if (typeof nextOnEnter === 'undefined') {
|
|
406
|
+
nextOnEnter = true;
|
|
407
|
+
}
|
|
408
|
+
if (inputs && inputs.length && (nextOnEnter || nextOnInput)) {
|
|
409
|
+
const lastInput = findLastInput(inputs[inputs.length - 1]);
|
|
410
|
+
if (lastInput && nextOnEnter === true) {
|
|
411
|
+
lastInput.onKeypress = NEXT_ON_ENTER;
|
|
412
|
+
}
|
|
413
|
+
if (lastInput && nextOnInput === true) {
|
|
414
|
+
lastInput.onInput = NEXT_ON_INPUT;
|
|
415
|
+
}
|
|
416
|
+
}
|
|
738
417
|
|
|
739
418
|
return merge(
|
|
740
419
|
stepDefaults(name, stepKey),
|
|
@@ -753,7 +432,7 @@ function step(name, inputs, nextOnEnter = true, nextOnInput = false, stepKey = u
|
|
|
753
432
|
)
|
|
754
433
|
}
|
|
755
434
|
|
|
756
|
-
function
|
|
435
|
+
function commentsWithBankruptcy(updates = {}) {
|
|
757
436
|
return step(
|
|
758
437
|
'commentsWithBankruptcy',
|
|
759
438
|
[
|
|
@@ -761,7 +440,7 @@ function commentsWithBankruptcyV2(updates = {}) {
|
|
|
761
440
|
comments({
|
|
762
441
|
label: typeof updates.label === 'undefined' ? DEFAULT_COMMENTS_LABEL : updates.label,
|
|
763
442
|
placeholder: updates.placeholder || DEFAULT_COMMENTS_PLACEHOLDER_DYNAMIC,
|
|
764
|
-
inputClass: typeof updates.inputClass === 'undefined' ? '!t-h-
|
|
443
|
+
inputClass: typeof updates.inputClass === 'undefined' ? '!t-h-32' : updates.inputClass,
|
|
765
444
|
}),
|
|
766
445
|
bankruptcyCrossSell(),
|
|
767
446
|
{
|
|
@@ -776,24 +455,23 @@ function commentsWithBankruptcyV2(updates = {}) {
|
|
|
776
455
|
],
|
|
777
456
|
}
|
|
778
457
|
],
|
|
779
|
-
|
|
458
|
+
false // nextOnEnter
|
|
780
459
|
)
|
|
781
460
|
}
|
|
782
461
|
|
|
783
|
-
function
|
|
462
|
+
function contactInfo(updates = {}) {
|
|
784
463
|
return step(
|
|
785
464
|
'contactInfo',
|
|
786
465
|
[
|
|
787
466
|
contactStepHeadline(updates),
|
|
788
467
|
contactStepSubHeadline(updates),
|
|
789
|
-
// Added TF everywhere
|
|
790
468
|
trustedFormScript(),
|
|
791
469
|
email(),
|
|
792
470
|
phone(),
|
|
793
471
|
TCPAConsent(),
|
|
794
472
|
secureIcon()
|
|
795
473
|
],
|
|
796
|
-
|
|
474
|
+
false, // nextOnEnter
|
|
797
475
|
)
|
|
798
476
|
}
|
|
799
477
|
|
|
@@ -822,7 +500,9 @@ function ssdiTOLPAndZip(updates = {}) {
|
|
|
822
500
|
zipcodeCenter()
|
|
823
501
|
],
|
|
824
502
|
updates.nextOnEnter,
|
|
825
|
-
updates.nextOnInput
|
|
503
|
+
updates.nextOnInput,
|
|
504
|
+
updates.stepKey,
|
|
505
|
+
updates.nextStepMap
|
|
826
506
|
)
|
|
827
507
|
}
|
|
828
508
|
|
|
@@ -899,7 +579,9 @@ function ssdiHaveAttorney(updates = {}) {
|
|
|
899
579
|
)
|
|
900
580
|
}
|
|
901
581
|
|
|
902
|
-
|
|
582
|
+
// ------ Common
|
|
583
|
+
|
|
584
|
+
const formNavigation = () => ({
|
|
903
585
|
$el: 'div',
|
|
904
586
|
attrs: {
|
|
905
587
|
class: 'step-nav'
|
|
@@ -994,6 +676,326 @@ const formDetails = () => ({
|
|
|
994
676
|
]
|
|
995
677
|
});
|
|
996
678
|
|
|
679
|
+
const formPropDefaults = {
|
|
680
|
+
type: 'form',
|
|
681
|
+
id: 'form',
|
|
682
|
+
config: { validationVisibility: 'submit' },
|
|
683
|
+
onSubmit: '$submit($submitUrl, $prepData, $handleRedirect, "text/plain; charset=UTF-8")',
|
|
684
|
+
plugins: '$plugins',
|
|
685
|
+
actions: false,
|
|
686
|
+
anchorElement: 'form-anchor',
|
|
687
|
+
useLocalStorage: true,
|
|
688
|
+
prepop: {
|
|
689
|
+
fromURL: true
|
|
690
|
+
},
|
|
691
|
+
errorCodes: {
|
|
692
|
+
403: { message: "An Error Occurred", abort: false },
|
|
693
|
+
409: { abort: false },
|
|
694
|
+
429: "An Error Occurred",
|
|
695
|
+
504: { message: "An Error Occurred", abort: false },
|
|
696
|
+
},
|
|
697
|
+
formClass: '!t-max-w-[40rem]'
|
|
698
|
+
};
|
|
699
|
+
|
|
700
|
+
function formProps(updates) {
|
|
701
|
+
const props = merge(
|
|
702
|
+
formPropDefaults,
|
|
703
|
+
updates
|
|
704
|
+
);
|
|
705
|
+
if (props.formId && !props.name) {
|
|
706
|
+
props.name = props.formId;
|
|
707
|
+
}
|
|
708
|
+
return props
|
|
709
|
+
}
|
|
710
|
+
|
|
711
|
+
const metaDefaults = {
|
|
712
|
+
tcpaLanguage: TCPA_LANGUAGE
|
|
713
|
+
};
|
|
714
|
+
|
|
715
|
+
function metaProps(updates) {
|
|
716
|
+
const data = merge(
|
|
717
|
+
metaDefaults,
|
|
718
|
+
updates
|
|
719
|
+
);
|
|
720
|
+
return {
|
|
721
|
+
type: 'meta',
|
|
722
|
+
data
|
|
723
|
+
}
|
|
724
|
+
}
|
|
725
|
+
|
|
726
|
+
function defaultMetaProps() {
|
|
727
|
+
return metaProps({
|
|
728
|
+
defaultCommentsPlaceholder: DEFAULT_COMMENTS_PLACEHOLDER_DYNAMIC,
|
|
729
|
+
commentsPlaceholders: TOLPCommentsPlaceholders,
|
|
730
|
+
defaultFinalHeadline: DEFAULT_FINAL_HEADLINE,
|
|
731
|
+
finalHeadlines: TOLPFinalHeadlines,
|
|
732
|
+
defaultFinalSubHeadline: DEFAULT_FINAL_SUBHEADLINE,
|
|
733
|
+
finalSubHeadlines: TOLPFinalSubHeadlines,
|
|
734
|
+
})
|
|
735
|
+
}
|
|
736
|
+
|
|
737
|
+
const formAnchorDefaults = {
|
|
738
|
+
$el: 'div',
|
|
739
|
+
children: [
|
|
740
|
+
{
|
|
741
|
+
$el: 'div',
|
|
742
|
+
attrs: {
|
|
743
|
+
id: 'form-anchor',
|
|
744
|
+
class: 't-absolute',
|
|
745
|
+
style: { top: '-30px', left: 0 }
|
|
746
|
+
}
|
|
747
|
+
}
|
|
748
|
+
],
|
|
749
|
+
attrs: {
|
|
750
|
+
class: 't-relative'
|
|
751
|
+
}
|
|
752
|
+
};
|
|
753
|
+
|
|
754
|
+
function formAnchor(updates) {
|
|
755
|
+
return merge(
|
|
756
|
+
formAnchorDefaults,
|
|
757
|
+
updates
|
|
758
|
+
)
|
|
759
|
+
}
|
|
760
|
+
|
|
761
|
+
const progressBarDefaults = {
|
|
762
|
+
$el: 'div',
|
|
763
|
+
attrs: {
|
|
764
|
+
class: 't-mt-7 t-mb-5 t-w-full t-flex t-flex-col t-justify-center t-items-center',
|
|
765
|
+
style: {
|
|
766
|
+
if: '$fns.eq($activeStep, $firstStep()) || $fns.eq($activeStep, $lastStep())',
|
|
767
|
+
then: 'display: none'
|
|
768
|
+
},
|
|
769
|
+
},
|
|
770
|
+
children: [
|
|
771
|
+
{
|
|
772
|
+
$el: 'div',
|
|
773
|
+
attrs: {
|
|
774
|
+
class: 't-flex t-justify-center'
|
|
775
|
+
},
|
|
776
|
+
children: [
|
|
777
|
+
{
|
|
778
|
+
$el: 'span',
|
|
779
|
+
attrs: {
|
|
780
|
+
id: 'progress-bar-text',
|
|
781
|
+
class: 't-text-sm t-mb-1'
|
|
782
|
+
},
|
|
783
|
+
children: [
|
|
784
|
+
"0% Complete"
|
|
785
|
+
]
|
|
786
|
+
},
|
|
787
|
+
]
|
|
788
|
+
},
|
|
789
|
+
{
|
|
790
|
+
$el: 'div',
|
|
791
|
+
attrs: {
|
|
792
|
+
class: 't-bg-gray-100 t-w-9/12 t-rounded'
|
|
793
|
+
},
|
|
794
|
+
children: [
|
|
795
|
+
{
|
|
796
|
+
$el: 'div',
|
|
797
|
+
attrs: {
|
|
798
|
+
id: 'progress-bar',
|
|
799
|
+
class: 't-flex t-flex-col t-justify-center t-text-center t-whitespace-nowrap t-w-[10%] t-h-1.5 t-rounded t-text-white t-bg-[#007bff]',
|
|
800
|
+
style: {
|
|
801
|
+
transition: 'width 0.5s ease'
|
|
802
|
+
},
|
|
803
|
+
},
|
|
804
|
+
}
|
|
805
|
+
]
|
|
806
|
+
}
|
|
807
|
+
]
|
|
808
|
+
};
|
|
809
|
+
|
|
810
|
+
function progressBar(updates) {
|
|
811
|
+
return merge(
|
|
812
|
+
progressBarDefaults,
|
|
813
|
+
updates
|
|
814
|
+
)
|
|
815
|
+
}
|
|
816
|
+
|
|
817
|
+
function headlineDefaults(updates = {}) {
|
|
818
|
+
return {
|
|
819
|
+
$el: 'h1',
|
|
820
|
+
attrs: {
|
|
821
|
+
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 || '')
|
|
822
|
+
}
|
|
823
|
+
}
|
|
824
|
+
}
|
|
825
|
+
|
|
826
|
+
function headline(updates = {}) {
|
|
827
|
+
return merge(
|
|
828
|
+
headlineDefaults(updates),
|
|
829
|
+
updates
|
|
830
|
+
)
|
|
831
|
+
}
|
|
832
|
+
|
|
833
|
+
function subHeadlineDefaults(updates = {}) {
|
|
834
|
+
return {
|
|
835
|
+
$el: 'h3',
|
|
836
|
+
attrs: {
|
|
837
|
+
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 || '')
|
|
838
|
+
}
|
|
839
|
+
}
|
|
840
|
+
}
|
|
841
|
+
|
|
842
|
+
function subHeadline(updates = {}) {
|
|
843
|
+
return merge(
|
|
844
|
+
subHeadlineDefaults(updates),
|
|
845
|
+
updates
|
|
846
|
+
)
|
|
847
|
+
}
|
|
848
|
+
|
|
849
|
+
const hiddenInputsBase = [
|
|
850
|
+
{
|
|
851
|
+
$formkit: 'hidden',
|
|
852
|
+
name: "gclid",
|
|
853
|
+
value: null
|
|
854
|
+
},
|
|
855
|
+
{
|
|
856
|
+
$formkit: 'hidden',
|
|
857
|
+
name: "campaignid",
|
|
858
|
+
value: null
|
|
859
|
+
},
|
|
860
|
+
{
|
|
861
|
+
$formkit: 'hidden',
|
|
862
|
+
name: "s",
|
|
863
|
+
value: null
|
|
864
|
+
}
|
|
865
|
+
];
|
|
866
|
+
|
|
867
|
+
const hiddenInputsLegal = [
|
|
868
|
+
{
|
|
869
|
+
$formkit: 'hidden',
|
|
870
|
+
name: "vertical",
|
|
871
|
+
value: "Legal"
|
|
872
|
+
},
|
|
873
|
+
{
|
|
874
|
+
$formkit: 'hidden',
|
|
875
|
+
name: "TCPA_Language",
|
|
876
|
+
value: "$meta.tcpaLanguage"
|
|
877
|
+
},
|
|
878
|
+
...hiddenInputsBase
|
|
879
|
+
];
|
|
880
|
+
|
|
881
|
+
const TOLPCommentsPlaceholders = {
|
|
882
|
+
'Adoption': 'Example: "I need help with adoption forms"',
|
|
883
|
+
'Asbestos and Mesothelioma': 'Example: "I was exposed to asbestos at work and would like to file a claim"',
|
|
884
|
+
'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"',
|
|
885
|
+
'Bankruptcy': 'Example: "I need help filing for bankruptcy"',
|
|
886
|
+
'Birth Certificate and Name Change': 'Example: "Just married and would like to change my last name"',
|
|
887
|
+
'Business Lawyers': 'Example: "I need help incorporating a business" or "I would like a legal contract reviewed"',
|
|
888
|
+
'Child Custody and Support': 'Example: "Need help getting custody" or "Issues with child support payments"',
|
|
889
|
+
'Child Custody': 'Example: "Need help getting custody"',
|
|
890
|
+
'Child Support': 'Example: "Issues with child support payments"',
|
|
891
|
+
'Civil Rights and Discrimination': 'Example: "Police brutality" or "Coworker keeps harassing me"',
|
|
892
|
+
'Civil Lawsuit': 'Example: "A contractor took my money and never completed the job" or "I am being sued by a neighbor"',
|
|
893
|
+
'File a Lawsuit': 'Example: "A contractor took my money and never completed the job"',
|
|
894
|
+
'Defend a Lawsuit': 'Example: "I am being sued by a neighbor"',
|
|
895
|
+
'Consumer Lawyers': 'Example: "Someone committed fraud against me" or "A contractor took my money and never completed the job"',
|
|
896
|
+
'Copyrights and Trademarks': 'Example: "I would like to register a trademark or copyright a name"',
|
|
897
|
+
'Criminal and Felony': 'Example: "I was arrested for DUI and need legal defense" or "I am being charged with assault"',
|
|
898
|
+
'Debt and Collections': 'Example: "I would like to consolidate my debt" or "A collection agency is harassing me"',
|
|
899
|
+
'Divorce and Separation': 'Example: "I would like to file for an uncontested divorce"',
|
|
900
|
+
'DUI and DWI': 'Example: "I was arrested for DUI and need legal defense"',
|
|
901
|
+
'Elder Law': 'Example: "I would like help with Estate Planning" or "I need help with a guardianship"',
|
|
902
|
+
'Employment and Workplace': 'Example: "I was injured while on the job" or "My company is discriminating against me"',
|
|
903
|
+
'Expungement': 'Example: "I would like to file for an expungement and clear my record"',
|
|
904
|
+
'Family Issues': 'Example: "I need help with guardianship" or "I need a simple will created"',
|
|
905
|
+
'Foreclosure': 'Example: "I need help to avoid foreclosure on my house"',
|
|
906
|
+
'Guardianship': 'Example: "I need help with guardianship documents"',
|
|
907
|
+
'Harassment and Discrimination': 'Example: "I am being discriminated at work" or "My neighbor is harassing me"',
|
|
908
|
+
'Sexual Harassment': 'Example: "I am being sexually harassed by a coworker"',
|
|
909
|
+
'Workplace Harassment': 'Example: "My coworker is being aggressive towards me"',
|
|
910
|
+
'Non-Workplace Harassment': 'Example: "My neighbor is harassing me"',
|
|
911
|
+
'Workplace Discrimination': 'Example: "I am being discriminated at work based on my age"',
|
|
912
|
+
'Non-Workplace Discrimination': 'Example: "I am being discriminated against by a local official"',
|
|
913
|
+
'Identity Theft': 'Example: "Someone stole my identity and I need help fixing the issue"',
|
|
914
|
+
'Immigration and Visas': 'Example: "I need help filing for a visa" or "Help with a green card"',
|
|
915
|
+
'Insurance': 'Example: "I need help filing an insurance claim for damage to my house"',
|
|
916
|
+
'Landlord and Tenant': 'Example: "I need help to fight an eviction" or "I would like a lawyer to review a rental contract"',
|
|
917
|
+
'Lemon Law': 'Example: "I purchased a new vehicle that broke down already and seller will not assist"',
|
|
918
|
+
'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"',
|
|
919
|
+
'Medical Malpractice': 'Example: "A doctor performed surgery on the wrong limb and I would like to file a lawsuit"',
|
|
920
|
+
'Patents and Intellectual Property': 'Example: "I would like to file for a patent" or "I need to copyright a name"',
|
|
921
|
+
'Personal Injury': 'Example: "I was bit by the neighbor\'s dog" or "I fell in the icy grocery store parking lot"',
|
|
922
|
+
'Power of Attorney': 'Example: "I need help with a limited or general power of attorney"',
|
|
923
|
+
'Probate and Estates': 'Example: "I need help with planning for my estate" or "A family member passed without a will in place"',
|
|
924
|
+
'Product Liability': 'Example: "My car battery caught on fire" or "I purchased a faulty product"',
|
|
925
|
+
'Property Damage': 'Example: "The neighbor\'s tree fell on my fence" or "My car was hit in the parking lot"',
|
|
926
|
+
'Real Estate': 'Example: "I need help with a quitclaim deed" or "I need a lawyer to review a purchase and sales agreement"',
|
|
927
|
+
'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"',
|
|
928
|
+
'Tax and IRS': 'Example: "I need help fighting an IRS tax claim" or "I need audit defense"',
|
|
929
|
+
'Traffic and Tickets': 'Example: "I need help reinstating a supsended license" or "I would like to fight a traffic ticket"',
|
|
930
|
+
'Unemployment': 'Example: "I need help filing for unemployment benefits"',
|
|
931
|
+
'Victim of a Crime': 'Example: "I was assaulted in the store" or "I am being discriminated against at work"',
|
|
932
|
+
'Wills and Trusts': 'Example: "I need a simple will created" or "I would like guidance on creating a trust fund"',
|
|
933
|
+
'Workers Compensation': 'Example: "I was injured at work and would like to file for workers compensation benefits"',
|
|
934
|
+
'Wrongful Death': 'Example: "A family member was killed on the job and we need legal representation"',
|
|
935
|
+
'Wrongful Termination': 'Example: "I was fired by my employer without cause"',
|
|
936
|
+
'Not Sure or Other': 'Example: "I was involved in a car accident" or "I need help setting up power of attorney"'
|
|
937
|
+
};
|
|
938
|
+
|
|
939
|
+
const TOLPFinalHeadlines = {
|
|
940
|
+
// 'Adoption': '',
|
|
941
|
+
};
|
|
942
|
+
|
|
943
|
+
const TOLPFinalSubHeadlines = {
|
|
944
|
+
'Adoption': 'You may benefit from speaking with an adoption professional. Please verify your contact information.',
|
|
945
|
+
// 'Asbestos and Mesothelioma': '',
|
|
946
|
+
'Auto and Car Accidents': 'You may benefit from speaking with an accident professional. Please verify your contact information.',
|
|
947
|
+
'Bankruptcy': 'You may benefit from speaking with a bankruptcy professional. Please verify your contact information.',
|
|
948
|
+
// 'Birth Certificate and Name Change': '',
|
|
949
|
+
// 'Business Lawyers': '',
|
|
950
|
+
// 'Child Custody and Support': '',
|
|
951
|
+
// 'Civil Rights and Discrimination': '',
|
|
952
|
+
// 'Civil Lawsuit': '',
|
|
953
|
+
// 'Consumer Lawyers': '',
|
|
954
|
+
'Copyrights and Trademarks': 'You may benefit from speaking with a copyright and trademark professional. Please verify your contact information.',
|
|
955
|
+
// 'Criminal and Felony': '',
|
|
956
|
+
// 'Debt and Collections': '',
|
|
957
|
+
'Divorce and Separation': 'You may benefit from speaking with a divorce professional. Please verify your contact information.',
|
|
958
|
+
'DUI and DWI': 'You may benefit from speaking with a DUI professional. Please verify your contact information.',
|
|
959
|
+
'Elder Law': 'You may benefit from speaking with an elder law professional. Please verify your contact information.',
|
|
960
|
+
// 'Employment and Workplace': '',
|
|
961
|
+
// 'Expungement': '',
|
|
962
|
+
// 'Family Issues': '',
|
|
963
|
+
'Foreclosure': 'You may benefit from speaking with a foreclosure professional. Please verify your contact information.',
|
|
964
|
+
'Guardianship': 'You may benefit from speaking with a guardianship professional. Please verify your contact information.',
|
|
965
|
+
// 'Harassment and Discrimination': '',
|
|
966
|
+
// 'Identity Theft': '',
|
|
967
|
+
'Immigration and Visas': 'You may benefit from speaking with a immigration professional. Please verify your contact information.',
|
|
968
|
+
// 'Insurance': '',
|
|
969
|
+
'Landlord and Tenant': 'You may benefit from speaking with a landlord and tenant legal professional. Please verify your contact information.',
|
|
970
|
+
// 'Lemon Law': '',
|
|
971
|
+
'Long Term Disability': 'You may benefit from speaking with a disability legal professional. Please verify your contact information.',
|
|
972
|
+
'Medical Malpractice': 'You may benefit from speaking with a malpractice professional. Please verify your contact information.',
|
|
973
|
+
'Patents and Intellectual Property': 'You may benefit from speaking with a patent professional. Please verify your contact information.',
|
|
974
|
+
'Personal Injury': 'You may benefit from speaking with a personal injury professional. Please verify your contact information.',
|
|
975
|
+
// 'Power of Attorney': '',
|
|
976
|
+
'Probate and Estates': 'You may benefit from speaking with a probate and estate professional. Please verify your contact information.',
|
|
977
|
+
// 'Product Liability': '',
|
|
978
|
+
// 'Property Damage': '',
|
|
979
|
+
'Real Estate': 'You may benefit from speaking with a real estate professional. Please verify your contact information.',
|
|
980
|
+
'Social Security Disability and Insurance': 'You may benefit from speaking with an SSDI professional. Please verify your contact information.',
|
|
981
|
+
'Tax and IRS': 'You may benefit from speaking with a tax professional. Please verify your contact information.',
|
|
982
|
+
// 'Traffic and Tickets': '',
|
|
983
|
+
'Unemployment': 'You may benefit from speaking with an unemployment professional. Please verify your contact information.',
|
|
984
|
+
// 'Victim of a Crime': '',
|
|
985
|
+
// 'Wills and Trusts': '',
|
|
986
|
+
'Workers Compensation': 'You may benefit from speaking with a workers compensation professional. Please verify your contact information.',
|
|
987
|
+
// 'Wrongful Death': '',
|
|
988
|
+
// 'Wrongful Termination': '',
|
|
989
|
+
// 'Not Sure or Other': ''
|
|
990
|
+
// 'Sexual Harassment': '',
|
|
991
|
+
// 'Workplace Harassment': '',
|
|
992
|
+
// 'Non-Workplace Harassment': '',
|
|
993
|
+
// 'Workplace Discrimination': '',
|
|
994
|
+
// 'Non-Workplace Discrimination': '',
|
|
995
|
+
};
|
|
996
|
+
|
|
997
|
+
// TODO: this doesnt have cross sells or dynamic schema support yet!
|
|
998
|
+
|
|
997
999
|
const schema = [
|
|
998
1000
|
defaultMetaProps(),
|
|
999
1001
|
formAnchor(),
|
|
@@ -1049,8 +1051,7 @@ const schema = [
|
|
|
1049
1051
|
nextOnInput: true,
|
|
1050
1052
|
headline: "Already Working with An Attorney?"
|
|
1051
1053
|
}),
|
|
1052
|
-
|
|
1053
|
-
nextOnEnter: false,
|
|
1054
|
+
commentsWithBankruptcy({
|
|
1054
1055
|
label: null,
|
|
1055
1056
|
headline: 'Please briefly describe your situation:',
|
|
1056
1057
|
headlineClass: '!t-text-dark'
|
|
@@ -1058,13 +1059,12 @@ const schema = [
|
|
|
1058
1059
|
firstAndLastV2({
|
|
1059
1060
|
headlineClass: '!t-text-dark'
|
|
1060
1061
|
}),
|
|
1061
|
-
|
|
1062
|
+
contactInfo({
|
|
1062
1063
|
headline: 'Submit Your Free Application',
|
|
1063
1064
|
headlineClass: '!t-text-[#00428A]',
|
|
1064
1065
|
subheadline: 'Based on your input you may qualify for SSDI benefits. Please verify your contact information.',
|
|
1065
|
-
nextOnEnter: false
|
|
1066
1066
|
}),
|
|
1067
|
-
|
|
1067
|
+
formNavigation(),
|
|
1068
1068
|
formDetails()
|
|
1069
1069
|
]
|
|
1070
1070
|
}
|