I understand that it's not within the scope of ds_forms to allow for multiple form modes for a bundle, would it be up for consideration to provide a hook, perhaps within ds_forms_preprocess_ds_forms_custom_form so that $layout can be altered before passing it to ds_forms_render_region?

Comments

chrisrockwell created an issue. See original summary.

chrisrockwell’s picture

I see now that moving within an alter hook is no trivial task. In my specific use case I only need to move one group, so with a patched drupal_alter I can use:

function hook_ds_forms_layout_alter(&$layout) {
  $layout['settings']['fields']['group_sas_details'] = 'right';
  $layout['settings']['regions']['right'][] = 'group_sas_details';

  $sas_details_key = array_search('group_sas_details', $layout['settings']['regions']['footer']['group_sas_details']);
  unset($layout['settings']['regions']['footer'][$sas_details_key]);
}

Managing complicated context moves could be a bear. Anyway, if the maintainers would consider this feature I'll put together a proper patch that includes a ds_forms.api.inc file.

aspilicious’s picture

Status: Active » Closed (won't fix)

I'm not adding any new features to D7.