$().SPServices.SPArrangeChoices and Easytabs

Mar 29, 2012 at 3:52 PM

I am trying to use the $().SPServices.SPArrangeChoices function on a WSS 3.0 webpage with several custom forms for data entry into lists, in separate webparts within a single zone. EasyTabs 5 is used to change the view so that the forms display as tabbed options. One of the forms, however, has about 12 tick boxes on a single field and the $().SPServices.SPArrangeChoices looks perfect for improving the look. I have checked my paths using alert and the paths are correct. I have tried the code in a CEWP and at the <asp:Content ContentPlaceHolderId="PlaceHolderMain" runat="server"> location but with no success. I have tried with and without the <xsl:comment>FieldName="MyField"</xsl:comment>.  I have tried indicating the list with both "My List" and "My%20List". my code is:


<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.5.1/jquery.min.js" xmlns:ddwrt2="urn:frontpage:internal"></script> <script type="text/javascript" src="/Utilities/jquery.SPServices-0.7.1a.min.js"></script> <script type="text/javascript">
$(document).ready(function($().SPServices.SPArrangeChoices({
listName: "My List",
 columnName: "MyField",
perRow: 3,
randomize: false
}));
</script>

Any ideas where I am going wrong?

Coordinator
Mar 29, 2012 at 4:00 PM

Rob:

Since you have custom forms, it's hard to say. I don';t see anytihng obviously wrong.

M.

Mar 29, 2012 at 4:23 PM

Ah well. Although to be fair I probably oversell my SharePoint skills when I describe the forms as custom, they are just made by  using insert data view, selecting my favourite fields and then hitting "insert selected fields as new item form" in SPD.

Thanks for looking anyway, I will try the function in a more usual set up shortly.

Rob

Mar 30, 2012 at 9:49 AM

My mistake, curly brackets in the wrong places.

<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js" xmlns:ddwrt2="urn:frontpage:internal"></script> <script type="text/javascript" src="/Utilities/jquery.SPServices-0.7.1a.min.js"></script> <script type="text/javascript">
$(document).ready(function(){$().SPServices.SPArrangeChoices({
listName: "My List",
 columnName: "MyField",
perRow: 3,
randomize: false
});
});
</script>
works perfectly and seriously improves the look of my page. Many thanks for this function.

Regards

Rob

Coordinator
Mar 31, 2012 at 10:48 PM

Ah, yup I see it now. Next time, format your code with the widget on the toolbar, and it may be a little easier to spot. Gladd you got it working!

M.