Upload attachment button disappears during site loading

Hi all!

Can you provide tips/help on how to prevent the attachment upload button from disappearing during site loading?

I have a sharepoint site where users can attach a document for their requests. I have had issues for several months now where users cannot find the upload button.

Dear @Jamail_Serio,
That's the first time we hear of something like that... Would your users be able to record a video of it happening? We'd also appreciate if they could open Network tab before reproducing and record HAR file with all the requests to know what's going wrong.

Even if the above are hard to do, a simple screenshot from browser's console with errors might help, when the users reproduce the issue.

Also, do you have any custom JS on the form? Can you remove the custom code for testing to make sure it's not causing any issues?

//Check Attachments
fd.spRendered(function(){
        fd.field('Attachments').ready().then(function() {
                fd.field('Attachments').validators.push({
                        name: 'Attachments Validation',
                        error: "Record of Emergency (RED) Form is a required attachment. Please download, sign, and upload the required forms. Also, please make sure that your attachments contain the words 'RED', 'Record', 'Emergency'. The travel site checks for these keywords to ensure correct attachments.",
                        validate: function() {
                            if (fd.field('Attachments').value.length == 0) {
                                    return false;
                                }
                            return true;
                    }
                });
        });
});

//Check RED Form Filename
fd.spRendered(function(){
    fd.field('Attachments').validators.push({
            name: 'Attachments Validation',
            error: "Record of Emergency (RED) Form is a required attachment. Please download, sign, and attach the required forms. Also, please make sure that your attachments contain the words 'RED', 'Record', 'Emergency'. The travel site checks for these keywords to ensure correct attachments.",
            validate: function(value) {
              var validName = true;
              if(value.length >= 1){
                value.forEach(function(file){
                var attachName = file.name;            
                if (!attachName.includes('RED') && !attachName.includes('Red') && !attachName.includes('Record') && !attachName.includes('record') && !attachName.includes('Emergency') && !attachName.includes('emergency')) {
                  validName = false
                }

              })
              return validName;
              }
              return false;
            }
    });
});

Dear @Jamail_Serio,
Not sure if this code could be causing the issue, but you can reduce it to just one validator:

//Check RED Form Filename
fd.spRendered(function(){
    fd.field('Attachments').validators.push({
            name: 'Attachments Validation',
            error: "Record of Emergency (RED) Form is a required attachment. Please download, sign, and attach the required forms. Also, please make sure that your attachments contain the words 'RED', 'Record', 'Emergency'. The travel site checks for these keywords to ensure correct attachments.",
            validate: function(value) {
              var validName = true;
              if (value.length == 0) {
                return false;
              }
              else if(value.length >= 1){
                value.forEach(function(file){
                var attachName = file.name;            
                if (!attachName.includes('RED') && !attachName.includes('Red') && !attachName.includes('Record') && !attachName.includes('record') && !attachName.includes('Emergency') && !attachName.includes('emergency')) {
                  validName = false
                }

              })
              return validName;
              }
              return false;
            }
    });
});

Still, check console for errors if the button is not present on the form.