0

I have a Multistep node submission form with a couple of behaviors:

  • The user can save it, leave, come back, and edit it further. Paging between the steps as well as clicking "save" produces this behavior. (This is already implemented)
  • The user can also submit it by clicking "Done" on the last page. Currently all this does is save it the same way as the "Save" button, but it redirects to a display of the node that was just saved.
  • The desired behavior for the "Done" page is to "freeze" the node and prevent further editing by the user.

I'd like to use Workflow states or at the very least a permissions-altering Rule to remove the ability to edit the node upon clicking the "Done" button, but not upon clicking the "Save," "Next," or "Previous" buttons. Currently they all do the same thing (save the node) so as far as Triggers, Rules, etc. can tell, it's the same event.

How can I differentiate which button was pressed and use that to trigger a rule or workflow state?

0

You could use the Button Field module and rules.

  • 1
    Can you elaborate on this a little? Link-only answers aren't considered good ones here. – mpdonadio Jan 12 '13 at 19:47
0

I forgot about this until Community poked it.

I ended up getting around this by adding a custom submit handler that calls code that adds/removes the necessary roles on the $user and $node objects. I could have also added Rules hooks but it wasn't necessary.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.