- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-07-2020 09:26 PM
This link may be of help to you - New Rocket has published their code for making attachments mandatory and it takes from the portal options. You may find it easier to either modify their code or examine it to see how they adjust the Portal Options to see if you can programmatically do it via your onChange script:
https://serviceportal.io/downloads/require-attachments/
It would likely be easier to have an information box or something displayed when the type of request requires an attachment and use an onSubmit to detect if there was one (and show an error / abort if needed). I know this one isn't a perfect fit (you want the mandatory to be dynamic) but I think it's at least a fall back if for some reason the above widget does not help you with the code you need.