Possible Bug in Form Block!

Permalink
A client just discovered this issue.

On the Form Block when adding items to a list, the default is "None". It is of course a Radio Button and is selected. When submitting a form (leaving the Default at "None"), the form validation routine believes nothing is selected. Yet "None" is selected by default.

If we hide "None", we cannot set another item as the default.

What are we missing???

Barb

 
MrKDilkington replied on at Permalink Reply
MrKDilkington
Hi barbedwire,

When enabling "Hide none option from the list." in the Option List answer type, set the "Required" option to "Yes". This will force a user to make a choice.

There isn't an option to set which value is the default.
barbedwire replied on at Permalink Reply
MrKDilkington, thanks for this. We are setting to "required" and it of course does force the visitor to make a selection.

I think you'll agree that this is bizarre behavior, almost like a "missed thought". Never seen this before where one cannot set a default.

Maybe I'll poke around and see if it can be done - a little adventurous, but what the hey. no guts not glory.

Anyway, onward and upward I guess.

Thanks again,

Barb
barbedwire replied on at Permalink Reply
Actually, this slipped my mind.

If one were to leave "None" visible (not hidden) and it is a Radio Button that is checked (i.e. =1), why does the validation not recognize this fact?

instead it insists that nothing is selected.

Just curious.

Thanks again,

Barb
MrKDilkington replied on at Permalink Reply
MrKDilkington
@barbedwire

The "None" radio button has no value and will not validate. Without a value nothing is selected.
barbedwire replied on at Permalink Reply
My point is that the "none" radio button is set to Checked in the relavent php code.

So the validation check "Should" recognize None as selected.

Not real strong php person, but have coded enuff over the years to know that if a rbutton or chkbox is set to checked, it should pass validation. Even simple javascript can do this when one is set to checked in an html form - so far as know.

So I'm still confused.

But thanks for taking a shot at this.