We are transitioning over to a new forum platform. Please post new issues there. Existing threads will be dealt with here unless you choose to move them over. Visit the new forum

Forum

Thread tagged as: Problem, Error

From URL 404

I'm having a problem with perch forms... When you hit submit you get a 404 error. I'm 99.9% sure this is because the page in question has a capital letter in the URL. I don't really want to change the url because it's a rebuild and I want to keep all the url's the same as they were before if possible.

anyone know of a work around or fix

Stephen Wild

Stephen Wild 3 points

  • 4 years ago
Drew McLellan

Drew McLellan 2638 points
Perch Support

What do you have the form action set to?

<perch:form id="emailsaddress" method="post" app="perch_forms">

        <perch:input type="email" id="email" class="email" required="false" label="Email" placeholder="Email you@company.com" />
        <perch:input type="text" id="name" class="name" required="false" label="Name" placeholder="Name" />
        <perch:input type="text" id="number" class="number" antispam="honeypot" />
        <perch:input type="submit" id="submit" class="submit" value="&rsaquo;" />

    <perch:success>
        <perch:content id="success" type="textarea" label="Thank you message" textile="true" editor="markitup" />
    </perch:success>

</perch:form>
Drew McLellan

Drew McLellan 2638 points
Perch Support

You don't have a form action set - so it might be a good idea to set it.

I've done lots of perch forms before and never needed to.. not sure what to set it to, to get around this URL's with capital letters issue.

Drew McLellan

Drew McLellan 2638 points
Perch Support

You need to set it to the URL you want to submit the form to.

one of the forms (the one included above) is a shared form on the footer of every page, so that solution is not possible

Drew McLellan

Drew McLellan 2638 points
Perch Support

Why not?

Well it of course works and has fixed the other forms working on the URL's with capital letters, however doing it on the footer newsletter sign up (which is share across all pages) means whatever page they signup takes that back to the homepage (seemed like the most logical url to link the action to). this not really ideal but it is a fix so thanks for the help, and your patience.

Drew McLellan

Drew McLellan 2638 points
Perch Support

If you set it to something like a fragment identifier for the form's container, that would submit to the current page and under most circumstances reposition the browser's viewport to target the form to show any errors.