This topic is locked
[SOLVED]

 Showing cancel button on add form

5/10/2018 8:28:37 AM
ASPRunner.NET General questions
Pete K author

What determines when the "Cancel" button shows up on an add / edit form? I want users to be able to cancel and return to the previous page. This is especially important since there is no menu on that page by default. I assume this is what Cancel would do. I see it in the editor but it doesn't show up on the rendered page. I could add a custom button to do this but I'm curious as to where the logic resides that does the show/hide on the page buttons (also Reset) and if I can override it. Anyone know?

MK Frank R 5/10/2018

I don't think you are going to see that code inside the tool - only inside the generated code.
Don't All Add and Edit pages have Cancel buttons? Did you do any custom modifications to the page in question? You might want to try a page Reset and a full Rebuild.

admin 5/10/2018

What you see in Visual Editor on the Add page is a combination of all possible buttons that ever can appear on the Add page. By default on a regular Add page you will see 'Save' and 'Back to List'. 'Back to List' button is your Cancel button.
When you use a Lookup Wizard with 'Add new on the fly' option enable then you will see 'Save' and 'Cancel' buttons. It makes sense because there is no list page. The same thing should happen when you do not have a List page and proceed to Add page directly from the menu though not clear where 'Cancel' button should take you in this case.

Pete K author 5/10/2018



What you see in Visual Editor on the Add page is a combination of all possible buttons that ever can appear on the Add page. By default on a regular Add page you will see 'Save' and 'Back to List'. 'Back to List' button is your Cancel button.
When you use a Lookup Wizard with 'Add new on the fly' option enable then you will see 'Save' and 'Cancel' buttons. It makes sense because there is no list page. The same thing should happen when you do not have a List page and proceed to Add page directly from the menu though not clear where 'Cancel' button should take you in this case.


Thanks, Sergey. In my case, the workflow would not make sense with Back to List so I hid it, but you answered my question. I will unhide it and change the caption and URL to do what I want it to do. Thanks.