Michael Carrillo
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_T ype"
__designer:bind="{ddwrt:Da taBind('i' ,concat('f f25',$Pos) ,'Value',' ValueChang ed',
'ID',ddwrt:EscapeDelims(st ring(@ID)) ,'@Project _x0020_Typ e')}" />
New Option Button field:
<asp:RadioButton runat="server" id="ff25{$Pos}" text=" "
__designer:bind="{ddwrt:Da taBind('i' ,concat('f f25',$Pos) ,'Checked' ,'CheckedC hang
ed','ID',ddwrt:EscapeDelim s(string(@ ID)),'@Pro ject_x0020 _Type')}" />
Any help is appreciated.
Original dropdown field:
<SharePoint:FormField runat="server" id="ff25{$Pos}" ControlMode="New"
FieldName="Project_x0020_T
__designer:bind="{ddwrt:Da
'ID',ddwrt:EscapeDelims(st
New Option Button field:
<asp:RadioButton runat="server" id="ff25{$Pos}" text=" "
__designer:bind="{ddwrt:Da
ed','ID',ddwrt:EscapeDelim
Any help is appreciated.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
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!
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!
ASKER
Sometimes you just need to get a fresh perspective.
Thank You!
Thank You!
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)