Forum

Thread tagged as: Question, Forms

Two forms on the same page

I'm adding Perch to a site, and wanting to replace the custom form script with Perch forms.

The site has two forms on the same page - how can I handle "Success"? I want the success page to just be a success message, regardless of which form is submitted. I don't mind if it's on the same page or a different page, but I just want Perch to process the submitted form and then show only a success message. Any ideas/suggestions?

Thanks.

Paul Bell

Paul Bell 0 points

  • 5 years ago
Drew McLellan

Drew McLellan 2638 points
Perch Support

I don't think it should be any different however many forms are on the page.

If there are two forms on the page, does it show the "<perch:success>" content for BOTH forms regardless of which is submitted? Thanks, Drew.

Drew McLellan

Drew McLellan 2638 points
Perch Support

No, it should only show the success message for the submitted form. Are you seeing it show both success messages?

No - what I'd like to see is a common success message, regardless of which form I submit. I want my "success" page not to have the form I didn't submit on it. Is there a way to do that?

Could I somehow test for a value of a POST variable and hide the other form based on that?

Drew McLellan

Drew McLellan 2638 points
Perch Support

What sort of form is it? For the Forms app, there's a redirect option in the form settings. You could redirect to your success page.

Yes, it's the forms app. That's what I need - thanks. I assume both forms could redirect to the same success/thanks page.