Forum

Thread tagged as: Problem, MailChimp

Custom Fields Not Going through to MailChimp

I am using the mailchimp app in runway to create a sign up form. The sign up process is working - the email address is submitted and the please confirm your subscription email is sent. When the email address is confirmed not all fields from the form are showing up in mailchimp. FFSIGNUP does not have a value in mailchimp even though the form field has a value.

                        <div class="row text-center">

                            <div class="col-sm-12 text-center  space-bottom-medium">
                                <div class="form-contact-us clearfix">

                                    <div class="row">
                                        <div class="col-md-6 col-md-offset-3">
                                            <div class="row">
                                                    <perch:form app="perch_mailchimp" method="post" id="mc-embedded-subscribe-form" name="mc-embedded-subscribe-form" double-optin="true" class="validate" prefix="none">
                                                        <div id="mc_embed_signup_scroll">
                                                    <div class="mc-field-group col-sm-6">
                                                        <perch:input type="text" value="" name="FNAME" mailer="FNAME" class="validate-required" id="FNAME" placeholder="First Name *" required="true" />
                                                            <perch:error type="required" for="FNAME">Required field</perch:error>
                                                    </div>
                                                    <div class="mc-field-group col-sm-6">
                                                        <perch:input type="text" value="" name="LNAME" mailer="LNAME" class="validate-required" id="LNAME" placeholder="Last Name *" required="true" />
                                                        <perch:error type="required" for="LNAME">Required field</perch:error>
                                                    </div>
                                                    <div class="mc-field-group col-sm-12">
                                                        <perch:input id="email" required="true" class="validate-required" type="email" mailer="email" placeholder="Email *" />
                                                        <perch:error type="required" for="email">Required field</perch:error>
                                                    </div>
                                                    <div class="mc-field-group col-sm-4">
                                                        <perch:input type="text" value="" name="CCITY" mailer="CCITY" class="validate-required" id="CCITY" placeholder="City *" required="true" />
                                                        <perch:error type="required" for="CCITY">Required field</perch:error>
                                                    </div>
                                                    <div class="mc-field-group col-sm-4">
                                                        <perch:input type="text" value="" name="SSTATE" mailer="SSTATE" class="validate-required" id="SSTATE" placeholder="State *" required="true" />
                                                        <perch:error type="required" for="SSTATE">Required field</perch:error>
                                                    </div>
                                                    <div class="mc-field-group col-sm-4">
                                                        <perch:input type="text" value="" name="PPCODE" mailer="PPCODE" class="validate-required" id="PPCODE" placeholder="Zip/Postal Code *" required="true" />
                                                        <perch:error type="required" for="PPCODE">Required field</perch:error>
                                                    </div>
                                                    <div class="hidden">
                                                            <perch:label class="hidden" for="company">If you can see this field don't complete it</perch:label>
                                                            <perch:input type="text" id="company" antispam="honeypot" class="hidden" />        
                                                    </div>
                                                        <div class="col-md-12 col-md-offset-0 col-sm-4 col-sm-offset-4 text-center"><perch:input input type="submit" value="Sign Up" name="subscribe" id="mc-embedded-subscribe" class="button btn btn-primary btn-filled" /></div>

                                                        <perch:input type="hidden" value="1" id="confirm" mailer="confirm_subscribe" />
                                                        <perch:input type="hidden" id="list" value="REMOVED BY ME" mailer="list" />

                                                        <perch:input type="hidden" escape="true" value="<perch:content id="pageName" />" mailer="FFSIGNUP" id="FFSIGNUP" name="FFSIGNUP" />

                                                        </div>

                                                        <div class="col-sm-12">

                                                        <perch:success><p id="success-message" class="bg-success show">Thanks for signing up, you should have a confirmation email in your inbox.</p></perch:success>
                                                        <perch:error><p id="error-message" class="bg-danger show">There seems to be an issue signing you up, please check all fields are enter correctly or try again later.</p></perch:error>

                                                        </div>

                                                        <div class="col-sm-12"><p class="indicates-required text-center"><span class="asterisk">*</span> indicates required</p>
                                                        <p>We <strong>never</strong> share emails with third parties</p></div>

                                                    </perch:form>


                                            </div>

                                        </div>
                                    </div>

                                </div><!--end of photo form wrapper-->

                            </div>

                        </div><!--end of row-->
