Forum

Thread tagged as: Forms

Forms - no submit button

Hi everyone,

I'm trying to sort out a very simple form - name, email, message, submit - all following the video examples on this site. I've installed the forms app and created and saved a form template into perch/templates/content.

However, the form isn't display any submit button. Also, I have 2 textarea end tags just before the submit.

I'm very new to Perch, it may only be a typo, however I have searched an unable to find any. Is there something I am missing.

Could somebody please try and help?

Thanks in advance, Craig

Craig Flood

Craig Flood 0 points

  • 7 years ago
Drew McLellan

Drew McLellan 2638 points
Perch Support

Could you show us your template?

Hi

Great thanks for getting back to me.

<h2><perch:content id="heading" type="text" label="Heading" required="true" title="true" /></h2>
<perch:form id="form-contact" method="post" app="perch_forms" role="form">
    <div class="input">
        <perch:label for="name">Your name:</perch:label>
        <perch:input id="name" type="text" required="true" label="Name" />
    </div>
    <div class="input">
        <perch:label for="email">Your email:</perch:label>
        <perch:input id="email" type="email" required="true" label="Email" />
    </div>
    <div class="input">
        <perch:label for="message">Your message:</perch:label>
        <perch:input type="textarea" id="message" required="true" label="Message" />
    </div>
    <perch:input type="submit" id="submit" value="Send message" />

    <perch:success>
        <div class="alert success">
            <perch:content id="success" type="textarea" label="Thank you message" editor="redactor" html="true" />
        </div>
    </perch:success>
</perch:form>
Drew McLellan

Drew McLellan 2638 points
Perch Support

That looks like it should work. Have you checked to see if the submit button appears in the the HTML source?

No it doesn't, I get 2 closing </textarea> tags too.

<form id="form1_form-contact" action="/contact.php" method="post" role="form">
                    <div class="input">
                        <label for="form1_name">Your name:</label>
                        <input id="form1_name" name="name" type="text" required="required" />
                    </div>
                    <div class="input">
                        <label for="form1_email">Your email:</label>
                        <input id="form1_email" name="email" type="email" required="required" />
                    </div>
                    <div class="input">
                        <label for="form1_message">Your message:</label>
                        <textarea id="form1_message" name="message" cols="30" rows="4" required="required"></textarea></textarea>
                    </div>



                </form>
Drew McLellan

Drew McLellan 2638 points
Perch Support

Have you re-saved the content region since making changes to your template? The template works as expected here.

Thanks Drew

Feel a little silly now - works perfect.