Iam quiet stuck on this, so i though i ask here:
Appraoch 1:

$s = array('want_form' => true);
$form += ctools_build_form('form1', $s);
$form += ctools_build_form('form2', $s);
$form['#submit'][] = 'method1';
$form['#submit'][] = 'method2';
return drupal_render('form1',$form);

In this case, only form1_submit() and form1_validate() is exectured on submit, not method1 / method2. It always depends on the id of drupal_render.
I cant see a simple way getting this to work actually. The workarround i have chosen is creating a new form
Appraoch 2:

function form3() {
  $form = array();
  $form += form1();
  $form += form2();
}

function form3_submit($f, &$s) {
  form1_submit($f, $s);
  form2_submit($f, $s);
  foo_submit($f, $s);
}

a huge downside of appraoch 2 is not only, that you have to define those wrapper submit / validate functions, but esp. that from_alter hooks are not called on form1 and form2.

Do i muss something here? ctools_process_form is not the right approach and iam currently not sure how this would be accomplished using Approach 1.

Comments

japerry’s picture

Issue summary: View changes
Status: Active » Closed (outdated)

Closing this issue as outdated as Drupal 6 ctools is not supported. If this issue is relevant for Drupal 7, feel free to re-open and mark for Drupal 7 (or 8)