I've just tried this module for the first time on a new site we're developing and I've come across a mistake in the maths for calculating column widths in the following 2 lines -

  $column_height = max($min_height, ceil(count($element['#options']) / $element['#multicolumn']['width']));
  $column_width = ceil(count($element['#options']) / $column_height);

In our setup we've got 24 values that I want arranged in 7 columns (they correspond to days of the week). The first line rounds up 24/7 from 3.428... to 4. The second line then calculates the column width as 24 / 4, which is 6! Thus there's no way to get 7 columns. Surely this needs to not round up $column_height if greater than minimum, at least for calculating $colum_width.

If we do use this module, I'll try and provide a patch for this. Haven't had time to see how this variable gets used elsewhere yet.

Comments

mattyoung’s picture

Give the 'dev' version a try. It should work the way you want now. Please test in various combination of width, checkboxes/radios count, column major and row major options, try with CCK fields. I have revamped how the calculation is done inside.

mattyoung’s picture

Status: Active » Needs review

.

mattyoung’s picture

Version: 6.x-1.4 » 6.x-1.5
Status: Needs review » Fixed

~

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.