Paul Sturrock

Paul Sturrock 0 points

  • 5 years ago
Drew McLellan

Drew McLellan 2638 points
Perch Support

It should be passed through as part of the merge_fields argument to the create request.

If you turn debug on, what does it output?

Hi

That's what I thought. If I include the form to go to the perch forms app the FFSIGNUP field doesn't show in the details page of the forms app either.

Here is the page load debug

Debug Message
[24] SELECT p.pagePath, pr.routePattern, pr.routeRegExp, p.pageTemplate FROM perch2_pages p LEFT JOIN perch2_page_routes pr ON p.pageID=pr.pageID ORDER BY pr.routeOrder ASC, p.pagePath ASC
Matched page: /subscribe, so not using routes.
Using master page: /templates/pages/subscribe.php
[1] SELECT * FROM perch2_pages WHERE pagePath='/subscribe' LIMIT 1
Using template: /templates/pages/attributes/default.html
Using sub-template: /templates/pages/attributes/seo.html
Using sub-template: /templates/pages/attributes/facebook.html
Using sub-template: /templates/pages/attributes/twitter.html
[2] SELECT regionKey, regionHTML FROM perch2_content_regions WHERE regionPage='/subscribe' OR regionPage='*' ORDER BY regionPage DESC
[1] SELECT regionID, regionTemplate, regionPage, regionRev AS rev FROM perch2_content_regions WHERE regionKey='Subscribe Form' AND (regionPage='/subscribe' OR regionPage='*')
[1] SELECT * FROM ( SELECT idx.itemID, c.regionID, idx.pageID, c.itemJSON, idx2.indexValue as sortval FROM perch2_content_index idx JOIN perch2_content_items c ON idx.itemID=c.itemID AND idx.itemRev=c.itemRev AND idx.regionID=c.regionID JOIN perch2_content_index idx2 ON idx.itemID=idx2.itemID AND idx.itemRev=idx2.itemRev AND idx2.indexKey='_order' WHERE ((idx.regionID=13 AND idx.itemRev=5)) AND idx.itemID=idx2.itemID AND idx.itemRev=idx2.itemRev ) as tbl GROUP BY itemID, pageID, itemJSON, sortval ORDER BY sortval ASC
[1] Using template: /templates/content/do-subscribe.html
Debug Message
[24] SELECT p.pagePath, pr.routePattern, pr.routeRegExp, p.pageTemplate FROM perch2_pages p LEFT JOIN perch2_page_routes pr ON p.pageID=pr.pageID ORDER BY pr.routeOrder ASC, p.pagePath ASC
Matched page: /subscribe, so not using routes.
Using master page: /templates/pages/subscribe.php
[1] SELECT * FROM perch2_pages WHERE pagePath='/subscribe' LIMIT 1
Using template: /templates/pages/attributes/default.html
Using sub-template: /templates/pages/attributes/seo.html
Using sub-template: /templates/pages/attributes/facebook.html
Using sub-template: /templates/pages/attributes/twitter.html
[2] SELECT regionKey, regionHTML FROM perch2_content_regions WHERE regionPage='/subscribe' OR regionPage='*' ORDER BY regionPage DESC
[1] SELECT regionID, regionTemplate, regionPage, regionRev AS rev FROM perch2_content_regions WHERE regionKey='Subscribe Form' AND (regionPage='/subscribe' OR regionPage='*')
[1] SELECT * FROM ( SELECT idx.itemID, c.regionID, idx.pageID, c.itemJSON, idx2.indexValue as sortval FROM perch2_content_index idx JOIN perch2_content_items c ON idx.itemID=c.itemID AND idx.itemRev=c.itemRev AND idx.regionID=c.regionID JOIN perch2_content_index idx2 ON idx.itemID=idx2.itemID AND idx.itemRev=idx2.itemRev AND idx2.indexKey='_order' WHERE ((idx.regionID=13 AND idx.itemRev=5)) AND idx.itemID=idx2.itemID AND idx.itemRev=idx2.itemRev ) as tbl GROUP BY itemID, pageID, itemJSON, sortval ORDER BY sortval ASC
[1] Using template: /templates/content/do-subscribe.html
Request time: 0.157
Process time: 0.1554
Memory: 1.3848

