Solved

How to convert a dropdown field to radio button control in SharePoint Designer 2007

Posted on 2012-04-02
4
3,162 Views
Last Modified: 2012-04-02
You would think this is simple, but I am having trouble changing a dropdown field on a SharePoint designer 2007 form to a radio control. The drop down field has 5 options.  In SharePoint Designer I click (highlight) the dropdown field and click the arrow on the right which brings up a menu.  The menu list common FormField Tasks. Where I have the option to select a data field and format as.  When I select my field with a radio button format my dropdown field is converted to a single radio button with no label. How do I get this radio button control to pick up my options? Or, what is the correct syntax to rewrite the control to include my options?

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

New Option Button field:
<asp:RadioButton runat="server" id="ff25{$Pos}" text=" "
__designer:bind="{ddwrt:DataBind('i',concat('ff25',$Pos),'Checked','CheckedChang
ed','ID',ddwrt:EscapeDelims(string(@ID)),'@Project_x0020_Type')}" />

Any help is appreciated.
0
Comment
Question by:macarrillo1
  • 2
4 Comments
 
LVL 18

Expert Comment

by:ivan_vagunin
ID: 37797177
Hi!
RadioButton is not data bound control (it is single radio button as you see). You should use RadioButtonList control instead (http://msdn.microsoft.com/en-us/library/system.web.ui.webcontrols.radiobuttonlist(v=vs.90).aspx)
0
 
LVL 5

Accepted Solution

by:
Robin Hall earned 500 total points
ID: 37797202
I have a follow up comment/question.  If this form is writing back to a SharePoint List, have you changed the option in the "Project Type" List column on the phsycial SharePoint site to display the choices using "Radio Buttons" instead of a "Drop-Down Menu"?

I use Sharepoint 2010 and when I tried changing it the way you mentioned in your question, I had the same issue that you did.  It turned into an asp control and only showed one radio button.  But when I instead changed the option in the actual SharePoint List column , my form picked up the new Radio Button Choice.  After refreshing my form, it displayed the radio buttons correctly while keeping it as a <SharePoint:Form Field> type.
0
 
LVL 9

Author Comment

by:macarrillo1
ID: 37797653
@rnh82, That was the problem!
I forgot, I rebuilt this list. Originally it was defined in SharePoint as radio button, but when I rebuilt the list, I left it as dropdown.

Thanks!
0
 
LVL 9

Author Closing Comment

by:macarrillo1
ID: 37797663
Sometimes you just need to get a fresh perspective.
Thank You!
0

Featured Post

IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

Note:  There are two main ways to deploy InfoPath forms:  Server-side and directly through the SharePoint site.  Deploying a server-side InfoPath form means the form is approved by the Administrator, thus allowing greater functionality in the form. …
It was really hard time for me to get the understanding of Delegates in C#. I went through many websites and articles but I found them very clumsy. After going through those sites, I noted down the points in a easy way so here I am sharing that unde…
Excel styles will make formatting consistent and let you apply and change formatting faster. In this tutorial, you'll learn how to use Excel's built-in styles, how to modify styles, and how to create your own. You'll also learn how to use your custo…
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

762 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

26 Experts available now in Live!

Get 1:1 Help Now