Forum

Thread tagged as: Question, Problem, Forms

Form not submitting successfully?

I have followed the video tutorial for installing and adding a form to my site but when I enter some details in the form and submit there is no success message, change in URL or any sign of the submission in the Form section of the admin.

So this were the steps I took..

  • Downloaded Forms App and put the perch_forms folder into perch > addons > apps
  • Added the Forms app to the apps.php - perch > config > apps.php so that currently looks like this...
<?php
    $apps_list = array(
        'content', 
        'categories',
        'perch_blog',
        'perch_forms',
    );

I've then the following code in place where I want the form to appear on my page...

<?php perch_content('Contact Form'); ?>

and created the form template - contactform.html...

<h1 id="go_to_submit"><a href="/">Submit</a></h1>

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

<div class="input">
<perch:input type="type" id="site_name" label="site_name" placeholder="Website Name:" autocomplete="off" required="true"/>
<perch:error for="name" type="required">Please add the name of the website</perch:error>
</div>

<div class="input">
<perch:input type="url" id="site_url" label="site_name" placeholder="Website URL:" autocomplete="off" required="true"/>
<perch:error for="name" type="required">Please add the URL of the website</perch:error>
</div>

<div class="input">
<perch:input type="textarea" id="site_credits" label="site_credits" placeholder="Credits:" autocomplete="off" required="true" />
<perch:error for="message" type="required">Please add a credit</perch:error>
</div>

<div class="input">
<perch:input type="email" id="email" label="email" placeholder="Your Email:" autocomplete="off" required="true" /><perch:error for="email" type="format">Please check your email address</perch:error>
</div>

<div>
  <perch:input type="submit" id="submit" value="Send" />
</div>

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

So after all that the field showed up in the admin so I added my Submission thank you message and then refreshed the page where the complete form shows up but when I complete all the fields and click submit nothing happens.

I think I followed all the steps correctly, can you see where I'm going wrong?

Thanks again

David Springate

David Springate 0 points

  • 7 years ago
Drew McLellan

Drew McLellan 2638 points
Perch Support

What do you mean by "nothing happens"?

I said above...

'when I enter some details in the form and submit there is no success message, change in URL or any sign of the submission in the Form section of the admin.'

Drew McLellan

Drew McLellan 2638 points
Perch Support

Does the post actually happen?

If so, can you add debug to the page and let me know what it outputs after posting?

Do you not need to action the post to make it work?

Thanks for your help, I overlooked that I'd given two perch inputs the same label which after changing, the form worked as it should.

Sorry for wasting your time, thanks again

Drew McLellan

Drew McLellan 2638 points
Perch Support

No problem.