And here is the form submit page load

Debug Message
[24] SELECT p.pagePath, pr.routePattern, pr.routeRegExp, p.pageTemplate FROM perch2_pages p LEFT JOIN perch2_page_routes pr ON p.pageID=pr.pageID ORDER BY pr.routeOrder ASC, p.pagePath ASC
Matched page: /subscribe, so not using routes.
Using master page: /templates/pages/subscribe.php
[20] SELECT DISTINCT settingID, settingValue FROM perch2_settings WHERE userID=0
[1] SELECT * FROM perch2_mailchimp_lists WHERE listMailChimpID='9bfcd454d4' LIMIT 1
Subscribing to: OXiGEN™ Newsletter
[1] SELECT * FROM perch2_pages WHERE pagePath='/subscribe' LIMIT 1
Using template: /templates/pages/attributes/default.html
Using sub-template: /templates/pages/attributes/seo.html
Using sub-template: /templates/pages/attributes/facebook.html
Using sub-template: /templates/pages/attributes/twitter.html
[2] SELECT regionKey, regionHTML FROM perch2_content_regions WHERE regionPage='/subscribe' OR regionPage='*' ORDER BY regionPage DESC
[1] SELECT regionID, regionTemplate, regionPage, regionRev AS rev FROM perch2_content_regions WHERE regionKey='Subscribe Form' AND (regionPage='/subscribe' OR regionPage='*')
[1] SELECT * FROM ( SELECT idx.itemID, c.regionID, idx.pageID, c.itemJSON, idx2.indexValue as sortval FROM perch2_content_index idx JOIN perch2_content_items c ON idx.itemID=c.itemID AND idx.itemRev=c.itemRev AND idx.regionID=c.regionID JOIN perch2_content_index idx2 ON idx.itemID=idx2.itemID AND idx.itemRev=idx2.itemRev AND idx2.indexKey='_order' WHERE ((idx.regionID=13 AND idx.itemRev=5)) AND idx.itemID=idx2.itemID AND idx.itemRev=idx2.itemRev ) as tbl GROUP BY itemID, pageID, itemJSON, sortval ORDER BY sortval ASC
[1] Using template: /templates/content/do-subscribe.html
Debug Message
[24] SELECT p.pagePath, pr.routePattern, pr.routeRegExp, p.pageTemplate FROM perch2_pages p LEFT JOIN perch2_page_routes pr ON p.pageID=pr.pageID ORDER BY pr.routeOrder ASC, p.pagePath ASC
Matched page: /subscribe, so not using routes.
Using master page: /templates/pages/subscribe.php
[20] SELECT DISTINCT settingID, settingValue FROM perch2_settings WHERE userID=0
[1] SELECT * FROM perch2_mailchimp_lists WHERE listMailChimpID='9bfcd454d4' LIMIT 1
Subscribing to: OXiGEN™ Newsletter
[1] SELECT * FROM perch2_pages WHERE pagePath='/subscribe' LIMIT 1
Using template: /templates/pages/attributes/default.html
Using sub-template: /templates/pages/attributes/seo.html
Using sub-template: /templates/pages/attributes/facebook.html
Using sub-template: /templates/pages/attributes/twitter.html
[2] SELECT regionKey, regionHTML FROM perch2_content_regions WHERE regionPage='/subscribe' OR regionPage='*' ORDER BY regionPage DESC
[1] SELECT regionID, regionTemplate, regionPage, regionRev AS rev FROM perch2_content_regions WHERE regionKey='Subscribe Form' AND (regionPage='/subscribe' OR regionPage='*')
[1] SELECT * FROM ( SELECT idx.itemID, c.regionID, idx.pageID, c.itemJSON, idx2.indexValue as sortval FROM perch2_content_index idx JOIN perch2_content_items c ON idx.itemID=c.itemID AND idx.itemRev=c.itemRev AND idx.regionID=c.regionID JOIN perch2_content_index idx2 ON idx.itemID=idx2.itemID AND idx.itemRev=idx2.itemRev AND idx2.indexKey='_order' WHERE ((idx.regionID=13 AND idx.itemRev=5)) AND idx.itemID=idx2.itemID AND idx.itemRev=idx2.itemRev ) as tbl GROUP BY itemID, pageID, itemJSON, sortval ORDER BY sortval ASC
[1] Using template: /templates/content/do-subscribe.html
Request time: 0.5893
Process time: 0.5891
Memory: 1.1217
Drew McLellan

