Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Silverstripe form redirection question
- As far as I can see, there are two options here:
- A: Programmatically Create a Page
- 1. Render a page when the form is successfully completed (and email had been sent)
- 2. Page should not be included in the sitetree, or be accessible by anything other than a successful form submission – typing the URL should redirect back to the contact page.
- B: Limit Functionality of a Sitetree Page
- 1. Create a new page type for form success
- 2. Page should not be accessible via menus, search or by typing the URL – typing in the URL should redirect back to the contact page.
- (A) Has the advantage of possibly hooking into the routing rules meaning we can utilise a single class for rendering multiple ‘thank you’ pages without things getting messy in the routing rules.
- (B) Has the advantage of content being editable in the same way as other standard pages.
- I’m happy to go with either, but it depends on the complexity of the solutions using Silverstripe...
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement