Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Jim/radiogroups #72

Closed
wants to merge 13 commits into from
2 changes: 0 additions & 2 deletions packages/documents/src/document.ts
Original file line number Diff line number Diff line change
Expand Up @@ -148,8 +148,6 @@ export const addDocumentFieldsToForm = (
},
required: field.required,
} satisfies InputElement);
} else if (field.type === 'Paragraph') {
// skip purely presentational fields
} else if (field.type === 'not-supported') {
console.error(`Skipping field: ${field.error}`);
} else {
Expand Down
75 changes: 25 additions & 50 deletions packages/documents/src/pdf/al_name_change.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
"element_params": {
"text": "In the Probate Court of (county): ",
"text_style": "JTUTCJ+ArialMT 9.840000000000032",
"options": null
"options": []
},
"inputs": [
{
Expand All @@ -35,7 +35,7 @@
"element_params": {
"text": "Your current name",
"text_style": "JTUTCJ+ArialMT 9.840000000000032",
"options": null
"options": []
},
"inputs": [
{
Expand Down Expand Up @@ -84,7 +84,7 @@
"element_params": {
"text": "To ask the court to change your name, you must fill out this form, and: ",
"text_style": "subheading",
"options": null
"options": []
},
"inputs": [],
"parent": null
Expand All @@ -96,7 +96,7 @@
"element_params": {
"text": "Attach a certified copy of your birth certificate and a copy of your photo ID, and ",
"text_style": "indent",
"options": null
"options": []
},
"inputs": [],
"parent": null
Expand All @@ -108,7 +108,7 @@
"element_params": {
"text": " File your form and attachments in the same county where you live. ",
"text_style": "indent",
"options": null
"options": []
},
"inputs": [],
"parent": null
Expand All @@ -120,7 +120,7 @@
"element_params": {
"text": "I declare that the following information is true: ",
"text_style": "subheading",
"options": null
"options": []
},
"inputs": [],
"parent": null
Expand All @@ -132,7 +132,7 @@
"element_params": {
"text": "My current name",
"text_style": "JTUTCJ+ArialMT 8.879999999999995",
"options": null
"options": []
},
"inputs": [
{
Expand Down Expand Up @@ -181,7 +181,7 @@
"element_params": {
"text": "My address",
"text_style": "JTUTCJ+ArialMT 8.879999999999995",
"options": null
"options": []
},
"inputs": [
{
Expand Down Expand Up @@ -242,7 +242,7 @@
"element_params": {
"text": "My phone numbers",
"text_style": "DURMBL+Arial-BoldMT 8.879999999999995",
"options": null
"options": []
},
"inputs": [
{
Expand Down Expand Up @@ -279,7 +279,7 @@
"element_params": {
"text": "My date of birth is (mm/dd/yyyy): ",
"text_style": "JTUTCJ+ArialMT 8.879999999999995",
"options": null
"options": []
},
"inputs": [
{
Expand All @@ -304,7 +304,7 @@
"element_params": {
"text": "My name at birth",
"text_style": "JTUTCJ+ArialMT 8.879999999999995",
"options": null
"options": []
},
"inputs": [
{
Expand Down Expand Up @@ -353,7 +353,7 @@
"element_params": {
"text": "I am an adult (19 or older), of sound mind, and live in (name of Alabama county): ",
"text_style": "LEDWHU+TimesNewRomanPSMT 8.879999999999995",
"options": null
"options": []
},
"inputs": [
{
Expand All @@ -372,56 +372,31 @@
"parent": null
},
{
"id": "dcb5d901-a293-4f53-b663-a4d401af0812",
"id": "e42da30c-63c0-463d-af6a-f55f9a885ca9",
"group_id": 18,
"element_type": "text",
"element_type": "radio_group",
"element_params": {
"text": "The attached copy of my photo ID is my (choose one):",
"text": "The attached copy of my photo ID is my (check one): ",
"text_style": "heading",
"options": null
},
"inputs": [],
"parent": "PhotoID"
},
{
"id": "dcb5d901-a293-4f53-b663-a4d401ac0812",
"group_id": 18,
"element_type": "text",
"element_params": {
"text": "Driver\u2019s license, # ",
"text_style": "JTUTCJ+ArialMT 12.0",
"options": null
"options": []
},
"inputs": [
{
"input_type": "Tx",
"input_params": {
"text": "<input label=DL# instructions={field_dict['field_instructions']}>",
"text": "Driver\u2019s license, #",
"text_style": "Helv 10 Tf 0 g",
"output_id": "DL#",
"placeholder": "",
"instructions": "Type your driver's license number",
"required": false,
"options": []
}
}
],
"parent": "PhotoID"
},
{
"id": "1a8cbd28-f600-47f8-9ce0-85ae136ba338",
"group_id": 18,
"element_type": "text",
"element_params": {
"text": "Non-driver\u2019s photo, ID #: ",
"text_style": "JTUTCJ+ArialMT 8.879999999999995",
"options": null
},
"inputs": [
},
{
"input_type": "Tx",
"input_params": {
"text": "<input label=ID# instructions={field_dict['field_instructions']}>",
"text": "Non-driver\u2019s photo, ID #:",
"text_style": "Helv 10 Tf 0 g",
"output_id": "ID#",
"placeholder": "",
Expand All @@ -440,7 +415,7 @@
"element_params": {
"text": "I ask the court to change my name because (explain why you want to change your name): ",
"text_style": "LEDWHU+TimesNewRomanPSMT 8.879999999999995",
"options": null
"options": []
},
"inputs": [
{
Expand All @@ -465,7 +440,7 @@
"element_params": {
"text": "My new name",
"text_style": "JTUTCJ+ArialMT 8.879999999999995",
"options": null
"options": []
},
"inputs": [
{
Expand Down Expand Up @@ -514,7 +489,7 @@
"element_params": {
"text": "I also declare: ",
"text_style": "subheading",
"options": null
"options": []
},
"inputs": [],
"parent": null
Expand All @@ -526,7 +501,7 @@
"element_params": {
"text": " I am not now facing criminal charges, nor am I involved in any other court case. ",
"text_style": "indent",
"options": null
"options": []
},
"inputs": [],
"parent": null
Expand All @@ -538,7 +513,7 @@
"element_params": {
"text": " I have never been convicted of a criminal sex offense (as defined in Alabama Code \u00a7 15-20-21), a crime of moral turpitude, or a felony. ",
"text_style": "indent",
"options": null
"options": []
},
"inputs": [],
"parent": null
Expand All @@ -550,7 +525,7 @@
"element_params": {
"text": " I am not asking to change my name to avoid paying my debts or to commit fraud. ",
"text_style": "indent",
"options": null
"options": []
},
"inputs": [],
"parent": null
Expand Down
2 changes: 1 addition & 1 deletion packages/documents/src/pdf/mock-api.ts
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ const ExtractedElement = z.object({
element_params: z.object({
text: z.string(),
text_style: z.string(),
options: z.null(),
options: z.nullable(z.array(z.string())),
}),
inputs: ExtractedInput.array(),
parent: z.string().nullable(),
Expand Down
Loading