Drew McLellan 2638 points
Perch Support

Can you try not setting a name attribute? You shouldn't need to do that on a perch:input tag, and I suspect it may be overriding the internal handling of the field aliases.

Hi

Thanks I have tried that and no joy.

If I submit the form to the perch_forms app the field or field value don't show in the details.

If I have a static value on the field (FFSIGNUP has a dynamic value using PerchSystem::set_var) then it shows up in the form submission - is it a problem with the dynamic field value? Is there a work around for this?

Static value

SELECT DISTINCT settingID, settingValue FROM perch2_settings WHERE userID=0
[1] SELECT * FROM perch2_forms WHERE formKey='mc-embedded-subscribe-form' LIMIT 1
[1] SELECT * FROM perch2_pages WHERE pagePath='/subscribe' LIMIT 1
INSERT INTO perch2_forms_responses(responseJSON,formID,responseIP,responseSpamData) VALUES('{\"fields\":{\"FNAME\":{\"attributes\":{\"type\":\"text\",\"value\":\"\",\"mailer\":\"FNAME\",\"class\":\"validate-required\",\"id\":\"FNAME\",\"placeholder\":\"First Name *\",\"required\":\"true\"},\"value\":\"Paul\"},\"LNAME\":{\"attributes\":{\"type\":\"text\",\"value\":\"\",\"mailer\":\"LNAME\",\"class\":\"validate-required\",\"id\":\"LNAME\",\"placeholder\":\"Last Name *\",\"required\":\"true\"},\"value\":\"Sturrock\"},\"email\":{\"attributes\":{\"id\":\"email\",\"required\":\"true\",\"class\":\"validate-required\",\"type\":\"email\",\"mailer\":\"email\",\"placeholder\":\"Email *\"},\"value\":\"paul@sixtyeightfeet.co.uk\"},\"CCITY\":{\"attributes\":{\"type\":\"text\",\"value\":\"\",\"mailer\":\"CCITY\",\"class\":\"validate-required\",\"id\":\"CCITY\",\"placeholder\":\"City *\",\"required\":\"true\"},\"value\":\"New York\"},\"SSTATE\":{\"attributes\":{\"type\":\"text\",\"value\":\"\",\"mailer\":\"SSTATE\",\"class\":\"validate-required\",\"id\":\"SSTATE\",\"placeholder\":\"State *\",\"required\":\"true\"},\"value\":\"NY\"},\"PPCODE\":{\"attributes\":{\"type\":\"text\",\"value\":\"\",\"mailer\":\"PPCODE\",\"class\":\"validate-required\",\"id\":\"PPCODE\",\"placeholder\":\"Zip\\/Postal Code *\",\"required\":\"true\"},\"value\":\"45678\"},\"confirm\":{\"attributes\":{\"type\":\"hidden\",\"value\":\"1\",\"id\":\"confirm\",\"mailer\":\"confirm_subscribe\"},\"value\":\"1\"},\"list\":{\"attributes\":{\"type\":\"hidden\",\"id\":\"list\",\"value\”:\”REMOVED BY ME\”,\”mailer\":\"list\"},\"value\”:\”REMOVED BY ME\”},\”FFSIGNUP\":{\"attributes\":{\"type\":\"hidden\",\"value\":\"test\",\"mailer\":\"FFSIGNUP\",\"id\":\"FFSIGNUP\"},\"value\":\"subscribe\"}},\"files\":[],\"page\":{\"id\":\"13\",\"title\":\"Subscribe to Drink OXiGEN\\u2122 Newsletter\",\"path\":\"\\/subscribe\",\"navtext\":\"Subscribe\"}}','5','::1','{\"fields\":{\"honeypot\":\"\"},\"environment\":{\"PHP_FCGI_CHILDREN\":\"4\",\"PWD\":\"\\/Applications\\/MAMP\\/fcgi-bin\",\"SHLVL\":\"0\",\"PHP_FCGI_MAX_REQUESTS\":\"200\",\"__CF_USER_TEXT_ENCODING\":\"0x1F5:0x0:0x0\",\"ORIG_SCRIPT_NAME\":\"\\/fcgi-bin\\/php7.0.8.fcgi\",\"ORIG_PATH_TRANSLATED\":\"\\/Users\\/paulsturrock\\/Google Drive\\/Work\\/Drink Oxigen\\/local website\\/perch\\/core\\/runway\\/start.php\",\"ORIG_PATH_INFO\":\"\\/perch\\/core\\/runway\\/start.php\",\"ORIG_SCRIPT_FILENAME\":\"\\/Applications\\/MAMP\\/fcgi-bin\\/php7.0.8.fcgi\",\"SCRIPT_NAME\":\"\\/perch\\/core\\/runway\\/start.php\",\"REQUEST_URI\":\"\\/subscribe\",\"QUERY_STRING\":\"\",\"REQUEST_METHOD\":\"POST\",\"SERVER_PROTOCOL\":\"HTTP\\/1.1\",\"GATEWAY_INTERFACE\":\"CGI\\/1.1\",\"REDIRECT_URL\":\"\\/perch\\/core\\/runway\\/start.php\",\"REMOTE_PORT\":\"51534\",\"SCRIPT_FILENAME\":\"\\/Users\\/paulsturrock\\/Google Drive\\/Work\\/Drink Oxigen\\/local website\\/perch\\/core\\/runway\\/start.php\",\"SERVER_ADMIN\":\"you@example.com\",\"DOCUMENT_ROOT\":\"\\/Users\\/paulsturrock\\/Google Drive\\/Work\\/Drink Oxigen\\/local website\",\"REMOTE_ADDR\":\"::1\",\"SERVER_PORT\":\"8888\",\"SERVER_ADDR\":\"::1\",\"SERVER_NAME\":\"drinkoxigen.dev\",\"SERVER_SOFTWARE\":\"Apache\",\"SERVER_SIGNATURE\":\"\",\"PATH\":\"\\/usr\\/bin:\\/bin:\\/usr\\/sbin:\\/sbin\",\"HTTP_COOKIE\":\"_ga=GA1.2.1914584887.1462894669; PHPSESSID=47b80b01779f3a547ae0fff102784b55; cmsa=1; viewedOuibounceModal=true\",\"HTTP_REFERER\":\"https:\\/\\/drinkoxigen.dev:8888\\/subscribe\",\"HTTP_USER_AGENT\":\"Mozilla\\/5.0 (Macintosh; Intel Mac OS X 10_11_6) AppleWebKit\\/601.7.7 (KHTML, like Gecko) Version\\/9.1.2 Safari\\/601.7.7\",\"HTTP_CONNECTION\":\"keep-alive\",\"CONTENT_LENGTH\":\"297\",\"HTTP_ORIGIN\":\"https:\\/\\/drinkoxigen.dev:8888\",\"CONTENT_TYPE\":\"application\\/x-www-form-urlencoded\",\"HTTP_ACCEPT_LANGUAGE\":\"en-us\",\"HTTP_CACHE_CONTROL\":\"max-age=0\",\"HTTP_ACCEPT_ENCODING\":\"gzip, deflate\",\"HTTP_ACCEPT\":\"text\\/html,application\\/xhtml+xml,application\\/xml;q=0.9,*\\/*;q=0.8\",\"HTTP_HOST\":\"drinkoxigen.dev:8888\",\"REDIRECT_STATUS\":\"200\",\"REDIRECT_HANDLER\":\"php-fastcgi\",\"REDIRECT_REDIRECT_STATUS\":\"200\",\"FCGI_ROLE\":\"RESPONDER\",\"PHP_SELF\":\"\\/perch\\/core\\/runway\\/start.php\",\"REQUEST_TIME_FLOAT\":1471968790.55,\"REQUEST_TIME\":1471968790,\"argv\":[],\"argc\":0}}')
[1] SELECT * FROM perch2_forms_responses WHERE responseID='38' LIMIT 1

