Hi, is there a way to only use multistep for adding new content, like a content wizard? But show the full form when regularly editing?

Comments

xurizaemon’s picture

Category: feature » support

Try something like this in your hook_form_alter() - adjust to suit.

This assumes you set status=1 when completed, and you are editing page type.

  switch ($form_id) {
    case 'page_node_form':
      if (arg(2) == 'edit' && isset($form_state['node'])) {
        // Edit mode. If status=1 (published) then no multistep.
        if ($form_state['node']->status) {
          unset($form['#multistep']);
        }
      }
      break;
  }

Hmm ... its not complete tho, doesn't save. Will update if I get it stable :)