[jifty-devel] Multiple-choice with checkbox

Stanislav Sinyagin ssinyagin at yahoo.com
Fri Sep 4 18:14:01 EDT 2009


> >> In regards to div/span layout: the choices should be arranged one above the

> >> other, otherwise it doesn't scale. In the application which I develop now,
> >> I extract a number of data element names from an external database, and then
> >> let the user choose all or some of them for further processing. The number 
> can be
> >> arbitrary, so they have to be arranged one on top of the other.
> >
> > 
> http://stackoverflow.com/questions/65849/how-to-insert-line-breaks-in-html-documents-using-css

actually the only difference between div and span is the default value of "display"
property. DIV has by default display:block, and SPAN is display:inline.

There's no other difference between these two elements, so there's very little sense 
in making a SPAN and then overriding its display type with CSS.

So, if it's thought to be vertically stacked, DIV is the right way to go. 
It can easily be converted back to inline by app-specific CSS, if needed.

thus, for now I'm not convinced your proposal is better.

Changing the Field::Checkbox behavior, such that if the "multiple" property is set, 
draw a group of checkboxes, seems reasonable. I can merge my "MultipleChoice" and the current 
"Checkbox" into one module. Still, the open question is how to display the items.
I still think that placing each item in a DIV, and having an embracing DIV is the 
right way to go.

More information about the jifty-devel mailing list