(créated same issue in for Multistep : https://drupal.org/node/2266067)
I'm using multistep and conditional fields in a large form.
The conditions fields work only if the dependees and the dependent are in a same 'step'.
This is a fatal limitation in my case.
I need to have dependees and dependents on different steps.
I bypassed the problem by making a change in multistep to hide instead of not generating other steps :
In the function multistep_field_group_pre_render() I changed line 281 :

line 281 : $prefix = '<div id="multistep-' . $group->group_name . '">';

By :

$displayDiv = ' ';
if (!$access){
$displayDiv = ' style="display:none" ';
$access = true;
}
$prefix = '<div id="multistep-' . $group->group_name . '" '.$displayDiv.'>';

it works with small form, but not on large forms : certain conditions do not work (on the same form without multistep (flat form) it's work)

Comments

drupalmoff’s picture

I too have this issue, and the above fix works. A little improvement I made it on it, however, was to only 'hide instead of remove' the previous steps, as I can assume that there will not be a field dependent on a future step.

if (!$access){
  $displayDiv = ' style="display:none" ';
  $access = true;
}

became

if (!$access){
  $groups = multistep_get_steps($group->bundle);
  $stepGroup = $groups[$step];
  // show it if it's a previous step
  $access = $group->weight <= $stepGroup->weight;
  $displayDiv = ' style="display:none" ';
}

Not sure if it fixes any problems, but just produces a cleaner output

fox_01’s picture

Is there any update?