This project has moved and is read-only. For the latest updates, please go here.

radio buttons not displaying horizontally....what am I doing wrong?

Mar 18, 2011 at 7:00 PM

Hi sympmarc - Thanks for this awesome and very useful tool....just what I've been looking for to solve issues with a few of my projects. I do have a slight problem though and am hoping you can tell me what I'm doing wrong.

I have a custom list in SharePoint 2010 that has several choice columns set up as radio buttons and I would like to use the SPArrangeChoices function to position them horizontally. I have placed the required code at the beginning of my PlaceHolderMain section of my NewForm.aspx page but even though my alert is triggered and I don't get any errors my radio buttons still display vertically. I also tried placing the code at the bottom of my PlaceHolderMain section but ended up with the same results. Here is the code I have in my PlaceHolderMain:

<script src="/_layouts/scripts/jquery-1.5.1.min.js" type="text/javascript"></script>
 <script src="/_layouts/scripts/jquery.SPServices-0.6.0.min.js" type="text/javascript"></script>

<script type="text/javascript">
  $(document).ready(function() {
  alert("script is running");
      columnName: "This site is easy to navigate",
      perRow: 5

The code in my NewForm.aspx page that generates the form field I'm trying to manipulate in my script is as such:

<SharePoint:FormField runat="server" id="ff2{$Pos}" ControlMode="New" FieldName="This_x0020_site_x0020_is_x0020_e" __designer:bind="{ddwrt:DataBind('i',concat('ff2',$Pos),'Value','ValueChanged','ID',ddwrt:EscapeDelims(string(@ID)),'@This_x0020_site_x0020_is_x0020_e')}"/>

I also tried using the FieldName value in the columnName section of the script but still no luck. Am I missing something?


Mar 18, 2011 at 8:38 PM


Since you're showing the SharePoint:FormField, you've probably customized the form by converting it to XSL. In order for SPArrangeChoices to work in this situation, you need to manually add a comment above the field. See the note at the top of the documentation page:$().SPServices.SPArrangeChoices

If that doesn't work, ping me back and we'll figure it out.


Mar 19, 2011 at 5:17 PM

Thanks for getting back to me so quickly Marc. Once I place the comment above the field everything worked like a charm....Thanks again for sharing such a wonderful tool!

Mar 19, 2011 at 9:48 PM
You bet. Glad you got it working!