I am trying to add a 'Cancel' button to a form, so if the user clicks it they exit the current form processing by being redirected to another URL, it is not working as expected.
in my form model:
<wd:action id="cancel" action-command="cancel">
<wd:label>Cancel</wd:label>
<wd:hint>cancels this form</wd:hint>
<wd:on-action>
<javascript>cancel();</javascript>
</wd:on-action>
</wd:action>in my form template:
<wt:widget id="cancel"/>
in my flowscript:
function cancel () {
cocoon.sendPage("screen/cancel", {message: "You cancelled"});
cocoon.log.info ("The user Cancelled");
}When I click the 'Cancel' button, I am returned to the form, instead of being redirected to the cancel screen, even though the log.info message appears.
Have I misunderstood something?
Thanks for any help
regards Jeremy
