[development] Form API layout question...

Ivan Sergio Borgonovo mail at webthatworks.it
Fri Jan 18 17:54:59 UTC 2008


On Fri, 18 Jan 2008 12:31:14 -0500
Richard Morse <remorse at partners.org> wrote:

> Hi! I'm trying to create a set of checkboxes with an "other"
> option, so that it would look something like:
> 
> What is your favourite color?
> 
> [ ] Red
> [ ] Blue
> [ ] Maroon
> [ ] Other [_________________________________]
> 
> How can I place a field next to the other checkbox?

Writing your own form theming function.

themename_formid() (etc...)

Another simpler (for css wizards) way would be to define a style for
a particular field, put a div around it (#prefix, #suffix), subclass
form-item in your css eventually and made it so that you don't have a
"new line after "Other".

I'd advise to skip completely the checkbox [] Other and just leave
the open text field... if people write there... well it as if they
checked other... and the form is faster to fill even if a bit more
complex to do stats on it.


-- 
Ivan Sergio Borgonovo
http://www.webthatworks.it



More information about the development mailing list