set default radio button state?

14 years 3 months ago #15928 by juliecracker
set default radio button state? was created by juliecracker
I am using a field to "hide" a user (so they are filtered from lists). Originally I used a checkbox (so the default state is "NULL" or do not hide, and the user must explicitly check the box to hide themselves). After finding the hack to ensure the filtering worked (since using the profile editor sets the checkbox field to an empty string "" and it is no longer NULL!), I found out that you can not _uncheck_ the box in the back end.

So I figured I could change my field to a radio button - Hide? Yes or No. But I still want to have a default ("No") so that it is clear to the user they must explicitly choose "Yes" to be hidden.

There doesn't seem to be a way to establish which radio button state is the "default". It's not the first one in the list. Since the definition of a radio button set is that exactly one option is always true, this seems incorrect.

I can handle this in my filtering (although hopefully I won't forget that "No" and NULL and "" are all equivalent values!), but I was hoping someone might know something I don't about how to set up a radio button field.

Thanks,
julie

Please Log in to join the conversation.

Moderators: beatnantkrileon
Time to create page: 0.393 seconds

Facebook Twitter LinkedIn