Dynamic value

INSERT INTO perch2_forms_responses(responseJSON,formID,responseIP,responseSpamData) VALUES('{\"fields\":{\"FNAME\":{\"attributes\":{\"type\":\"text\",\"value\":\"\",\"mailer\":\"FNAME\",\"class\":\"validate-required\",\"id\":\"FNAME\",\"placeholder\":\"First Name *\",\"required\":\"true\"},\"value\":\"Paul\"},\"LNAME\":{\"attributes\":{\"type\":\"text\",\"value\":\"\",\"mailer\":\"LNAME\",\"class\":\"validate-required\",\"id\":\"LNAME\",\"placeholder\":\"Last Name *\",\"required\":\"true\"},\"value\":\"Sturrock\"},\"email\":{\"attributes\":{\"id\":\"email\",\"required\":\"true\",\"class\":\"validate-required\",\"type\":\"email\",\"mailer\":\"email\",\"placeholder\":\"Email *\"},\"value\":\"paul@sixtyeightfeet.co.uk\"},\"CCITY\":{\"attributes\":{\"type\":\"text\",\"value\":\"\",\"mailer\":\"CCITY\",\"class\":\"validate-required\",\"id\":\"CCITY\",\"placeholder\":\"City *\",\"required\":\"true\"},\"value\":\"New York\"},\"SSTATE\":{\"attributes\":{\"type\":\"text\",\"value\":\"\",\"mailer\":\"SSTATE\",\"class\":\"validate-required\",\"id\":\"SSTATE\",\"placeholder\":\"State *\",\"required\":\"true\"},\"value\":\"NY\"},\"PPCODE\":{\"attributes\":{\"type\":\"text\",\"value\":\"\",\"mailer\":\"PPCODE\",\"class\":\"validate-required\",\"id\":\"PPCODE\",\"placeholder\":\"Zip\\/Postal Code *\",\"required\":\"true\"},\"value\":\"45678\"},\"confirm\":{\"attributes\":{\"type\":\"hidden\",\"value\":\"1\",\"id\":\"confirm\",\"mailer\":\"confirm_subscribe\"},\"value\":\"1\"},\"list\":{\"attributes\":{\"type\":\"hidden\",\"id\":\"list\",\"value\”:\”REMOVED BY ME\”,\”mailer\":\"list\"},\"value\”:\”REMOVED BY ME\”}},\”files\":[],\"page\":{\"id\":\"13\",\"title\":\"Subscribe to Drink OXiGEN\\u2122 Newsletter\",\"path\":\"\\/subscribe\",\"navtext\":\"Subscribe\"}}','5','::1','{\"fields\":{\"honeypot\":\"\"},\"environment\":{\"PHP_FCGI_CHILDREN\":\"4\",\"PWD\":\"\\/Applications\\/MAMP\\/fcgi-bin\",\"SHLVL\":\"0\",\"PHP_FCGI_MAX_REQUESTS\":\"200\",\"__CF_USER_TEXT_ENCODING\":\"0x1F5:0x0:0x0\",\"ORIG_SCRIPT_NAME\":\"\\/fcgi-bin\\/php7.0.8.fcgi\",\"ORIG_PATH_TRANSLATED\":\"\\/Users\\/paulsturrock\\/Google Drive\\/Work\\/Drink Oxigen\\/local website\\/perch\\/core\\/runway\\/start.php\",\"ORIG_PATH_INFO\":\"\\/perch\\/core\\/runway\\/start.php\",\"ORIG_SCRIPT_FILENAME\":\"\\/Applications\\/MAMP\\/fcgi-bin\\/php7.0.8.fcgi\",\"SCRIPT_NAME\":\"\\/perch\\/core\\/runway\\/start.php\",\"REQUEST_URI\":\"\\/subscribe\",\"QUERY_STRING\":\"\",\"REQUEST_METHOD\":\"POST\",\"SERVER_PROTOCOL\":\"HTTP\\/1.1\",\"GATEWAY_INTERFACE\":\"CGI\\/1.1\",\"REDIRECT_URL\":\"\\/perch\\/core\\/runway\\/start.php\",\"REMOTE_PORT\":\"51579\",\"SCRIPT_FILENAME\":\"\\/Users\\/paulsturrock\\/Google Drive\\/Work\\/Drink Oxigen\\/local website\\/perch\\/core\\/runway\\/start.php\",\"SERVER_ADMIN\":\"you@example.com\",\"DOCUMENT_ROOT\":\"\\/Users\\/paulsturrock\\/Google Drive\\/Work\\/Drink Oxigen\\/local website\",\"REMOTE_ADDR\":\"::1\",\"SERVER_PORT\":\"8888\",\"SERVER_ADDR\":\"::1\",\"SERVER_NAME\":\"drinkoxigen.dev\",\"SERVER_SOFTWARE\":\"Apache\",\"SERVER_SIGNATURE\":\"\",\"PATH\":\"\\/usr\\/bin:\\/bin:\\/usr\\/sbin:\\/sbin\",\"HTTP_COOKIE\":\"_ga=GA1.2.1914584887.1462894669; _gat_tracker1=1; _gat_tracker2=1; PHPSESSID=47b80b01779f3a547ae0fff102784b55; cmsa=1; viewedOuibounceModal=true\",\"HTTP_REFERER\":\"https:\\/\\/drinkoxigen.dev:8888\\/subscribe\",\"HTTP_USER_AGENT\":\"Mozilla\\/5.0 (Macintosh; Intel Mac OS X 10_11_6) AppleWebKit\\/601.7.7 (KHTML, like Gecko) Version\\/9.1.2 Safari\\/601.7.7\",\"HTTP_CONNECTION\":\"keep-alive\",\"CONTENT_LENGTH\":\"297\",\"HTTP_ORIGIN\":\"https:\\/\\/drinkoxigen.dev:8888\",\"CONTENT_TYPE\":\"application\\/x-www-form-urlencoded\",\"HTTP_ACCEPT_LANGUAGE\":\"en-us\",\"HTTP_CACHE_CONTROL\":\"max-age=0\",\"HTTP_ACCEPT_ENCODING\":\"gzip, deflate\",\"HTTP_ACCEPT\":\"text\\/html,application\\/xhtml+xml,application\\/xml;q=0.9,*\\/*;q=0.8\",\"HTTP_HOST\":\"drinkoxigen.dev:8888\",\"REDIRECT_STATUS\":\"200\",\"REDIRECT_HANDLER\":\"php-fastcgi\",\"REDIRECT_REDIRECT_STATUS\":\"200\",\"FCGI_ROLE\":\"RESPONDER\",\"PHP_SELF\":\"\\/perch\\/core\\/runway\\/start.php\",\"REQUEST_TIME_FLOAT\":1471969125.52,\"REQUEST_TIME\":1471969125,\"argv\":[],\"argc\":0}}')
[1] SELECT * FROM perch2_forms_responses WHERE responseID='39' LIMIT 1
Drew McLellan

