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.

All other Modules /

Discuss all other Modules here.

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

User Defined Forms redirect hides content


Reply


4 Posts   413 Views

Avatar
kindlemanwill

Community Member, 69 Posts

16 January 2014 at 2:08pm

Hi, I have set up a contact form using UserDefinedForms module. All works as expected.

Is there a way to not replace the $Content when a user defined form submits? Ideally, a flash message would be configurable rather than replacing the page content.

Thanks

W

Avatar
Willr

Forum Moderator, 5513 Posts

16 January 2014 at 8:29pm

https://github.com/silverstripe/silverstripe-userforms/blob/master/code/model/UserDefinedForm.php#L1080

Add a custom ReceivedFormSubmission.ss to your theme and enter whatever variables such as $Content in there.

Avatar
kindlemanwill

Community Member, 69 Posts

17 January 2014 at 2:22pm

Awesome, thanks!

Avatar
jallen

Community Member, 1 Post

10 September 2014 at 11:18pm

Thanks for your information. I'm in struggling that the finished message showed blank. It seems the finished page still rendered with my UserDefinedForm.ss instead of ReceivedFormSubmission.ss. One of my trial is to add "render" at the end of finished() like below:

return $this->customise(array(
         'Content' => $this->customise(array(
            'Submission' => $submission,
            'Link' => $referrer
         ))->renderWith('ReceivedFormSubmission'),
         'Form' => '',
      ))->renderWith(array('ReceivedFormSubmission','Page'));

it can make the page rendered with ReceivedFormSubmission.ss but still shows nothing, I'm thinking the value of $OnCompleteMessage in ReceivedFormSubmission.ss is correctly got.

Would be thankful if any suggestion provided.