How can I relate PDFs and Files using an Element Select field in my custom plugin? I would like to create an elementSelect form field in my plugin, and can't find an example or description. Can someone help?
I believe you're looking for something like the example posted here which goes into detail on several items necessary to create a working Asset Relations Field in a custom plugin:
https://craftcms.stackexchange.com/a/456/115