It seems the "Cancel" button is behaving like a normal "Submit" button on the form after I select the "E-Mail" link. When I hit cancel it tries to validate the fields and I get validation errors.

I noticed this on line 106 of print_mail.inc:

<?php

  $form['btn_cancel'] = array(
    '#name' => 'cancel',
    '#type' => 'submit',
    '#value' => t('Cancel'),
  );
?>

Comments

jcnventura’s picture

Status: Active » Fixed

Hi,

Thanks for reporting this... The code is it was used to work fine in the first Drupal 6 releases, but it stopped working for some reason now.. Anyway, I have just ported the code that handled this case in the Drupal 5 module to the Drupal 6 version. This is now in the latest dev.

João

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

anrikun’s picture

Version: 6.x-1.3 » 6.x-1.9
Status: Closed (fixed) » Active

This bug is still present in 6.x-6.9.

anrikun’s picture

Version: 6.x-1.9 » 6.x-1.12

Sorry I meant 6.x-1.12!

By the way, the issue occurs when required fields are left empty.
Other validations like e-mail address validation are not carried out, as expected.

anrikun’s picture

Title: cancel button on email form » Cancel button on send by email form triggers required fields validation
jcnventura’s picture

Status: Active » Closed (fixed)

This newer problem is not exactly the same as in 2009.. Anyway it was fixed in #703296: Cancel shouldn't required field input.

anrikun’s picture

Great! Looking forward to next official release then.