5 Replies · Latest reply on May 19, 2017 4:45 PM by Pradeep Sharma

    catalog client script to prevent submission of form without attachment

      I've got a catalog item that I need to require the uploading of an attachment.  I created a Macro to put the button on the form as a variable called "upload_attachment",


      I then created an onSubmit catalog client script with this code:


      function onSubmit() {

        if(g_form.getValue('upload_attachment') == 'no' ){ //this is the name of the macro field for the upload button

         alert('Please attach your completed Firewall Change Form');

         return false;







      thinking I must be close?