Vancouver - catalog item ootb attachment mandatory in certain cases

Afnan Alkhamis
Tera Guru

Hello guys!

I'm having a bit of an issue with making the ootb attachment of the catalog item on the portal mandatory depending on the answer to another question.

I tried these methods but didn't work: document.getElementById('') ,  getSCAttchmentCount() 

 

any help would be appreciated

1 ACCEPTED SOLUTION

Afnan Alkhamis
Tera Guru

I managed to get it to work by writing on submit client script with this code:

 
    if (this.document.getElementsByClassName('get-attachment').length == 0)
    {
        alert('You must add an attachment before submitting this request.');
        return false;
    }

View solution in original post

6 REPLIES 6

there is no variable for it,so it doesn't work

Afnan Alkhamis
Tera Guru

I managed to get it to work by writing on submit client script with this code:

 
    if (this.document.getElementsByClassName('get-attachment').length == 0)
    {
        alert('You must add an attachment before submitting this request.');
        return false;
    }