Forum
Trouble Setting Up Mailchimp Subscribe Form
This is my Diagnostics Report
Perch: 3.0.8, PHP: 7.0.22, MySQL: mysqlnd 5.0.12-dev - 20150407 - $Id: b5c5906d452ec590732a93b051f3827e02749b83 $, with PDO
Server OS: Linux, cgi-fcgi
Installed apps: content (3.0.8), assets (3.0.8), categories (3.0.8), perch_blog (5.6.1), perch_forms (1.9.1), perch_mailchimp (3.1)
App runtimes: <?php $apps_list = [ 'perch_blog', 'perch_forms', 'perch_mailchimp', ];
PERCH_LOGINPATH: /login
PERCH_PATH: /home/twhospitality/public_html/login
PERCH_CORE: /home/twhospitality/public_html/login/core
PERCH_RESFILEPATH: /home/twhospitality/public_html/login/resources
Image manipulation: GD
PHP limits: Max upload 128M, Max POST 128M, Memory: 512M, Total max file upload: 128M
F1: 0c66c2e1f82f9e0b7617b2cb8270f2c7
Resource folder writeable: Yes
DOCUMENT_ROOT: /home/twhospitality/public_html
HTTP_HOST: www.twhospitality.com
REQUEST_URI: /login/core/settings/diagnostics/
SCRIPT_NAME: /login/core/settings/diagnostics/index.php
Debug
Debug Message - Perch 3.0.8
[1] SELECT u.*, r.* FROM perch3_users u, perch3_user_roles r WHERE u.roleID=r.roleID AND u.userEnabled=1 AND u.userID=1 AND u.userHash='8d263d52aa25021c355bb03e782c1b92' LIMIT 1
UPDATE perch3_users SET userHash='8f25c47d833ac842bd6a96a5354ec1f4' WHERE userID='1'
[42] SELECT p.privKey FROM perch3_user_privileges p
[31] SELECT settingID, settingValue, userID FROM perch3_settings WHERE userID=1 OR userID=0 ORDER BY userID ASC
[10] SELECT itemValue FROM perch3_menu_items WHERE itemType='app'
[1] SELECT * FROM perch3_menu_items WHERE itemActive=1 AND itemType='menu' AND parentID=0 ORDER BY itemOrder ASC LIMIT 0, 1
[5] SELECT mi.*, p.privKey FROM perch3_menu_items mi LEFT JOIN perch3_user_privileges p ON mi.privID=p.privID WHERE mi.itemActive=1 AND mi.parentID=1 ORDER BY mi.itemOrder ASC
[1] SELECT itemTitle FROM perch3_menu_items WHERE itemType='app' AND itemValue='settings' LIMIT 1
[1] SELECT * FROM perch3_menu_items WHERE itemActive=1 AND itemType='menu' AND parentID=0 ORDER BY itemOrder ASC LIMIT 1, 10
[2] SELECT mi.*, p.privKey FROM perch3_menu_items mi LEFT JOIN perch3_user_privileges p ON mi.privID=p.privID WHERE mi.itemActive=1 AND mi.parentID=2 ORDER BY mi.itemOrder ASC
File: /core/settings/modes/diagnostics.post.php
Queries: 11
Memory: 2.26
subscribe.html template
<div class="row">
<perch:form id="subscribe" app="perch_mailchimp" double-optin="true">
<perch:success>
<p>Thank you!</p>
</perch:success>
<div class="six columns" style="padding-right:15px;">
<div>
<perch:label for="firstname">First name</perch:label>
<perch:input id="firstname" required="true" type="text" mailer="FNAME" />
<perch:error type="required" for="firstname">Required</perch:error>
</div>
</div>
<div class="six columns">
<div>
<perch:label for="lastname">Last name</perch:label>
<perch:input id="lastname" required="true" type="text" mailer="LNAME" />
<perch:error type="required" for="lastname">Required</perch:error>
</div>
</div>
<div class="twelve columns">
<div>
<perch:label for="email">Email</perch:label>
<perch:input id="email" required="true" type="email" mailer="email" />
<perch:error type="required" for="email">Required</perch:error>
</div>
<div>
<perch:input type="submit" value="Submit" id="btnsubmit" />
<perch:input type="hidden" value="1" id="confirm" mailer="confirm_subscribe" />
<perch:input type="hidden" id="twh" value="329357cdb1" mailer="list" />
</div>
</div>
</perch:form>
</div>
Page Subscription Form is on its at /news/employees.php
<?php include('../login/runtime.php'); ?>
<?php
perch_layout('global.header', array(
'blog-post' => true
));
?>
<div class="pagebanner-news"> </div>
<section class="twwhite pd-40">
<div class="container">
<div class="row" style="display:block">
<div class="twelve columns">
<h1>Texas Western's Employee News</h1><br>
<div class="primary-content">
<?php perch_blog_custom([
'section' => 'employees',
]); ?>
</div>
</div>
</div>
</div>
</section>
<section class="twltgrey pd-20">
<div class="container">
<div class="row" style="display:block">
<div class="six columns">
<?php perch_mailchimp_form('forms/subscribe'); ?>
</div>
</div>
</div>
</section>
<?php perch_layout('global.footer'); ?>
The Form displays....the mailchimp stuff looks to be in order I installed without any issues. But when I submit the page just refreshes and nothing is submitted to mailchimp or perch.
Please help! It seems I am always missing something small!
Hello Brittany,
You seem to be using
id="twh"
instead ofid="list"
That made no difference
My bad. I forgot about the
mailer
attribute!Have you added your API key to the Perch Settings page? Have you been able to import/sync data through the MailChimp app page in the control panel? Is the website on a live server?
Yes I've added the API key.
I had nothing to import, so I have not tried. But the list I created in mailchimp is on perch.
Yes, it's on a live server.
Ok it seems you've successfully connected your Mailchimp account to your Perch website.
Not sure what else to suggest. Hopefully Drew/Rachel or other Perch developers will be able to help.
Adding the
action
attribute to your form might make a differenceThat worked! Thank you!