forms: make the cancel button work