Skip to main content
September 20, 2010
Question

Prevent Radio Button Change

  • September 20, 2010
  • 2 replies
  • 929 views

I am building a simple form.  Have a table displaying a list of employee names and then 3 columns: "In Office", "Out of Office", "Off".  I want to use a radio button group to display the values in my table.  I have that working, and it's correctly checking the right radio button.  What I want to do is prevent the user from changing the value.  I'll provide an "edit" link so they can update each record.  But right now, the list of records displays, and you're free to change the radio button value on each record.  Of course, none of that writes back to the database.  But still, I know what will happen is my users will change the value on that screen and think they've updated their status.

I found how to disable, but I don't want the radio group greyed out.  Just locked from updating on that page.  See the image included. Any direction would be great.  Thanks.

This topic has been closed for replies.

2 replies

Participating Frequently
September 20, 2010

I don't understand. If want to display the button state but don't want the user to be able to change it, the correct user interface is to show it disabled. Otherwise you will confuse the user.

In any case, if the page is simply displaying the values, then even if they change the state you're not updating the records on the page, so nothing will happen. Right? Please explain further if I missed something.

September 21, 2010

You are correct.  Even though they change the radio button that's clicked, it won't update the record.  What I was shooting for was to lock it from being changed so that they know they need to click an edit link to update that record.  My concern is that someone will not pay attention to the training and click a different button on the original page and assumed they changed it.

Didn't think this would be such a big deal.  I do this easily in Access, because Access has two separate properties: locked and enabled.  So I'm able to lock the radio button from being changed without greying it out so it's hard to see.  Changing "enabled" to no would grey it out.  I'll probably just do this with a drop down instead.  I just thought there might be some way to accomplish the same thing on a web page that I do with the Access properties.  But thanks for the help...

Lon_Winters
Inspiring
September 21, 2010

I've never seen or heard of a way to disable a radio button without also greying it out. I agree with the above comment that displaying a disabled radio button without greying it out would be more confusing. If I saw something that way - having been trained on it or otherwise, and did try to change it, I would thing something was broken. Being grey out is for that reason - a clear indication that it's not meant to be changed, at least on that page.

But you can display data any way you want, or, any way you want! Like mentioned above, images of radio buttons, check boxes, text or even a smiley face. : )

Edit: Drop down, same issue - disable it will grey it out I believe.

September 20, 2010

display images of radio buttons