Interactive App Customization

Hello,

I would like to customize the interactive app card so that I can load an input file that:

  1. It has a restriction on the file extension (.fem)
  2. It has a user-dependent path (such as /home/{{USER}}) as the proposed selection path

In the form.yml file, I tried entering:

 - inputFile:
      widget: 'path_selector'
      label: 'Input file (.fem)*'
      required: true
      show_hidden: false
      show_files: true
      restrict_extensions: [ ".fem" ]
      favorites:
        - "/home/{{ user.name }}"

but it doesn’t work.

Thank you very much for your support,
Vittorio

hi, rename form.yml to form.yml.erb

and then you can do this (this is 1:1 snippet from my OOD so perhaps change show_files to true, etc.):

  project_path:
          label: Select your project directory
          widget: "path_selector"
          data-target-file-type: dirs  # Valid values are: files, dirs, or both
          readonly: false
          show_files: false
          directory: "<%= CurrentUser.home %>"
          show_hidden: false
          favorites:
                  - "<%= CurrentUser.home %>"

1 Like

Thank you very much,
this works as far as the preferred directory is concerned.

Would you know if there is a way to validate the input file extension?

Thanks!

no idea, at my site we use path_selector to select folders :slight_smile:

Looks like we haven’t implemented filtering in the path selector yet.