When the number of values is set to unlimited, _flexifield_alter_multiple_values_form_process() runs the following line:
$aElement['#prefix'] = '<div id="'. $sId .'-items">';
This replaces the default #prefix value which contains two open div tags with only one open div tag. Since the default still prints out two close div tags, the result is unbalanced tags which can break the layout.
The simplest way to fix this is to add a plain-vanilla open div tag to the new value for #prefix. For example:
$aElement['#prefix'] = '<div><div id="'. $sId .'-items">';
I have tested the aboveon a site where the layout was breaking, and it successfully fixed the problem.
The line in question is line 89 of flexifield-widget.inc
Comments
Comment #1
effulgentsia commentedCCK 2.3 changed from using 2 divs to 1, and flexifield alpha5 requires CCK 2.3 or later, as documented on the project page. Please feel free to file a separate issue for making flexifield verify version dependencies and report appropriate error messages if they're not satisfied.