VittoCon
(Vittorio)
1
Hello,
I would like to customize the interactive app card so that I can load an input file that:
- It has a restriction on the file extension (.fem)
- 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
jose-d
(jose_d)
2
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 %>"
VittoCon
(Vittorio)
3
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!
jose-d
(jose_d)
4
no idea, at my site we use path_selector
to select folders
Looks like we haven’t implemented filtering in the path selector yet.