For all these you need Adobe Acrobat Pro DC. I get it through a subscription to the Creative Cloud Suite
The Acrobat Javascript Acrobat reference
http://www.adobe.com/content/dam/Adobe/en/devnet/acrobat/pdfs/js_api_reference.pdf
This one is older but still has good examples
https://www.pdfill.com/document_javascript.html
Good source for beginner examples
https://answers.acrobatusers.com/How-I-add-JavaScript-PDF-form-q198153.aspx
Detailed article “describes how to use Javascript code to create interactive PDF documents.â€
https://www.codeproject.com/Articles/380293/Javascript-in-PDF
The Acrobat Developer Center
http://www.adobe.com/devnet/acrobat.html
Example code to load values from a text file called "data.txt" which would be stored with the pdf form.
https://forums.adobe.com/thread/919033
Question dialogue to “I want read data form txt files from local hard drive and , set this data as value (for select element).â€
https://forums.adobe.com/thread/589452
Link to Acrobat SDK
http://www.adobe.com/devnet/acrobat/sdk/eula.html
Example code from ByteScout. ByteScout is a commercial offering of pdf, barcoding, imaging and data extraction products.
Good search link
https://www.bing.com/search?q=how+to+add+javascript+to+pdf+forms&src=IE-SearchBox&FORM=IENTSR