Panel field for files with autocomplete

I wonder how I can build a new panel field type: filename with autocompletition of filenames. I tried to use the page field and adapt it but it wasn’t as easy as I hoped … I’d be happy if anyone can point me on how to implement this.

I know it’s not exactly what you asked for, but if you wanted to get a specific file of a page you may achieve this with a select query in the blueprint.

    label: select a file
    type: select
    options: query
      page: your_page
      fetch: files
      value: '{{filename}}'
      text: '{{filename}}'

Nice idea! Though it might work for my current use case it can can become impractical for pages with many files …

@andi242: Why did you set this question to “solved”? I know your suggestion works, but as I said only for few files and I’d prefer a field with autocompletion for files like page for pages …

Ups …

the edit wasn’t made by @andi242 – sorry :wink: it was done by @lukasbestle

I just “unsolved” it again. :wink: