1

Objective

I'd like to change the functionality of the New Item button for a Document Library. Right now if you click the button, it simply prompts you to upload a document. I want it to provide the user with a list of available choices (the two forms I've created in InfoPath).

I need the solution to be an OOTB one as it needs to be able to be replicated by those who are not so savvy in the ways of SharePoint.

What I have

  • SharePoint 2013
  • Site Owner Level Permissions
  • 2 Forms Published as Content Types

What I don't have

  • Server Side Access

Current

Right now my forms are only accessible by going to the Files tab and select the arrow under New Document. While instructions are provided to follow those steps to access the forms, it would be nice to simply use the New Item button provided.

0

As list forms are just .aspx pages, you will need to redirect user to one of these pages (like .../list/forms/newform1.aspx, and .../list/forms/newform2.aspx).

I would add Script Editor Web Part to the page, and inside it something like (requires jQuery):

<div id="myFormSelector" style="display:none;">
  <ul><li onclick="location.href='/site/list/forms/form1.aspx'">Form 1</li>
  <li onclick="location.href='/site/list/forms/form1.aspx'">Form 2</li></ul>
</div>
<script>
$(function() {
    $("#idHomePageNewItem").attr("onclick", "$('#myFormSelector').show(); return false;" );
});
</script>

You will also want to position the opened DIV below the New Item button, that can be done with absolute positioning or using some JS like described here.

  • Hmm. I like your ideas, however I'm unsure the best method to actually do those things. Would it be possible for you to go in a little more depth on how to actually do some of these things? – Odinson Jul 27 '17 at 15:17
  • Re-read your question, and updated answer, as it was not the Ribbon you were asking about, sorry. – Jussi Palo Jul 28 '17 at 5:39

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.