Forum

Thread tagged as: Question, Runway, Forms

Submitted form goes to default route

Hi,

I've got a Perch Form on a Perch Runway site, which has two urls (depending on language) - domain.com/form and domain.com/en/form

When the form is submitted it changes back to the default url - domain.com/form.

Is there any way to get it to stay on the visited url?

Thanks,

Rob

Robert Chambers

Robert Chambers 0 points

  • 6 years ago
Drew McLellan

Drew McLellan 2638 points
Perch Support

Are you setting the action at all?

No, this is the form tag I'm using: <perch:form id="contact" method="post" app="perch_forms">

Drew McLellan

Drew McLellan 2638 points
Perch Support

I think you should be able to set it with PerchSystem::set_page(...)

PerchSystem::set_page(...) gave me duplicate pages in the CMS.

I ended up solving it by passing the current url to the form template and setting that as the form action.

Drew McLellan

Drew McLellan 2638 points
Perch Support

Ok, great.