vipin Paliwal
vipin Paliwal

Reputation: 62

Add tabs in new item page

I have a list which have around 60 column. In sharepoint page height is very high. So can I add tabs in sharepoint new item page. Please Help.

Upvotes: 1

Views: 1349

Answers (1)

Per Jakobsen
Per Jakobsen

Reputation: 3777

There is no built-in way to do this, but if you can code JavaScript it shouldn't be that hard.

In SharePoint designer open the New/Edit form:

Add a PlaceHolderAdditionalPageHead like this

<asp:Content ContentPlaceHolderId="PlaceHolderAdditionalPageHead" runat="server">
<script src="http://ajax.microsoft.com/ajax/jquery/jquery-1.3.2.min.js" type="text/javascript"></script>
<script type="text/javascript">
jQuery(document).ready(function($) {
  $('.ms-formtable>tbody>tr:gt(9)').hide()  
});
function showFields(from, to)
{
  jQuery('.ms-formtable>tbody>tr').hide();
  if (from>1)
    jQuery('.ms-formtable>tbody>tr:lt('+to+'):gt('+(from-2)+')').show();
  else
    jQuery('.ms-formtable>tbody>tr:lt('+to+')').show();
}
</script>
</asp:Content>

Add some links to the UI inside PlaceHolderMain like this:

<a href="javascript:showFields(1,10);">1-10</a>
<a href="javascript:showFields(11,20);">11-20</a>
<a href="javascript:showFields(21,30);">21-30</a>

Upvotes: 2

Related Questions