Introduction
When you create a modern form using Ultimate Forms, you have a variety of ways to control what happens when a user saves or cancels the form. The default behavior is to return back to the list, but in some scenarios, you might want to change that. For example, you might want to show the created item in a Display form or redirect to some custom "Thank you" page.
Wealth of Possibilities
Let me explore the possibilities with you, to help you create forms that precisely match your needs.
First, there are two types of redirects on the form. One controls the global redirect, for example, when saving the form from the toolbar or default Save buttons. The other one is attached to a specific button on the form, so for example, you can have both Save and Save and Edit buttons and you let users choose what they want to do.
For the global redirects, you have several options to choose from:
- Default - just preserves the default behavior of returning to the list
- Display - shows the added/updated item in a Display form.
- Edit - shows the added/updated item in an Edit form.
- New - opens a New form
- Custom - redirects to a custom URL that you provide.
As the latest addition, you can now specify separate redirects for Save and Cancel events, so a user can be redirected to different place depending on whether or not the item was saved.
When you added buttons to your form, you have several options to choose from in terms of what the button does.
There are two types of Save-related buttons, regular Save and Action and Save. The regular Save button can perform just the save operation and rely on the global redirect settings, or it can perform its own redirect to Edit or New forms. Action and Save button first performs an action on the form (automatically sets column values based on functions and calculation results). It can also optionally redirect to Edit or New form. Button redirects always take precedence over global redirects. Of course, there are also other button types that are not related to saving the item, such as Action (just sets column values, but doesn't save), Trigger action (triggers a varierty of backend actions, such as communicating with line-of-business applications) or even buttons executing custom scripts.
Conclusion
The idea behind all these options is provide you with the most versatile toolkit that allows you to build just the forms you need!