Link to home
Start Free TrialLog in
Avatar of Michael Carrillo
Michael CarrilloFlag for United States of America

asked on

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

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.
Avatar of Member_6283346
Member_6283346

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)
ASKER CERTIFIED SOLUTION
Avatar of Robin Hall
Robin Hall
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Michael Carrillo

ASKER

@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!
Sometimes you just need to get a fresh perspective.
Thank You!