is it possible to let InDesign fill in some predefined text when clicking on a hyperlink? For example: You have a pdf with 5 pictures and a form field, when you click on picture number 2 it writes "picture #2" into the form field.
No. The only thing InDesign supports, and exports to PDF, for hyperlinks is the literal URL. You cannot include another 'target' (see https://forums.adobe.com/thread/1508480), or in fact anything else than the bare URL.