Guys,

I'm trying to learn the Drupal API, but I'm struggling. I'd like to *not* show the workflow section in the node/add and node/edit forms, and show it (when content exists) only as a tab on the node (node/[node:nid]/workflow).

Can someone advise on how to do this?

Note: I realize that with 5.x-2.x, this is easy, but we are stuck with 5x.-1.2 for now. We also have to turn on the administer content types permission, which makes these forms appear in node/add and node/edit.

Thanks,

TC

Comments

ifbyphone1’s picture

Status: Closed (fixed) » Active

Answering my own question. I snuck a peek at how the form portion could be turned off selectively in the 5.x-2.x version. I simply changed the code as indicated below:

code removed to prevent confusion. See below.

ifbyphone1’s picture

Status: Active » Closed (fixed)

Correcting myself above, and setting this as fixed when finished.

If you don't want workflow to appear on the standard form for node/x/edit or node/add, then you must delete function workflow_form_alter entirely. The workflow tab will still work as expected. Using my code above will screw things up, but deleting the function is fine.

To reiterate, this is for 5.x-1.2

johnv’s picture

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

For some reason, this issue is back to active, probably after the upgrade of d.o. to D7