Hi, Austin,
Thanks for the reply. I moved the JavaScript code after the form, but I still get the error (Uncaught TypeError: Cannot read properties of null (reading ‘addEventListener’)) and I still get the 500 error at the receiving website. I know the receiving end allows file uploads because we’ve tested it elsewhere.
Here is the form where I’m trying to get this to work:
https://mps.rutgers.edu/need-help-test
For an example of where this is working, see the “Need Help?” widget at the lower corner of: https://mps.rutgers.edu/data-science/
I didn’t write the code for the widget, but I have been tasked with reproducing its functionality on a web page.
Thanks again,
Eddie