Drupal 7 - Add a cancel button on node forms (How to add a cancel button on node form?)

The following code from the "example.module" will help you  to add the cancel button to any node form.


  1. Really helpful. Thank you. I an getting

    Notice: Undefined index: destination in example_form_cancel().

    Do you know why??

  2. You can use isset() to avoid the notice, like this:

    $url = isset($_GET['destination']) ? $_GET['destination'] : 'choose/your/path';


Post a Comment

Popular Posts