Here is the example with a csv attached file.
The process is different of the one you used previously. I hope you will be able to understand the script, else let me know.
Here, you will only have to fill the csv file and the dropdown field will be automatically generated.
I added a button to include the notes in the csv file from the field of the pdf file.
I hope that suits you.