Tuesday, August 13, 2013

Add Custom Attachment Control & Disable Attachment button on Ribbon

<!-- Add Attachment File control -->

<table width="100%">
<td width="190" class="ms-formlabel" valign="top" style="font-family: verdana; color: #525252; font-size: 1em; font-weight: normal">Add Attachments: </td>
<td class="ms-formbody" id="attachmentsOnClient" valign="bottom">
<span dir="ltr">
<input name="fileupload0" title="Name  " class="ms-fileinput" id="onetidIOFile" type="file" style="width: 386px"/> </span>
<td class="ms-attachUploadButtons">
<input id="attachOKbutton" onclick="OkAttach()" type="button" value="OK  " style="width: 5.8em; height: 1.8em"/> <span id="idSpace"></span></td>


<!-- Hide File Attachment Button on Ribbon-->

<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.10.1/jquery.min.js">
</script><script type="text/javascript">

 </script><!-- Hide File Attachment Button -->

Use in list forms & Enjoy :) 

No comments:

Post a Comment

How to launch a document by clicking a link to the file?

Word: <a href='ms-word:ofe|u|path/to/web/word/document.docx'>Link to document</a> Excel: <a href='ms-excel:o...