Drew McLellan 2638 points
Perch Support

It looks like FFSIGNUP had a value of test - is that correct?

When I set a static value (set the value in the template) yes. When it is a dynamic value it gets its value from PerchSystem::set_var using <perch:content id="pageName" /> in the template. This dynamic value is not processed by the form but the static value is.

Drew McLellan

Drew McLellan 2638 points
Perch Support

Do you see the dynamic value in the source of the page before submitting the form?

Yes

On Subscribe page

<input id="FFSIGNUP" name="FFSIGNUP" value="subscribe" type="hidden">

on home page

<input id="FFSIGNUP" name="FFSIGNUP" value="index" type="hidden">

here is debug from subscribe page if that' useful

Debug Message
[24] SELECT p.pagePath, pr.routePattern, pr.routeRegExp, p.pageTemplate FROM perch2_pages p LEFT JOIN perch2_page_routes pr ON p.pageID=pr.pageID ORDER BY pr.routeOrder ASC, p.pagePath ASC
Matched page: /subscribe, so not using routes.
Using master page: /templates/pages/subscribe.php
[1] SELECT * FROM perch2_pages WHERE pagePath='/subscribe' LIMIT 1
Using template: /templates/pages/attributes/default.html
Using sub-template: /templates/pages/attributes/seo.html
Using sub-template: /templates/pages/attributes/facebook.html
Using sub-template: /templates/pages/attributes/twitter.html
[2] SELECT regionKey, regionHTML FROM perch2_content_regions WHERE regionPage='/subscribe' OR regionPage='*' ORDER BY regionPage DESC
[1] SELECT regionID, regionTemplate, regionPage, regionRev AS rev FROM perch2_content_regions WHERE regionKey='Subscribe Form' AND (regionPage='/subscribe' OR regionPage='*')
[1] SELECT * FROM ( SELECT idx.itemID, c.regionID, idx.pageID, c.itemJSON, idx2.indexValue as sortval FROM perch2_content_index idx JOIN perch2_content_items c ON idx.itemID=c.itemID AND idx.itemRev=c.itemRev AND idx.regionID=c.regionID JOIN perch2_content_index idx2 ON idx.itemID=idx2.itemID AND idx.itemRev=idx2.itemRev AND idx2.indexKey='_order' WHERE ((idx.regionID=13 AND idx.itemRev=5)) AND idx.itemID=idx2.itemID AND idx.itemRev=idx2.itemRev ) as tbl GROUP BY itemID, pageID, itemJSON, sortval ORDER BY sortval ASC
[1] Using template: /templates/content/do-subscribe.html
Request time: 0.1031
Process time: 0.1027
Memory: 2.6935
Drew McLellan

Drew McLellan 2638 points
Perch Support

Ok, then it shouldn't make any difference where the data originally came from.

I'm sure this should work, but without being able to debug it I've got nothing to suggest. I'll have to see if I can get something set up. How are your additional merge fields configured in MailChimp?

All merge fields are configured as text fields in MailChimp.

This is not my only form with the dynamic field issue - I have another form where the dynamic value is not recognised on submit to perch forms or perch mailchimp either. Is it an issue with PerchSystem::set_var and form submit?

Drew McLellan

Drew McLellan 2638 points
Perch Support

No, if you can see it in the source of the HTML then it's there.

You should raise your other issue as a new thread - it may not be related.

Ok. So sticking with this this issue and the fact that the dynamic value is not recognised by the system on submit to either perch forms or perch mailchimp is there a work around? Have you been able to replicate the issue?