Forum

Thread tagged as: Question, Problem, Forms

Contact Form Problems

Hi

I've set up perch forms for the 1st time. The error messaging works fine on my MAMP testing server, however it doesn't work on my live site. Do you have any ideas what I'm doing wrong?

This is my code

<perch:form id="form-contact" method="post" app="perch_forms" role="form">
<form id="contactform" action="#" role="form"> 

<perch:error for="all" type="general">
<div class="alert_error">
    <perch:content id="error" type="text area" label="General Error Message" textile="true" editor="mark-up" />
</div>
</perch:error>
<br />

    <table>
        <tr>
            <th><perch:label for="name">Name:</perch:label></th>
            <td><perch:input id="name" type="text" required="true" label="Name" /></td>
             <perch:error for="name" type="required"><p class="about-error">Please add your name</p></perch:error>
            </tr>
        <tr>
            <th><perch:label for="email">Email:</perch:label></th>
            <td><perch:input id="email" type="email" required="true" label="Email" placeholder="you@company.com" /></td>
            <perch:error for="email" type="required"><p class="about-error">Please add your email address</p></perch:error>
            <perch:error for="email" type="format"><p class="about-error">Please enter a valid email address</p></perch:error>
        </tr>   
        <tr>
            <th><perch:label for="message">Message:</perch:label></th>
            <td><perch:input type="textarea" id="message" rows="10" cols="48" required="true" label="Message"></textarea></td>
            <perch:error for="message" type="required"><p class="about-error">Please add a message</p></perch:error> 
        </tr>
        <tr>
            <th></th>
            <td><perch:input type="submit" id="submit" value="Send" /></td>
        </tr> 
    </table>     
    <perch:success>
        <div class="alertsuccess">
            <perch:content id="success" type="textarea" label="Thank You Message" textile="true" editor="markitup" />
        </div>
    </perch:success>
</perch:form>    

Many thanks

Ben Langridge

Ben Langridge 0 points

  • 7 years ago
Rachel Andrew

Rachel Andrew 394 points
Perch Support

There are several errors in this form.

You have a perch form and a regular form tag. The Perch form tag becomes a form tag so you need to remove your additional ones.

You have a tag type="text area" which is incorrect.

You have editor="mark-up" which is incorrect unless you have created your own editor called mark-up.

Take a look at the docs again and make sure your tags are as described in the docs.

Thanks Rachel - those 3 fixes sorted it.