Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

We're retiring the forums!

The SilverStripe forums have passed their heyday. They'll stick around, but will be read only. We'd encourage you to get involved in the community via the following channels instead:

All other Modules /

Discuss all other Modules here.

Moderators: martimiz, Sean, Ed, biapar, Willr, Ingo, swaiba

UserForm in FancyBox - Completion Redirect

Go to End

3 Posts   1518 Views


Community Member, 110 Posts

27 September 2013 at 10:04am


So I have a form created with the UserForm Module that opens in a light box. That part is working fine. After a user fills out the form and hits submit, they get redirected to a different page. I know this is triggered by:
return $this->redirect($this->Link() . 'finished' . $referrer); (Ln 938 of UserDefinedForm.php)

On that "finished" page they see the correct completion message. What I really want to happen is for that completion message to appear inside of the lightbox. Ideally the form would disappear and they would see the completion message.

Any suggestions on how to go about this would be great.

Thank you!



Forum Moderator, 5523 Posts

28 September 2013 at 5:07pm

You'll need to submit the form in the popup through javascript and load the resulting page. A plugin like gives a clean way to submit the form and handle the result.


Community Member, 110 Posts

1 October 2013 at 2:34am

Willr - Excellent! Thank you for your reply. I'll give this a try. Since my original post, I did discover that if I set fancybox's content type to iframe I get the entire sequence (form > success message) within the popover, but I would prefer to make the ajax version work.

Thanks for your help!