Showing results for 
Search instead for 
Do you mean 
Community Home Request Access Read Blogs Share Your Ideas Search Community View My Settings
Reply
New Member
Posts: 5
Registered: ‎01-03-2012

Radio group and Boolean Field

SL 7.5.4 SQL Server

I have a Radio Group connected to a Boolean field, with Yes and No as selections. When the form displays and the field is not populated with a 1 or 0 (null) it displays "Yes", "No" checkboxes and a third box which is populated.

After Yes or no is selected, the third checkbox disappears.

Is there a way to eliminate the third checkbox for null? I can't set the field to a default value for other reasonsOutput

Employee
Posts: 70
Registered: ‎07-28-2008

Re: Radio group and Boolean Field

Ted,

 

FYI -- I had logged this as a defect a while back.  Null values just do not play nice with bound radio groups.  Sorry.  It looks like the fix will be 8.0 sp1.

 

Kelly

Highlighted
Copper Elite Contributor
Posts: 39
Registered: ‎07-13-2010

Re: Radio group and Boolean Field

You may remove the data binding and use the "text field" and "value field" in the list section of the radio group's properties. Unfortunately, you have to code the saving of changes of control by your own.

Bronze Super Contributor
Posts: 152
Registered: ‎02-01-2011

Re: Radio group and Boolean Field

Here's a hack:

1. add a radio button for null... under "Items" in the radio group, add a blank entry at the end (text = [blank], value = [blank]).

2. add a Style Scheme with an unused name (in this example I used "hidelast") to the radio group.

3. Add javascript as part of your page onload to hide the last child with an Ext call (this is a code snippet):

 

using System.Web.UI;
// hide blank radio buttons
SmartPart smartpart = form.NativeForm as SmartPart;
Page page = smartpart.Page;
string script = "Ext.select('fieldset.radio table.hidelast tbody tr td:last-child').hide();";
ScriptManager.RegisterStartupScript(page, page.GetType(), "hidelastradio", script, true);

 

 (You may need to reference System.Web.Extensions.dll in your project, or redo the above to work with a C# snippet.)

 

4. Set the onload to run for the "On Repaint Event" or else those blank radio buttons will show up after lookups etc.

Andy Freeman
TrellisPoint, LLC
Bronze Super Contributor
Posts: 192
Registered: ‎07-17-2011

Re: Radio group and Boolean Field

Was this ever fixed?  I am still seeing this in 8.1.

 

Thanks!

 

Norman