Bad I9 PDF form

Have been needing to programmatically fill out an I9 PDF, retrieved from gov site. Should be fairly straightforward, right?

Well… the field names are… a mess.

Field names like

topmostSubform[0].Page1[0].U\.S\._Social_Security_Number__Last_4_numbers_[0]topmostSubform[0].Page1[0].expiration_date__if_applicable__mm_dd_yyyy[0]
topmostSubform[0].Page2[0].Employers_Business_or_Organization_Address_Street_Number_and_Name[0]

and so on make it pretty… not straightforward to create a usable key/value combination to search and replace.

But… today, I noticed it got better. Every state address I entered was ‘wrong’. We had a number of PDFs with ‘PR’ in them, when the state supplied is ‘SC’.

Digging further, the internal definition of the ‘state’ fields look like this

/TU (Section 1., Select State from the drop down list.)
/Opt [[( ) ( )] [(AL) (AK)] [(AK) (AL)] [(AZ) (AR)] [(AR) (AS)] [(CA) (AZ)] [(CO) (CA)] [(CT) (CO)] [(DE) (CT)] [(FL) (DC)] [(GA) (DE)] [(GU) (FL)] [(HI) (GA)] [(IA) (GU)] [(ID) (HI)] [(IL) (IA)] [(IN) (ID)] [(KS) (IL)] [(KY) (IN)] [(LA) (KS)] [(MA) (KY)] [(MD) (LA)] [(ME) (MA)] [(MI) (MD)] [(MN) (ME)] [(MO) (MI)] [(MP) (MN)] [(MS) (MO)] [(MT) (MP)] [(NC) (MS)] [(ND) (MT)] [(NE) (NC)] [(NH) (ND)] [(NJ) (NE)] [(NM) (NH)] [(NV) (NJ)] [(NY) (NM)] [(OH) (NV)] [(OK) (NY)] [(OR) (OH)] [(PA) (OK)] [(PR) (OR)] [(RI) (PA)] [(SC) (PR)] [(SD) (RI)] [(TN) (SC)] [(TX) (SD)] [(UT) (TN)] [(VA) (TX)] [(VI) (UT)] [(VT) (VA)] [(WA) (VI)] [(WI) (VT)] [(WV) (WA)] [(WY) (WI)] [(CAN) (WV)] [(MEX) (WY)] [(0) (CAN)] [(1) (MEX)]]

The ‘/Opt’ defines an option list, and each pairing is a display value and an actual value.

Setting the actual value to ‘SC’ – you can see that ‘PR’ is paired with ‘SC’, and we get ‘PR’ shown in every state field.

This is simply broken, as far as I can tell, and has been for years (since 2019?)

If someone can point me to how this is supposed to be used… feel free to email or call me.

Similar Posts

  • CyclopsMonitor

    I’ve been posting more about this new service over on linkedin, but haven’t posted much here. CyclopsMonitor is a web monitoring service – checking if a web address is up, how fast it responds, if specific content is available, when SSL/TLS certs expire, when domain name expires, and… sending you notifications when problems occur. Currently,…

  • A bit of feedback…

    A small bit of feedback… that’s often what a mobile user is looking for. Haptic feedback – a quick device vibration – is great. It’s subtle, quick, doesn’t interrupt, but gives an actual *feeling* that something happened. And… on iOS, it’s harder to do without building a full ‘native mobile app’. iOS Safari doesn’t support…

  • Importance of backups

    Well… here we are.  10 years later, and … no backups.  Or… none of the data that’s important. Recently had a drive crash in my main server where this blog is hosted.  Had it happen 2 years ago, but the data was recovered, and I put everything on automatic backups.  Using virtualmin, a great control…

  • Four Thousand Weeks

    I’m starting to read “Four Thousand Weeks” from Oliver Burkeman. I initially listened to much of the audio book, then bought a copy (link above to Amazon – no affiliate link). Have not finished yet, but the core message of the book seems to be There’s certainly more to it than this, and again, I’m…

Leave a Reply

Your email address will not be published. Required fields are marked *