Forum OpenACS Q&A: Re: How do I add different custom buttons in edit and new mode with ad_form?

You could also try and dynamically add  "-cancel_url {$return_url} -cancel_label {Done}" if the form is being edited. Or, rather, you may take advantage of the fact that if "cancel_url" is the empty string the button will vanish ...

But Dave's suggestion may be better.

BTW, we (all developers) seem to normally use the cancel_url to abort form input and redirect to some (arbitrary/non-generalized/unpredictible) url. The impression I get, though, is that most sites seem to use a "Cancel" button to clear the form, i.e., redirect to the same page. Am I wrong here?

What should "Cancel" mean, generally speaking?

(You're of course entitled to use it in any way you want, Peter, I just think it's an interesting question 😉

/Ola