Skip to content

Add the birth certificate amendment form for MA - #656

Merged
kydecker merged 8 commits into
namesakefyi:mainfrom
deammer:add-ma-r116-form
Jun 30, 2026
Merged

Add the birth certificate amendment form for MA#656
kydecker merged 8 commits into
namesakefyi:mainfrom
deammer:add-ma-r116-form

Conversation

@deammer

@deammer deammer commented Jun 23, 2026

Copy link
Copy Markdown
Contributor

Changes:

  • uploaded and implemented the R-116 form
  • added support for filling out PDFRadioGroups in the PDF exports
  • added e2e and schema tests

Notes:

I ran into a few weird things, please let me know how you'd like to proceed:

Situation Screenshot
the form has a weird field called "Contact information" that doesn't really make sense so I ignored it Contact information field in the margin
can we make middle names optional? I didn't see a canonical way to do that but maybe I missed it. An empty middle name marked as missing
in the exported PDF, the 2 checkboxes are misalinged (I'm using Waterfox 6.6.15). It's misaligned in a way that makes it look like the wrong box is checked... Misaligned checkbox

Implements #647. No genAI was used in the process 💅

@deammer
deammer marked this pull request as ready for review June 23, 2026 21:08
@deammer

deammer commented Jun 23, 2026

Copy link
Copy Markdown
Contributor Author

@kydecker this is ready for review! I also added 3 questions/notes to the PR description. Would love to hear your thoughts 🙏

By the way the PDF uploading tool is reaaaally fucking cool, great work to everyone who contributed to that. The only issue I ran into is that it flagged a radio group as a textfield but that was easy to fix in the schema.

@kydecker

Copy link
Copy Markdown
Member

@deammer Thank you for the contribution!! I'm busy tonight but I will take some time to review this and answer your questions tomorrow.

@kydecker kydecker left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you so much for kicking this off!

I suggested a handful of copy edits below.

In response to your questions:

the form has a weird field called "Contact information" that doesn't really make sense so I ignored it

Yup, totally fine to just exclude this. There are weird elements in some of these PDF forms.

can we make middle names optional? I didn't see a canonical way to do that but maybe I missed it.

The "missing!" highlights are a little rough around the edges right now for things like this (where a field is displayed but intentionally left blank). Don't worry about it for now.

in the exported PDF, the 2 checkboxes are misalinged (I'm using Waterfox 6.6.15). It's misaligned in a way that makes it look like the wrong box is checked...

Oh, bummer, We need to manually move those fields into the correct position. It's possible to do this with pdf-lib, and probably a feature we could build into the PDF Manager... in the meantime, you could try uploading the PDF to the BentoPDF Form Creator, repositioning the fields, and saving the updated PDF.

Finally, I filed an issue to fix the RadioGroup detection in the PDF Manager: #659

It should be a pretty easy fix if you want to bundle it with this PR, otherwise we can tackle it separately!

Thanks again!

Comment thread web/src/content/forms/birth-certificate-affidavit-ma/index.ts Outdated
Comment thread web/src/content/forms/birth-certificate-affidavit-ma/index.ts Outdated
Comment thread web/src/content/forms/birth-certificate-affidavit-ma/index.ts Outdated
Comment thread web/src/content/forms/birth-certificate-affidavit-ma/index.ts Outdated
Comment thread web/src/content/forms/birth-certificate-affidavit-ma/index.ts Outdated
Comment thread web/src/content/guides/ma/birth-certificate.mdx Outdated
Comment thread web/src/content/guides/ma/birth-certificate.mdx Outdated
@deammer

deammer commented Jun 24, 2026

Copy link
Copy Markdown
Contributor Author

@kydecker thank you for the review! I've made all the updates you requested + updated deriveCurrentAge to default to 0 instead of undefined.

Gonna try to fix up the placement of the checkboxes on the form now.

@deammer

deammer commented Jun 24, 2026

Copy link
Copy Markdown
Contributor Author

Fun fact: BentoPDF only works in Chromium browsers. Thanks, Vivaldi 🙏

I fixed the checkboxes:
Checkboxes aligned on the form

@kydecker kydecker left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice, looking good! I tested the flow and things are working well.

I have a few more content edits, and one thought about potentially removing the supporting documents step. Curious to hear your thoughts!

Comment thread web/src/content/forms/birth-certificate-affidavit-ma/index.ts Outdated
Comment thread web/src/constants/fields.ts Outdated
Comment thread web/src/constants/fields.ts Outdated
@deammer

deammer commented Jun 25, 2026

Copy link
Copy Markdown
Contributor Author

@kydecker thanks for helping me improve this form 🙏

The gender marker step now shows a warning banner when necessary:

Screenshot 2026-06-25 at 18 39 27

I've removed the "Additional documents" step. Instead, there's now a "waive the fees?" step to toggle the "A check or money order for all fees payable..." checkbox:

Screenshot 2026-06-25 at 20 04 34

And I took your suggestion for deriving the name-change decree checkbox based on whether the applicant changed their name(s).

@deammer
deammer force-pushed the add-ma-r116-form branch from 93fa605 to f5201df Compare June 29, 2026 10:00
@deammer

deammer commented Jun 29, 2026

Copy link
Copy Markdown
Contributor Author

Hi @kydecker, I updated this branch with everything that was shipped to main recently. I'm running into a problem filling out radio fields with the new PDF library though. For some reason, the library thinks the options are ["1", "2", "3"] instead of ["Female", "Male", "X"] and I'm not quite sure why.

Example error:

Form submission failed: Error: Invalid option "Female" for radio "oldGender"

I'll investigate later this week, but maybe it's something you already know how to fix?

@kydecker

Copy link
Copy Markdown
Member

@deammer I can take a look at this later today! I think once we get the radio buttons working we should be close to complete. Thanks for sticking this out and sorry for the mid-progress merge conflict!

@kydecker kydecker left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@deammer Thank you for contributing!

I just pushed a few changes to update the radio group selection logic to work for the new libpdf library.

Also made a handful of smaller copy tweaks for organization.

Great work on this, thank you for your addition!!

@kydecker
kydecker merged commit ba1304c into namesakefyi:main Jun 30, 2026
7 checks passed
@deammer
deammer deleted the add-ma-r116-form branch July 2, 2026 14:03
@deammer

deammer commented Jul 2, 2026

Copy link
Copy Markdown
Contributor Author

Thanks @kydecker!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants