Menu

Portal XML - new form: disable attachments?

2021-08-31
2021-08-31
  • Jeffrey Bostoen

    Jeffrey Bostoen - 2021-08-31

    I'm creating a form for changes. Technically speaking, it is an "edit" form. The private log is the only field which can be modified.

    All other info should be read only.

    I notice an "add attachment" option at the bottom ...
    How can this be disabled - for this specific form only? (preferably not relying on a work-around of CSS)

     
  • Guillaume Lajarige

    Hello Jeffrey,

    Unfortunately you can't, as the attachments are a specific plugin which display themselves on the configured DM classes, there is no native way to remove them from a specific form.

    That being said, you can do it with a bit of CSS / JS, but it's not perfect and not guaranteed to work on future versions.
    - With the CSS, hide the attachments by using the right selector (check ID and data-xxx attributes on the form)
    - With the JS, ensure to remove the attachments to avoid users from finding the

    Hope it helps,
    Guillaume

     
    👍
    1

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.