Attachment mandatory & non mandatory based on variable condition
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-07-2024 02:01 AM
Hi
I want to make attachment mandatory based on condition which is working fine.(on portal)
here is the code
var mode = g_form.getValue('mode');
if((mode == 'eft')&&(this.document.getElementsByClassName('get-attachment').length == 0)) {
g_form.addErrorMessage('Please attach required file/s');
return false;
}
I need to add one more combination to this condition when mode==eft && id ==yes then attachment should NOT be mandatory.
please suggest how to achieve this
0 REPLIES 0