I just added one more attribute to form_radios function - separator. The default value is '<br />', as before. I use it for example to layout the buttons in row instead in column.
I thought this little change could be useful.
The patch is working against HEAD right now.
| Comment | File | Size | Author |
|---|---|---|---|
| #7 | form_radios_separator_0.patch | 1.38 KB | Uwe Hermann |
| form_radios_separator.patch | 1.38 KB | Anonymous (not verified) |
Comments
Comment #1
dries commentedI wonder whether this should be a theme issue or not ... and with that in mind, whether this would be the proper solution.
Comment #2
Steven commentedIt might be useful to arrange list then horizontally yes... but then I'm wondering if it might not be best to style form_radios as a regular HTML list with list items. Then you can apply 'float: left;' or 'display: inline;' to them.
Comment #3
mph@private.prihoda.net commentedI think that it's definitely not a theme issue - the decision how buttons should be laied out in larger forms should be up to the developer, theme knows usually nothing about usability (well, usually the dev doesn't know as well, but...)
Making it a list seems as a good alternative to me - I'll explore it, I'm still not sure about good support for styling this elements in different browsers, but I like the idea. I'll submit new patch if it works.
Comment #4
Steven commentedI don't think mph is around anymore. Still I think formatting radio/check lists as actual lists is a good idea. Setting back to active.
Comment #5
marceloverdijk commentedHi,
I think the original proposed change was nice.
At least better than the original code because a
was printed for each button.
I'm wondering about the status of this patch/proposed chaged, because it's not included in the current cvs version downloadable.
Regards,
Marcel
Comment #6
jimt commentedI agree that having the ability to specify separators other than br would be very handy. A $separator argument defaulting to br looks like a painless way to achieve this while maintaining backwards compatibility.
Comment #7
Uwe Hermann commentedI like it. Here's an updated patch for HEAD.
Comment #8
Crell commentedBased on old form code, not new Form API.
Personally I'd rather see this handled with the list-item method, but either way the latest patch doesn't work anymore. :-)
Comment #9
Jaza commentedThis patch is only relevant for 4.6 (pre-FAPI), which is no longer supported. Closing.