This topic is locked

How to hide 'Upload' button on Add/Edit pages with file upload field

10/24/2014 9:52:07 AM
PHPRunner Tips and Tricks
admin

Q: I have a project that utilizes the drag and drop upload control. We are experiencing issues where some site visitors are not reading our instructions completely and are selecting the Upload button within the control and not choosing the final submit on the page. When this happens we do not receive an email notice of the submission and do not realize they have uploaded anything until we review our uploads folder later and discover files with no email to correspond to.
Is there a way to remove the "upload" button in the control so that the only means of uploading is to submit the entire page?
A: Add the following code to Javascript OnLoad event of the page in question:

$("span.btn.btn-primary.start").remove();

$("span.btn.btn-warning.cancel").remove();