# Interactive App Customization

**URL:** <https://discourse.openondemand.org/t/interactive-app-customization/3903>\
**Category:** Get Help\
**Tags:** question\
**Created:** [December 2, 2024, 3:54pm UTC](https://discourse.openondemand.org/t/interactive-app-customization/3903 "2024-12-02T15:54:42Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![VittoCon](https://sea1.discourse-cdn.com/flex015/user_avatar/discourse.openondemand.org/vittocon/32/2512_2.png) [@VittoCon](https://discourse.openondemand.org/u/VittoCon)\
**Post date:** [December 2, 2024, 3:54pm UTC](https://discourse.openondemand.org/t/interactive-app-customization/3903/1 "2024-12-02T15:54:42Z")

</div>

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:

```auto
 - 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

---

<div class="post-metadata">

**Author:** ![jose-d](https://sea1.discourse-cdn.com/flex015/user_avatar/discourse.openondemand.org/jose-d/32/703_2.png) [@jose-d](https://discourse.openondemand.org/u/jose-d)\
**Post date:** [December 2, 2024, 4:10pm UTC](https://discourse.openondemand.org/t/interactive-app-customization/3903/2 "2024-12-02T16:10:44Z")

</div>

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.):

```auto
  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 %>"

```

---

<div class="post-metadata">

**Author:** ![VittoCon](https://sea1.discourse-cdn.com/flex015/user_avatar/discourse.openondemand.org/vittocon/32/2512_2.png) [@VittoCon](https://discourse.openondemand.org/u/VittoCon)\
**Post date:** [December 3, 2024, 7:37am UTC](https://discourse.openondemand.org/t/interactive-app-customization/3903/3 "2024-12-03T07:37:07Z")

</div>

> [@jose-d](#):
>
> ```auto
> 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 %>"
> 
> ```

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!

---

<div class="post-metadata">

**Author:** ![jose-d](https://sea1.discourse-cdn.com/flex015/user_avatar/discourse.openondemand.org/jose-d/32/703_2.png) [@jose-d](https://discourse.openondemand.org/u/jose-d)\
**Post date:** [December 3, 2024, 7:45am UTC](https://discourse.openondemand.org/t/interactive-app-customization/3903/4 "2024-12-03T07:45:47Z")

</div>

> [@VittoCon](#):
>
> Would you know if there is a way to validate the input file extension?

no idea, at my site we use `path_selector` to select folders 🙂

---

<div class="post-metadata">

**Author:** ![jeff.ohrstrom](https://sea1.discourse-cdn.com/flex015/user_avatar/discourse.openondemand.org/jeff.ohrstrom/32/136_2.png) [@jeff.ohrstrom](https://discourse.openondemand.org/u/jeff.ohrstrom)\
**Post date:** [December 3, 2024, 3:21pm UTC](https://discourse.openondemand.org/t/interactive-app-customization/3903/5 "2024-12-03T15:21:52Z")

</div>

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

> <https://github.com/OSC/ondemand/issues/3037>
>
> https://github.com/OSC/bc\_js\_filepicker has this feature to filter files based o…n a regular expression. The \`path\_selector\` should support the same.
> 
> \`\`\`
> data-target-file-pattern: \\.py$ # python files
> # Optionally provide FS favorites manually
> \`\`\`

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex015/uploads/osc/original/2X/b/bae70bd0ed39a3ae769c2108155f4cb3e9da8385.png) [@system](https://discourse.openondemand.org/u/system)\
**Post date:** [June 1, 2025, 3:22pm UTC](https://discourse.openondemand.org/t/interactive-app-customization/3903/6 "2025-06-01T15:22:36Z")

</div>

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.
