Forum
Problem with perch forms
Having a bit of trouble with the forms app as it seems to have stopped storing responses though it is still processing them - emails are being sent fine.
I have a feeling that I broke it somehow when I moved from calling the form with perch_form() to perch_content()... I tried starting a new form by changing the form id in the template but have the same problem.
Any thoughts on how I should go about debugging this?
I've pasted the template below:
<h2><perch:content id="title" title="true" type="text" label="title" /></h2>
<perch:content id="introduction" type="textarea" size=m label="introduction" markdown />
<perch:form id="signup" method="post" app="perch_mailchimp perch_forms">
<div class="input">
<perch:label for="first_name">First name:</perch:label>
<perch:input id="first_name" type="text" label="First Name" required="true" mailer="FNAME" />
<perch:error for="first_name" type="required">Please add your first name</perch:error>
</div>
<div class="input">
<perch:label for="last_name">Last name:</perch:label>
<perch:input id="last_name" type="text" label="Last Name" required="true" mailer="LNAME" />
<perch:error for="last_name" type="required">Please add your last name</perch:error>
</div>
<div class="input">
<perch:label for="email">email:</perch:label>
<perch:input id="email" type="email" label="Email" required="true" mailer="email" />
<perch:error for="email" type="required">Please add your email address</perch:error>
<perch:error for="email" type="format">Please check your email address</perch:error>
</div>
<div class="input">
<perch:label for="performer">instrument or voice type:</perch:label>
<perch:input id="performer" label="Performer" type="text">
</div>
<div class="input">
<label for="submit"> </label>
<perch:input id="btnsubmit" type="submit" value="Send" />
<perch:input type="hidden" value="1" id="confirm" mailer="confirm_subscribe" />
<perch:input type="hidden" id="list" value="81f2b01cf0" mailer="list" />
</div>
<perch:success>
<div class="success">
<h3>Success!</h3>
<p>Your details have been submitted, thank you!</p>
</div>
</perch:success>
</perch:form>
Hello Owain,
The
size
attribute in theintroduction
field tag is missing the quotes (size="m"
).If you're using
perch_content()
, you also need to re-save the region when you make changes to the template.Thanks for spotting that but I’m not sure it would have had any effect on the form... the form is being processed by perch forms and is sending its data out in email, it’s just that the responses don’t appear in the admin interface... it says that there are 0 responses and that the last was in 1970...
Try turning on debug and then submitting the form. What does it output?
I have the debug settings on but where should I be looking for the output after I submit a form? On the Forms app page? Apologies if that's a stupid question!
Edit to add: In the database, the form exists with formID 5 but no responses are being written to perch3_forms_responses...
Oh, and it still both sends me an email with the correct template and the Mailchimp app processes the form properly...
You should be looking for the output on your page after submitting the form.
Ah, sorry... I had debug turned on but had never added the function to any of my pages - was only looking in the admin interface.
Here's the output (with some errors)
It looks like your server has an IPv6 address, which is causing issues. You should be able to fix it with:
This solved the problem - many thanks...