View Full Version : Radio Group + allowBlank not displaying validation markers

the wicked child
11 Jan 2011, 7:37 AM
I have a form with several items which are all required. Most of them are TextFields, but there is also a ComboBox and a RadioGroup. The TextFields and ComboBox work fine, but the RadioGroup doesn't display any validation markers.

I have formBind set to true on the save button and it correctly does not enable until you check one of the radio buttons, but there is no way for the user to know they have to check one since the validation markers do not display. I stepped through the valid checking in firebug and verified that the field is correctly marked as invalid.

this.levelType = new Ext.form.RadioGroup({
fieldLabel: 'Level',
labelStyle: 'padding-top: 0',
allowBlank: false,
items: [
{boxLabel: 'O-Level', name: 'level', inputValue: 'OLVL', height: 15},
{boxLabel: 'I-Level', name: 'level', inputValue: 'ILVL', height: 15},
{boxLabel: 'D-Level', name: 'level', inputValue: 'DLVL', height: 15}
height: 20,
msgTarget: 'side'

Using EXT 3.2.1.

Any idea what might possibly be happening?

the wicked child
11 Jan 2011, 10:32 AM
Not sure why, but it seems that something is setting preventMark to true at some point. If I override markInvalid for RadioGroup to not check for preventMark, it works as expected. Adding preventMark: false to the config had no effect.

Prior to this, the validation would show up if I selected a radio and then later set the value to ''... but I don't want to preselect anything.

There's definitely something weird going on, but I don't have time to dig further into the code to see what is setting preventMark to true.