bhl-forms 0.0.13 → 0.0.16
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.es.js +158 -102
- package/dist/bhl-forms.iife.js +10 -10
- package/dist/bhl-forms.umd.js +10 -10
- package/dist/forms/childAndFamily.es.js +134 -66
- package/dist/forms/childAndFamily.iife.js +1 -601
- package/dist/forms/childAndFamily.json +1 -1
- package/dist/forms/testForm.es.js +93 -55
- package/dist/forms/testForm.iife.js +1 -360
- package/dist/forms/testForm.json +1 -1
- package/dist/main.css +1 -1
- package/package.json +5 -3
|
@@ -1 +1 @@
|
|
|
1
|
-
[{"type":"meta","data":{"tcpaLanguage":"By checking this box, I a) agree to the Terms of Use, and b) consent to be contacted by lawyers, lawyer networks, and partners of this website using live, autodialed, pre-recorded, or artificial voice calls, as well as text messages. Your consent is not required as a condition of purchasing any goods or services. To submit this request without this consent, call 855-506-0847."}},{"$cmp":"FormKit","props":{"type":"form","id":"form","onSubmit":"$submit(\"https://httpbin.org/post\", $prepData, $getRedirect)","plugins":"$plugins","actions":false,"prepop":{"fromURL":true},"errorCodes":{"403":"An Error Occurred","409":{"abort":false},"429":"An Error Occurred"},"redirectMap":{"*":"https://justanswer.9pctbx.net/c/2880795/808601/9320?sharedid=${properties.vid}"},"formClass":"!max-w-xl"},"children":[{"$el":"h1","if":"$activeStep === $firstStep()","children":"Get Child & Family Help Today","attrs":{"class":"flex justify-center text-center text-3xl font-bold pt-5 px-3"}},{"$el":"h3","if":"$activeStep === $firstStep()","children":"Contact Us Now for Child Support, Custody and Family Issues","attrs":{"class":"flex justify-center text-center text-md font-medium text-blue-500 px-3"}},{"$formkit":"hidden","name":"vertical","value":"Legal"},{"$formkit":"hidden","name":"TCPA_Language","value":"$meta.tcpaLanguage"},{"$formkit":"hidden","name":"gclid","value":null},{"$formkit":"hidden","name":"campaignid","value":null},{"$formkit":"hidden","name":"s","value":null},{"$el":"div","attrs":{"class":"form-body"},"children":[{"$el":"section","if":"$stepIsEnabled(\"childAndFamilyTOLPAndZip\")","attrs":{"style":{"if":"$activeStep !== \"childAndFamilyTOLPAndZip\"","then":"display: none;"}},"children":[{"$formkit":"group","id":"childAndFamilyTOLPAndZip","name":"childAndFamilyTOLPAndZip","children":[{"$formkit":"radio","validation":"required","validationMessages":{"required":"Field is required"},"optionsClass":"pl-1","legendClass":"legend-left required","label":"Type of Help Needed:","name":"Type_Of_Legal_Problem","id":"Type_Of_Legal_Problem","options":["Adoption","Child Custody and Support","Not Sure or Other"],"fieldsetClass":"$reset side-by-side","innerClass":"flex items-center","wrapperClass":"mb-3"},{"$formkit":"text","validation":"required|matches:/^[0-9]{5}$/","validationMessages":{"required":"Zip Code is required","matches":"Invalid Zip Code"},"labelClass":"required","label":"Zip Code:","placeholder":"90210","name":"Zip","wrapperClass":"side-by-side items-center"}]}]},{"$el":"section","if":"$stepIsEnabled(\"TOLPQuestions\")","attrs":{"style":{"if":"$activeStep !== \"TOLPQuestions\"","then":"display: none;"}},"children":[{"$formkit":"group","id":"TOLPQuestions","name":"TOLPQuestions","children":[{"$el":"h3","children":"Please Complete the Following:","attrs":{"class":"flex justify-center text-center text-2xl font-bold text-blue-500 pb-5 pt-0 px-3"}},{"$cmp":"FormKit","props":{"type":"group","key":"AdoptionQuestions","id":"AdoptionQuestions","name":"AdoptionQuestions"},"if":"$get(Type_Of_Legal_Problem).value == \"Adoption\"","children":[{"$formkit":"radio","validation":"required","validationMessages":{"required":"Field is required"},"optionsClass":"pl-1 side-by-side items-center","legendClass":"legend-left required","name":"Have_Attorney","label":"Are You Currently Working with An Attorney?","options":["Yes","No"],"fieldsetClass":"$reset side-by-side items-center","innerClass":"flex items-center"},{"$formkit":"select","placeholder":"Please Select","validation":"required","validationMessages":{"required":"Field is required"},"inputClass":"bg-white","labelClass":"required","label":"Marital Status:","name":"Marital_Status","options":["Unmarried, Living Together","Unmarried, Do Not Live Together","Married, Living Together","Separated","Divorced","Other"],"wrapperClass":"side-by-side items-center","innerClass":"select-height-content"},{"$formkit":"radio","validation":"required","validationMessages":{"required":"Field is required"},"optionsClass":"pl-1 side-by-side items-center","legendClass":"legend-left required","name":"Have_Children","label":"Do You Have Children?","options":["Yes","No"],"fieldsetClass":"$reset side-by-side items-center","innerClass":"flex items-center"},{"$formkit":"select","placeholder":"Please Select","validation":"required","validationMessages":{"required":"Field is required"},"inputClass":"bg-white","labelClass":"required","label":"How Likely Are You to Pay if Your Issue Could be Resolved?","name":"Degree_Of_Interest","options":["Definitely","Probably","Maybe","Absolutely Can't Afford"],"wrapperClass":"side-by-side items-center","innerClass":"select-height-content"},{"$formkit":"select","placeholder":"Please Select","validation":"required","validationMessages":{"required":"Field is required"},"inputClass":"bg-white","labelClass":"required","label":"How Will You Pay for Legal Fees if You Hire a Lawyer?","name":"Lawyer_Payment_Method","help":"No payment necessary to speak with lawyers.","options":["Cash","Check","Credit Card","Friend","Family","Other"],"wrapperClass":"side-by-side items-center","innerClass":"select-height-content"}]},{"$cmp":"FormKit","props":{"type":"group","key":"ChildCustodyAndSupportQuestions","id":"ChildCustodyAndSupportQuestions","name":"ChildCustodyAndSupportQuestions"},"if":"$get(Type_Of_Legal_Problem).value == \"Child Custody and Support\"","children":[{"$formkit":"radio","validation":"required","validationMessages":{"required":"Field is required"},"optionsClass":"pl-1 side-by-side items-center","legendClass":"legend-left required","name":"Have_Attorney","label":"Are You Currently Working with An Attorney?","options":["Yes","No"],"fieldsetClass":"$reset side-by-side items-center","innerClass":"flex items-center"},{"$formkit":"select","placeholder":"Please Select","validation":"required","validationMessages":{"required":"Field is required"},"inputClass":"bg-white","labelClass":"required","label":"Your Relationship to Child(ren):","name":"Child_Relationship","options":["Father","Mother","Grandparent","Aunt/Uncle","Other"],"wrapperClass":"side-by-side items-center","innerClass":"select-height-content"},{"$formkit":"select","placeholder":"Please Select","validation":"required","validationMessages":{"required":"Field is required"},"inputClass":"bg-white","labelClass":"required","label":"With Whom Do the Children Currently Live?","name":"Child_Home","options":["Mother","Father","Grandparents","Other"],"wrapperClass":"side-by-side items-center","innerClass":"select-height-content"},{"$formkit":"select","placeholder":"Please Select","validation":"required","validationMessages":{"required":"Field is required"},"inputClass":"bg-white","labelClass":"required","label":"Who is the Primary Caregiver?","name":"Child_Primary_Caregiver","options":["Mother","Father","Other"],"wrapperClass":"side-by-side items-center","innerClass":"select-height-content"},{"$formkit":"select","placeholder":"Please Select","validation":"required","validationMessages":{"required":"Field is required"},"inputClass":"bg-white","labelClass":"required","label":"How Likely Are You to Pay if Your Issue Could be Resolved?","name":"Degree_Of_Interest","options":["Definitely","Probably","Maybe","Absolutely Can't Afford"],"wrapperClass":"side-by-side items-center","innerClass":"select-height-content"},{"$formkit":"select","placeholder":"Please Select","validation":"required","validationMessages":{"required":"Field is required"},"inputClass":"bg-white","labelClass":"required","label":"How Will You Pay for Legal Fees if You Hire a Lawyer?","name":"Lawyer_Payment_Method","help":"No payment necessary to speak with lawyers.","options":["Cash","Check","Credit Card","Friend","Family","Other"],"wrapperClass":"side-by-side items-center","innerClass":"select-height-content"}]},{"$cmp":"FormKit","props":{"type":"group","key":"NotSureOrOtherQuestions","id":"NotSureOrOtherQuestions","name":"NotSureOrOtherQuestions"},"if":"$get(Type_Of_Legal_Problem).value == \"Not Sure or Other\"","children":[{"$formkit":"radio","validation":"required","validationMessages":{"required":"Field is required"},"optionsClass":"pl-1 side-by-side items-center","legendClass":"legend-left required","name":"Have_Attorney","label":"Are You Currently Working with An Attorney?","options":["Yes","No"],"fieldsetClass":"$reset side-by-side items-center","innerClass":"flex items-center"},{"$formkit":"select","placeholder":"Please Select","validation":"required","validationMessages":{"required":"Field is required"},"inputClass":"bg-white","labelClass":"required","label":"How Will You Pay for Legal Fees if You Hire a Lawyer?","name":"Lawyer_Payment_Method","help":"No payment necessary to speak with lawyers.","options":["Cash","Check","Credit Card","Friend","Family","Other"],"wrapperClass":"side-by-side items-center","innerClass":"select-height-content"}]}]}]},{"$el":"section","if":"$stepIsEnabled(\"comments\")","attrs":{"style":{"if":"$activeStep !== \"comments\"","then":"display: none;"}},"children":[{"$formkit":"group","id":"comments","name":"comments","children":[{"$formkit":"textarea","label":"Please provide a brief description of your situation:","name":"Comments","placeholder":"For Example: \"I would like help with child support payments\" or \"I need help with visitation rights\"","rows":1,"validation":"required","maxlength":1000,"labelClass":"required","validationMessages":{"required":"Description is required"}}]}]},{"$el":"section","if":"$stepIsEnabled(\"firstAndLast\")","attrs":{"style":{"if":"$activeStep !== \"firstAndLast\"","then":"display: none;"}},"children":[{"$formkit":"group","id":"firstAndLast","name":"firstAndLast","children":[{"$formkit":"text","validation":"required","validationMessages":{"required":"First Name is required"},"labelClass":"required","label":"First Name:","name":"First_Name","wrapperClass":"side-by-side items-center"},{"$formkit":"text","validation":"required","validationMessages":{"required":"Last Name is required"},"labelClass":"required","label":"Last Name:","name":"Last_Name","wrapperClass":"side-by-side items-center"}]}]},{"$el":"section","if":"$stepIsEnabled(\"contactInfo\")","attrs":{"style":{"if":"$activeStep !== \"contactInfo\"","then":"display: none;"}},"children":[{"$formkit":"group","id":"contactInfo","name":"contactInfo","children":[{"$el":"h3","children":"Based on your input, you may benefit from speaking with a family lawyer. Please verify your contact information:","attrs":{"class":"flex justify-center text-center text-lg font-bold pb-5 pt-0 px-3"}},{"$formkit":"email","validation":"required|email","validationMessages":{"required":"Email is required","email":"Invalid Email"},"labelClass":"required","name":"Email","label":"Email Address:","placeholder":"email@domain.com","wrapperClass":"side-by-side items-center"},{"$formkit":"tel","validation":"required|matches:/^[0-9]{3}-?[0-9]{3}-?[0-9]{4}$/","validationMessages":{"required":"Phone Number is required","matches":"Invalid Phone Number"},"labelClass":"required","name":"Primary_Phone","label":"Phone Number:","placeholder":"xxx-xxx-xxxx","wrapperClass":"side-by-side items-center"},{"$formkit":"checkbox","label":"$meta.tcpaLanguage","name":"TCPA_Opt_In","validation":"required|accepted","validationMessages":{"accepted":"Consent is required"},"classes":{"label":"text-xs text-slate-500 font-normal"}},{"$el":"div","if":"$activeStep === $lastStep()","attrs":{"class":"flex justify-center"},"children":[{"$el":"img","attrs":{"loading":"lazy","alt":"","style":{"border":0},"src":"https://d27hmee62k45vz.cloudfront.net/form-secure-privacy.png","width":"320","height":"100"}}]}]}]},{"$el":"div","attrs":{"class":"step-nav"},"children":[{"$formkit":"button","onClick":"$setPreviousStep()","children":"Back","style":{"if":"$activeStep === $firstStep()","then":"visibility: hidden;"}},{"$formkit":"button","onClick":"$setNextStep()","children":"Next","style":{"if":"$activeStep === $lastStep()","then":"display: none;"}},{"$formkit":"submit","label":"Submit","if":"$activeStep === $lastStep()","style":{"if":"$activeStep !== $lastStep()","then":"display: none;"}}]},{"$el":"pre","if":"$urlParam(\"fdbg\", \"\") == 1","children":[{"$el":"pre","children":"$stringify( $get(form).value )","attrs":{"class":"text-xs","style":"overflow: scroll"}},{"$el":"pre","children":["activeStep: ","$activeStep"],"attrs":{"class":"text-xs","style":"overflow: scroll"}},{"$el":"pre","children":["stepHistory: ","$stepHistory"],"attrs":{"class":"text-xs","style":"overflow: scroll"}},{"$el":"pre","children":["stepQueue: ","$stepQueue"],"attrs":{"class":"text-xs","style":"overflow: scroll"}}]}]}]}]
|
|
1
|
+
[{"type":"meta","data":{"tcpaLanguage":"By checking this box, I a) agree to the Terms of Use, and b) consent to be contacted by lawyers, lawyer networks, and partners of this website using live, autodialed, pre-recorded, or artificial voice calls, as well as text messages. Your consent is not required as a condition of purchasing any goods or services. To submit this request without this consent, call 855-506-0847."}},{"$cmp":"FormKit","props":{"type":"form","id":"form","onSubmit":"$submit(\"https://httpbin.org/post\", $prepData, $getRedirect)","plugins":"$plugins","actions":false,"prepop":{"fromURL":true},"errorCodes":{"403":"An Error Occurred","409":{"abort":false},"429":"An Error Occurred"},"formClass":"!t-max-w-xl","formId":"childAndFamily","redirectMap":{"Adoption":"https://justanswer.9pctbx.net/c/2880795/565949/9320?sharedid=${properties.vid}","Child Custody and Support":"https://justanswer.9pctbx.net/c/2880795/565949/9320?sharedid=${properties.vid}","Divorce and Separation":"https://justanswer.9pctbx.net/c/2880795/966410/9320?sharedid=${properties.vid}","Guardianship":"https://justanswer.9pctbx.net/c/2880795/565949/9320?sharedid=${properties.vid}","*":"https://justanswer.9pctbx.net/c/2880795/808601/9320?sharedid=${properties.vid}"}},"children":[{"$el":"h1","if":"$activeStep === $firstStep()","children":"Get Child & Family Help Today","attrs":{"class":"t-flex t-justify-center t-text-center t-text-3xl t-font-bold t-pt-5 t-px-3"}},{"$el":"h3","if":"$activeStep === $firstStep()","children":"Contact Us Now for Child Support, Custody and Family Issues","attrs":{"class":"t-flex t-justify-center t-text-center t-text-md t-font-medium t-text-blue-500 t-px-3"}},{"$formkit":"hidden","name":"vertical","value":"Legal"},{"$formkit":"hidden","name":"TCPA_Language","value":"$meta.tcpaLanguage"},{"$formkit":"hidden","name":"gclid","value":null},{"$formkit":"hidden","name":"campaignid","value":null},{"$formkit":"hidden","name":"s","value":null},{"$el":"div","attrs":{"class":"form-body"},"children":[{"$el":"section","if":"$stepIsEnabled(\"childAndFamilyTOLPAndZip\")","attrs":{"style":{"if":"$activeStep !== \"childAndFamilyTOLPAndZip\"","then":"display: none;"}},"children":[{"$formkit":"group","id":"childAndFamilyTOLPAndZip","name":"childAndFamilyTOLPAndZip","children":[{"$formkit":"radio","validation":"required","validationMessages":{"required":"Field is required"},"optionsClass":"t-grid t-grid-cols-1 md:t-grid-cols-2","legendClass":"legend-left required","label":"Type of Help Needed:","name":"Type_Of_Legal_Problem","id":"Type_Of_Legal_Problem","options":["Adoption","Child Custody and Support","Family Issues","Guardianship","Divorce and Separation","Not Sure or Other"],"fieldsetClass":"$reset side-by-side","innerClass":"t-flex t-items-start","wrapperClass":"$reset t-flex t-cursor-pointer t-mb-3"},{"$formkit":"text","validation":"required|matches:/^[0-9]{5}$/","validationMessages":{"required":"Zip Code is required","matches":"Invalid Zip Code"},"labelClass":"required","label":"Zip Code:","placeholder":"90210","name":"Zip","maxlength":5,"wrapperClass":"side-by-side t-items-center"}]}]},{"$el":"section","if":"$stepIsEnabled(\"TOLPQuestions\")","attrs":{"style":{"if":"$activeStep !== \"TOLPQuestions\"","then":"display: none;"}},"children":[{"$formkit":"group","id":"TOLPQuestions","name":"TOLPQuestions","children":[{"$el":"h3","children":"Please Complete the Following:","attrs":{"class":"t-flex t-justify-center t-text-center t-text-2xl t-font-bold t-text-blue-500 t-pb-5 t-pt-0 t-px-3"}},{"$cmp":"FormKit","props":{"type":"group","key":"AdoptionQuestions","id":"AdoptionQuestions","name":"AdoptionQuestions"},"if":"$get(Type_Of_Legal_Problem).value == \"Adoption\"","children":[{"$formkit":"radio","validation":"required","validationMessages":{"required":"Field is required"},"optionsClass":"t-pl-1 side-by-side t-items-center","legendClass":"legend-left required","name":"Have_Attorney","label":"Are You Currently Working with An Attorney?","options":["Yes","No"],"fieldsetClass":"$reset side-by-side t-items-center","innerClass":"t-flex t-items-center"},{"$formkit":"select","placeholder":"Please Select","validation":"required","validationMessages":{"required":"Field is required"},"inputClass":"t-bg-white","labelClass":"required","label":"Marital Status:","name":"Marital_Status","options":["Unmarried, Living Together","Unmarried, Do Not Live Together","Married, Living Together","Separated","Divorced","Other"],"wrapperClass":"side-by-side t-items-center","innerClass":"select-height-content"},{"$formkit":"radio","validation":"required","validationMessages":{"required":"Field is required"},"optionsClass":"t-pl-1 side-by-side t-items-center","legendClass":"legend-left required","name":"Have_Children","label":"Do You Have Children?","options":["Yes","No"],"fieldsetClass":"$reset side-by-side t-items-center","innerClass":"t-flex t-items-center"},{"$formkit":"select","placeholder":"Please Select","validation":"required","validationMessages":{"required":"Field is required"},"inputClass":"t-bg-white","labelClass":"required","label":"How Likely Are You to Pay if Your Issue Could be Resolved?","name":"Degree_Of_Interest","options":["Definitely","Probably","Maybe","Absolutely Can't Afford"],"wrapperClass":"side-by-side t-items-center","innerClass":"select-height-content"},{"$formkit":"select","placeholder":"Please Select","validation":"required","validationMessages":{"required":"Field is required"},"inputClass":"t-bg-white","labelClass":"required","label":"How Will You Pay for Legal Fees if You Hire a Lawyer?","name":"Lawyer_Payment_Method","help":"No payment necessary to speak with lawyers.","options":["Cash","Check","Credit Card","Friend","Family","Other"],"wrapperClass":"side-by-side t-items-center","innerClass":"select-height-content"}]},{"$cmp":"FormKit","props":{"type":"group","key":"ChildCustodyAndSupportQuestions","id":"ChildCustodyAndSupportQuestions","name":"ChildCustodyAndSupportQuestions"},"if":"$get(Type_Of_Legal_Problem).value == \"Child Custody and Support\"","children":[{"$formkit":"radio","validation":"required","validationMessages":{"required":"Field is required"},"optionsClass":"t-pl-1 side-by-side t-items-center","legendClass":"legend-left required","name":"Have_Attorney","label":"Are You Currently Working with An Attorney?","options":["Yes","No"],"fieldsetClass":"$reset side-by-side t-items-center","innerClass":"t-flex t-items-center"},{"$formkit":"select","placeholder":"Please Select","validation":"required","validationMessages":{"required":"Field is required"},"inputClass":"t-bg-white","labelClass":"required","label":"Your Relationship to Child(ren):","name":"Child_Relationship","options":["Father","Mother","Grandparent","Aunt/Uncle","Other"],"wrapperClass":"side-by-side t-items-center","innerClass":"select-height-content"},{"$formkit":"select","placeholder":"Please Select","validation":"required","validationMessages":{"required":"Field is required"},"inputClass":"t-bg-white","labelClass":"required","label":"With Whom Do the Children Currently Live?","name":"Child_Home","options":["Mother","Father","Grandparents","Other"],"wrapperClass":"side-by-side t-items-center","innerClass":"select-height-content"},{"$formkit":"select","placeholder":"Please Select","validation":"required","validationMessages":{"required":"Field is required"},"inputClass":"t-bg-white","labelClass":"required","label":"Who is the Primary Caregiver?","name":"Child_Primary_Caregiver","options":["Mother","Father","Other"],"wrapperClass":"side-by-side t-items-center","innerClass":"select-height-content"},{"$formkit":"select","placeholder":"Please Select","validation":"required","validationMessages":{"required":"Field is required"},"inputClass":"t-bg-white","labelClass":"required","label":"How Likely Are You to Pay if Your Issue Could be Resolved?","name":"Degree_Of_Interest","options":["Definitely","Probably","Maybe","Absolutely Can't Afford"],"wrapperClass":"side-by-side t-items-center","innerClass":"select-height-content"},{"$formkit":"select","placeholder":"Please Select","validation":"required","validationMessages":{"required":"Field is required"},"inputClass":"t-bg-white","labelClass":"required","label":"How Will You Pay for Legal Fees if You Hire a Lawyer?","name":"Lawyer_Payment_Method","help":"No payment necessary to speak with lawyers.","options":["Cash","Check","Credit Card","Friend","Family","Other"],"wrapperClass":"side-by-side t-items-center","innerClass":"select-height-content"}]},{"$cmp":"FormKit","props":{"type":"group","key":"FamilyIssuesQuestions","id":"FamilyIssuesQuestions","name":"FamilyIssuesQuestions"},"if":"$get(Type_Of_Legal_Problem).value == \"Family Issues\"","children":[{"$formkit":"radio","validation":"required","validationMessages":{"required":"Field is required"},"optionsClass":"t-pl-1 side-by-side t-items-center","legendClass":"legend-left required","name":"Have_Attorney","label":"Are You Currently Working with An Attorney?","options":["Yes","No"],"fieldsetClass":"$reset side-by-side t-items-center","innerClass":"t-flex t-items-center"},{"$formkit":"select","placeholder":"Please Select","validation":"required","validationMessages":{"required":"Field is required"},"inputClass":"t-bg-white","labelClass":"required","label":"Marital Status:","name":"Marital_Status","options":["Unmarried, Living Together","Unmarried, Do Not Live Together","Married, Living Together","Separated","Divorced","Other"],"wrapperClass":"side-by-side t-items-center","innerClass":"select-height-content"},{"$formkit":"radio","validation":"required","validationMessages":{"required":"Field is required"},"optionsClass":"t-pl-1 side-by-side t-items-center","legendClass":"legend-left required","name":"Have_Children","label":"Do You Have Children?","options":["Yes","No"],"fieldsetClass":"$reset side-by-side t-items-center","innerClass":"t-flex t-items-center"},{"$formkit":"select","placeholder":"Please Select","validation":"required","validationMessages":{"required":"Field is required"},"inputClass":"t-bg-white","labelClass":"required","label":"How Likely Are You to Pay if Your Issue Could be Resolved?","name":"Degree_Of_Interest","options":["Definitely","Probably","Maybe","Absolutely Can't Afford"],"wrapperClass":"side-by-side t-items-center","innerClass":"select-height-content"},{"$formkit":"select","placeholder":"Please Select","validation":"required","validationMessages":{"required":"Field is required"},"inputClass":"t-bg-white","labelClass":"required","label":"How Will You Pay for Legal Fees if You Hire a Lawyer?","name":"Lawyer_Payment_Method","help":"No payment necessary to speak with lawyers.","options":["Cash","Check","Credit Card","Friend","Family","Other"],"wrapperClass":"side-by-side t-items-center","innerClass":"select-height-content"}]},{"$cmp":"FormKit","props":{"type":"group","key":"GuardianshipQuestions","id":"GuardianshipQuestions","name":"GuardianshipQuestions"},"if":"$get(Type_Of_Legal_Problem).value == \"Guardianship\"","children":[{"$formkit":"radio","validation":"required","validationMessages":{"required":"Field is required"},"optionsClass":"t-pl-1 side-by-side t-items-center","legendClass":"legend-left required","name":"Have_Attorney","label":"Are You Currently Working with An Attorney?","options":["Yes","No"],"fieldsetClass":"$reset side-by-side t-items-center","innerClass":"t-flex t-items-center"},{"$formkit":"select","placeholder":"Please Select","validation":"required","validationMessages":{"required":"Field is required"},"inputClass":"t-bg-white","labelClass":"required","label":"Marital Status:","name":"Marital_Status","options":["Unmarried, Living Together","Unmarried, Do Not Live Together","Married, Living Together","Separated","Divorced","Other"],"wrapperClass":"side-by-side t-items-center","innerClass":"select-height-content"},{"$formkit":"radio","validation":"required","validationMessages":{"required":"Field is required"},"optionsClass":"t-pl-1 side-by-side t-items-center","legendClass":"legend-left required","name":"Have_Children","label":"Do You Have Children?","options":["Yes","No"],"fieldsetClass":"$reset side-by-side t-items-center","innerClass":"t-flex t-items-center"},{"$formkit":"select","placeholder":"Please Select","validation":"required","validationMessages":{"required":"Field is required"},"inputClass":"t-bg-white","labelClass":"required","label":"How Likely Are You to Pay if Your Issue Could be Resolved?","name":"Degree_Of_Interest","options":["Definitely","Probably","Maybe","Absolutely Can't Afford"],"wrapperClass":"side-by-side t-items-center","innerClass":"select-height-content"},{"$formkit":"select","placeholder":"Please Select","validation":"required","validationMessages":{"required":"Field is required"},"inputClass":"t-bg-white","labelClass":"required","label":"How Will You Pay for Legal Fees if You Hire a Lawyer?","name":"Lawyer_Payment_Method","help":"No payment necessary to speak with lawyers.","options":["Cash","Check","Credit Card","Friend","Family","Other"],"wrapperClass":"side-by-side t-items-center","innerClass":"select-height-content"}]},{"$cmp":"FormKit","props":{"type":"group","key":"DivorceQuestions","id":"DivorceQuestions","name":"DivorceQuestions"},"if":"$get(Type_Of_Legal_Problem).value == \"Divorce and Separation\"","children":[{"$formkit":"radio","validation":"required","validationMessages":{"required":"Field is required"},"optionsClass":"t-pl-1 side-by-side t-items-center","legendClass":"legend-left required","name":"Have_Attorney","label":"Are You Currently Working with An Attorney?","options":["Yes","No"],"fieldsetClass":"$reset side-by-side t-items-center","innerClass":"t-flex t-items-center"},{"$formkit":"select","placeholder":"Please Select","validation":"required","validationMessages":{"required":"Field is required"},"inputClass":"t-bg-white","labelClass":"required","label":"Marital Status:","name":"Marital_Status","options":["Unmarried, Living Together","Unmarried, Do Not Live Together","Married, Living Together","Separated","Divorced","Other"],"wrapperClass":"side-by-side t-items-center","innerClass":"select-height-content"},{"$formkit":"radio","validation":"required","validationMessages":{"required":"Field is required"},"optionsClass":"t-pl-1 side-by-side t-items-center","legendClass":"legend-left required","name":"Have_Children","label":"Do You Have Children?","options":["Yes","No"],"fieldsetClass":"$reset side-by-side t-items-center","innerClass":"t-flex t-items-center"},{"$formkit":"select","placeholder":"Please Select","validation":"required","validationMessages":{"required":"Field is required"},"inputClass":"t-bg-white","labelClass":"required","label":"How Likely Are You to Pay if Your Issue Could be Resolved?","name":"Degree_Of_Interest","options":["Definitely","Probably","Maybe","Absolutely Can't Afford"],"wrapperClass":"side-by-side t-items-center","innerClass":"select-height-content"},{"$formkit":"select","placeholder":"Please Select","validation":"required","validationMessages":{"required":"Field is required"},"inputClass":"t-bg-white","labelClass":"required","label":"How Will You Pay for Legal Fees if You Hire a Lawyer?","name":"Lawyer_Payment_Method","help":"No payment necessary to speak with lawyers.","options":["Cash","Check","Credit Card","Friend","Family","Other"],"wrapperClass":"side-by-side t-items-center","innerClass":"select-height-content"}]},{"$cmp":"FormKit","props":{"type":"group","key":"NotSureOrOtherQuestions","id":"NotSureOrOtherQuestions","name":"NotSureOrOtherQuestions"},"if":"$get(Type_Of_Legal_Problem).value == \"Not Sure or Other\"","children":[{"$formkit":"radio","validation":"required","validationMessages":{"required":"Field is required"},"optionsClass":"t-pl-1 side-by-side t-items-center","legendClass":"legend-left required","name":"Have_Attorney","label":"Are You Currently Working with An Attorney?","options":["Yes","No"],"fieldsetClass":"$reset side-by-side t-items-center","innerClass":"t-flex t-items-center"},{"$formkit":"select","placeholder":"Please Select","validation":"required","validationMessages":{"required":"Field is required"},"inputClass":"t-bg-white","labelClass":"required","label":"How Will You Pay for Legal Fees if You Hire a Lawyer?","name":"Lawyer_Payment_Method","help":"No payment necessary to speak with lawyers.","options":["Cash","Check","Credit Card","Friend","Family","Other"],"wrapperClass":"side-by-side t-items-center","innerClass":"select-height-content"}]}]}]},{"$el":"section","if":"$stepIsEnabled(\"comments\")","attrs":{"style":{"if":"$activeStep !== \"comments\"","then":"display: none;"}},"children":[{"$formkit":"group","id":"comments","name":"comments","children":[{"$formkit":"textarea","label":"Please provide a brief description of your situation:","name":"Comments","placeholder":"For Example: \"I would like help with child support payments\" or \"I need help with visitation rights\"","rows":1,"validation":"required","maxlength":1000,"labelClass":"required","validationMessages":{"required":"Description is required"}}]}]},{"$el":"section","if":"$stepIsEnabled(\"firstAndLast\")","attrs":{"style":{"if":"$activeStep !== \"firstAndLast\"","then":"display: none;"}},"children":[{"$formkit":"group","id":"firstAndLast","name":"firstAndLast","children":[{"$formkit":"text","validation":"required","validationMessages":{"required":"First Name is required"},"labelClass":"required","label":"First Name:","name":"First_Name","wrapperClass":"side-by-side t-items-center"},{"$formkit":"text","validation":"required","validationMessages":{"required":"Last Name is required"},"labelClass":"required","label":"Last Name:","name":"Last_Name","wrapperClass":"side-by-side t-items-center"}]}]},{"$el":"section","if":"$stepIsEnabled(\"contactInfo\")","attrs":{"style":{"if":"$activeStep !== \"contactInfo\"","then":"display: none;"}},"children":[{"$formkit":"group","id":"contactInfo","name":"contactInfo","children":[{"$el":"h3","children":"Based on your input, you may benefit from speaking with a family lawyer. Please verify your contact information:","attrs":{"class":"t-flex t-justify-center t-text-center t-text-lg t-font-bold t-pb-5 t-pt-0 t-px-3"}},{"$formkit":"email","validation":"required|email","validationMessages":{"required":"Email is required","email":"Invalid Email"},"labelClass":"required","name":"Email","label":"Email Address:","placeholder":"email@domain.com","wrapperClass":"side-by-side t-items-center"},{"$formkit":"tel","validation":"required|matches:/^[0-9]{3}-?[0-9]{3}-?[0-9]{4}$/","validationMessages":{"required":"Phone Number is required","matches":"Invalid Phone Number"},"labelClass":"required","name":"Primary_Phone","label":"Phone Number:","placeholder":"xxx-xxx-xxxx","maxlength":12,"wrapperClass":"side-by-side t-items-center"},{"$formkit":"checkbox","label":"$meta.tcpaLanguage","name":"TCPA_Opt_In","validation":"required|accepted","validationMessages":{"required":"Consent is required","accepted":"Consent is required"},"classes":{"label":"t-text-xs t-text-slate-500 t-font-normal"}},{"$el":"div","if":"$activeStep === $lastStep()","attrs":{"class":"t-flex t-justify-center"},"children":[{"$el":"img","attrs":{"loading":"lazy","alt":"","style":{"border":0},"src":"https://d27hmee62k45vz.cloudfront.net/form-secure-privacy.png","width":"320","height":"100"}}]}]}]},{"$el":"div","attrs":{"class":"step-nav"},"children":[{"$formkit":"button","onClick":"$setPreviousStep()","children":"Back","style":{"if":"$activeStep === $firstStep()","then":"visibility: hidden;"}},{"$formkit":"button","onClick":"$setNextStep($fireStepEvent($get(form)))","children":"Next","style":{"if":"$activeStep === $lastStep()","then":"display: none;"}},{"$formkit":"submit","label":"Submit","if":"$activeStep === $lastStep()","style":{"if":"$activeStep !== $lastStep()","then":"display: none;"}}]},{"$el":"pre","if":"$urlParam(\"fdbg\", \"\") == 1","children":[{"$el":"pre","children":"$stringify( $get(form).value )","attrs":{"class":"t-text-xs","style":"overflow: scroll"}},{"$el":"pre","children":["activeStep: ","$activeStep"],"attrs":{"class":"t-text-xs","style":"overflow: scroll"}},{"$el":"pre","children":["stepHistory: ","$stepHistory"],"attrs":{"class":"t-text-xs","style":"overflow: scroll"}},{"$el":"pre","children":["stepQueue: ","$stepQueue"],"attrs":{"class":"t-text-xs","style":"overflow: scroll"}}]}]}]}]
|
|
@@ -2,6 +2,78 @@ function merge() {
|
|
|
2
2
|
return Object.assign({}, ...arguments)
|
|
3
3
|
}
|
|
4
4
|
|
|
5
|
+
const formPropDefaults = {
|
|
6
|
+
type: 'form',
|
|
7
|
+
id: 'form',
|
|
8
|
+
onSubmit: '$submit("https://httpbin.org/post", $prepData, $getRedirect)',
|
|
9
|
+
plugins: '$plugins',
|
|
10
|
+
actions: false,
|
|
11
|
+
prepop: {
|
|
12
|
+
fromURL: true
|
|
13
|
+
},
|
|
14
|
+
errorCodes: {
|
|
15
|
+
403: "An Error Occurred",
|
|
16
|
+
409: { abort: false },
|
|
17
|
+
429: "An Error Occurred"
|
|
18
|
+
},
|
|
19
|
+
formClass: '!t-max-w-xl'
|
|
20
|
+
};
|
|
21
|
+
|
|
22
|
+
function formProps(updates) {
|
|
23
|
+
return merge(
|
|
24
|
+
formPropDefaults,
|
|
25
|
+
updates
|
|
26
|
+
)
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
const hiddenInputs = [
|
|
30
|
+
{
|
|
31
|
+
$formkit: 'hidden',
|
|
32
|
+
name: "vertical",
|
|
33
|
+
value: "Legal"
|
|
34
|
+
},
|
|
35
|
+
{
|
|
36
|
+
$formkit: 'hidden',
|
|
37
|
+
name: "TCPA_Language",
|
|
38
|
+
value: "$meta.tcpaLanguage"
|
|
39
|
+
},
|
|
40
|
+
{
|
|
41
|
+
$formkit: 'hidden',
|
|
42
|
+
name: "gclid",
|
|
43
|
+
value: null,
|
|
44
|
+
},
|
|
45
|
+
{
|
|
46
|
+
$formkit: 'hidden',
|
|
47
|
+
name: "campaignid",
|
|
48
|
+
value: null,
|
|
49
|
+
},
|
|
50
|
+
{
|
|
51
|
+
$formkit: 'hidden',
|
|
52
|
+
name: "s",
|
|
53
|
+
value: null,
|
|
54
|
+
}
|
|
55
|
+
];
|
|
56
|
+
|
|
57
|
+
const select = (updates) => {
|
|
58
|
+
return merge({
|
|
59
|
+
$formkit: 'select',
|
|
60
|
+
placeholder: "Please Select",
|
|
61
|
+
validation: 'required',
|
|
62
|
+
validationMessages: {
|
|
63
|
+
required: 'Field is required',
|
|
64
|
+
},
|
|
65
|
+
inputClass: 't-bg-white',
|
|
66
|
+
labelClass: 'required'
|
|
67
|
+
}, updates)
|
|
68
|
+
};
|
|
69
|
+
|
|
70
|
+
const sbsSelect = (updates) => {
|
|
71
|
+
updates.labelClass = 'required';
|
|
72
|
+
updates.wrapperClass = 'side-by-side t-items-center';
|
|
73
|
+
updates.innerClass = 'select-height-content';
|
|
74
|
+
return select(updates)
|
|
75
|
+
};
|
|
76
|
+
|
|
5
77
|
const text = (updates) => {
|
|
6
78
|
return merge({
|
|
7
79
|
$formkit: 'text',
|
|
@@ -15,15 +87,15 @@ const text = (updates) => {
|
|
|
15
87
|
|
|
16
88
|
const sbsText = (updates) => {
|
|
17
89
|
updates.labelClass = 'required';
|
|
18
|
-
updates.wrapperClass = 'side-by-side items-center';
|
|
90
|
+
updates.wrapperClass = 'side-by-side t-items-center';
|
|
19
91
|
return text(updates)
|
|
20
92
|
};
|
|
21
93
|
|
|
22
94
|
// ------ Inputs
|
|
23
95
|
|
|
24
|
-
const category = () => ({
|
|
96
|
+
const category = () => sbsSelect({
|
|
25
97
|
$formkit: 'select',
|
|
26
|
-
label: 'Category',
|
|
98
|
+
label: 'Category:',
|
|
27
99
|
name: 'category',
|
|
28
100
|
id: 'category',
|
|
29
101
|
validation: 'required',
|
|
@@ -70,6 +142,7 @@ const phone = () => sbsText({
|
|
|
70
142
|
name: 'Primary_Phone',
|
|
71
143
|
label: 'Phone Number:',
|
|
72
144
|
placeholder: 'xxx-xxx-xxxx',
|
|
145
|
+
maxlength: 12,
|
|
73
146
|
// help: '10-digit US phone number, hyphens optional.',
|
|
74
147
|
validation: 'required|matches:/^[0-9]{3}-?[0-9]{3}-?[0-9]{4}$/',
|
|
75
148
|
validationMessages: {
|
|
@@ -84,10 +157,11 @@ const TCPAConsent = () => ({
|
|
|
84
157
|
name: 'TCPA_Opt_In',
|
|
85
158
|
validation: 'required|accepted',
|
|
86
159
|
validationMessages: {
|
|
160
|
+
required: 'Consent is required',
|
|
87
161
|
accepted: 'Consent is required',
|
|
88
162
|
},
|
|
89
163
|
classes: {
|
|
90
|
-
label: "text-xs text-slate-500 font-normal"
|
|
164
|
+
label: "t-text-xs t-text-slate-500 t-font-normal"
|
|
91
165
|
}
|
|
92
166
|
});
|
|
93
167
|
|
|
@@ -95,6 +169,7 @@ const zipcode = () => sbsText({
|
|
|
95
169
|
label: 'Zip Code:',
|
|
96
170
|
placeholder: '90210',
|
|
97
171
|
name: 'Zip',
|
|
172
|
+
maxlength: 5,
|
|
98
173
|
validation: 'required|matches:/^[0-9]{5}$/',
|
|
99
174
|
validationMessages: {
|
|
100
175
|
required: 'Zip Code is required',
|
|
@@ -150,7 +225,7 @@ function contactInfo() {
|
|
|
150
225
|
$el: 'h3',
|
|
151
226
|
children: 'Based on your input, you may benefit from speaking with a family lawyer. Please verify your contact information:',
|
|
152
227
|
attrs: {
|
|
153
|
-
class: 'flex justify-center text-center text-lg font-bold pb-5 pt-0 px-3'
|
|
228
|
+
class: 't-flex t-justify-center t-text-center t-text-lg t-font-bold t-pb-5 t-pt-0 t-px-3'
|
|
154
229
|
}
|
|
155
230
|
},
|
|
156
231
|
email(),
|
|
@@ -160,7 +235,7 @@ function contactInfo() {
|
|
|
160
235
|
$el: 'div',
|
|
161
236
|
if: '$activeStep === $lastStep()',
|
|
162
237
|
attrs: {
|
|
163
|
-
class: 'flex justify-center'
|
|
238
|
+
class: 't-flex t-justify-center'
|
|
164
239
|
},
|
|
165
240
|
children: [
|
|
166
241
|
{
|
|
@@ -211,7 +286,7 @@ const formNavigation = () => ({
|
|
|
211
286
|
},
|
|
212
287
|
{
|
|
213
288
|
$formkit: 'button',
|
|
214
|
-
onClick: '$setNextStep()',
|
|
289
|
+
onClick: '$setNextStep($fireStepEvent($get(form)))',
|
|
215
290
|
children: 'Next',
|
|
216
291
|
style: {
|
|
217
292
|
if: '$activeStep === $lastStep()',
|
|
@@ -238,7 +313,7 @@ const formDetails = () => ({
|
|
|
238
313
|
$el: 'pre',
|
|
239
314
|
children: '$stringify( $get(form).value )',
|
|
240
315
|
attrs: {
|
|
241
|
-
class: 'text-xs',
|
|
316
|
+
class: 't-text-xs',
|
|
242
317
|
style: 'overflow: scroll'
|
|
243
318
|
}
|
|
244
319
|
},
|
|
@@ -246,7 +321,7 @@ const formDetails = () => ({
|
|
|
246
321
|
$el: 'pre',
|
|
247
322
|
children: ['activeStep: ', '$activeStep'],
|
|
248
323
|
attrs: {
|
|
249
|
-
class: 'text-xs',
|
|
324
|
+
class: 't-text-xs',
|
|
250
325
|
style: 'overflow: scroll'
|
|
251
326
|
}
|
|
252
327
|
},
|
|
@@ -254,7 +329,7 @@ const formDetails = () => ({
|
|
|
254
329
|
$el: 'pre',
|
|
255
330
|
children: ['stepHistory: ', '$stepHistory'],
|
|
256
331
|
attrs: {
|
|
257
|
-
class: 'text-xs',
|
|
332
|
+
class: 't-text-xs',
|
|
258
333
|
style: 'overflow: scroll'
|
|
259
334
|
}
|
|
260
335
|
},
|
|
@@ -262,7 +337,7 @@ const formDetails = () => ({
|
|
|
262
337
|
$el: 'pre',
|
|
263
338
|
children: ['stepQueue: ', '$stepQueue'],
|
|
264
339
|
attrs: {
|
|
265
|
-
class: 'text-xs',
|
|
340
|
+
class: 't-text-xs',
|
|
266
341
|
style: 'overflow: scroll'
|
|
267
342
|
}
|
|
268
343
|
}
|
|
@@ -278,63 +353,26 @@ const schema = [
|
|
|
278
353
|
},
|
|
279
354
|
{
|
|
280
355
|
$cmp: 'FormKit',
|
|
281
|
-
props: {
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
// onSubmit: '$submit("https://httpbin.org/post", "https://www.google.com?x=${vertical}")',
|
|
286
|
-
onSubmit: '$submit("http://localhost:8080/api/v1/form_leads_ext", $prepData)',
|
|
287
|
-
plugins: '$plugins',
|
|
288
|
-
actions: false,
|
|
289
|
-
prepop: {
|
|
290
|
-
fromURL: true
|
|
291
|
-
},
|
|
292
|
-
errorCodes: {
|
|
293
|
-
403: "An Error Occurred",
|
|
294
|
-
409: { abort: false },
|
|
295
|
-
429: "An Error Occurred"
|
|
296
|
-
}
|
|
297
|
-
},
|
|
356
|
+
props: formProps({
|
|
357
|
+
formId: 'testForm',
|
|
358
|
+
onSubmit: '$submit("http://localhost:8080/api/v1/form_leads_ext", $prepData)'
|
|
359
|
+
}),
|
|
298
360
|
children: [
|
|
299
361
|
{
|
|
300
362
|
$el: 'h1',
|
|
301
363
|
children: 'Need Help? Start Here!',
|
|
302
364
|
attrs: {
|
|
303
|
-
class: 'flex justify-center text-3xl font-bold'
|
|
365
|
+
class: 't-flex t-justify-center t-text-3xl t-font-bold'
|
|
304
366
|
}
|
|
305
367
|
},
|
|
306
368
|
{
|
|
307
369
|
$el: 'h3',
|
|
308
370
|
children: 'Get Your Questions Answered Today!',
|
|
309
371
|
attrs: {
|
|
310
|
-
class: 'flex justify-center text-l font-bold text-blue-500'
|
|
372
|
+
class: 't-flex t-justify-center t-text-l t-font-bold t-text-blue-500'
|
|
311
373
|
}
|
|
312
374
|
},
|
|
313
|
-
|
|
314
|
-
$formkit: 'hidden',
|
|
315
|
-
name: "vertical",
|
|
316
|
-
value: "Legal"
|
|
317
|
-
},
|
|
318
|
-
{
|
|
319
|
-
$formkit: 'hidden',
|
|
320
|
-
name: "TCPA_Language",
|
|
321
|
-
value: "$meta.tcpaLanguage"
|
|
322
|
-
},
|
|
323
|
-
{
|
|
324
|
-
$formkit: 'hidden',
|
|
325
|
-
name: "gclid",
|
|
326
|
-
value: null,
|
|
327
|
-
},
|
|
328
|
-
{
|
|
329
|
-
$formkit: 'hidden',
|
|
330
|
-
name: "campaignid",
|
|
331
|
-
value: null,
|
|
332
|
-
},
|
|
333
|
-
{
|
|
334
|
-
$formkit: 'hidden',
|
|
335
|
-
name: "s",
|
|
336
|
-
value: null,
|
|
337
|
-
},
|
|
375
|
+
...hiddenInputs,
|
|
338
376
|
{
|
|
339
377
|
$el: 'div',
|
|
340
378
|
attrs: {
|