Forum

Thread tagged as: Question, Problem

No forms are submited

Hello, I have set up the perch forms app and I have added a form in one of my pages. When submiting the form the thank you message is being displayed, but on the admin panel under forms-->listing forms I have "No forms have been submitted yet. Submit a new form to have it show up here." Any ideas? am I missing something here?

<article class="fullWidthContainer"/>
    <h3 class="depth redheader" style="text-align:center;">
        <perch:content id="page-header2" type="text" label="Contact us header" />
    </h3>
    <perch:form id="form-contact" method="post" app="perch_forms" role="form">
        <article class="fullWidthContainer" />
            <article class="halfWidthContainer" style="width:40%; margin-left:3%; ">
                <div>
                    <div class="input">
                        <perch:label for="name" class="formlabels">Your name:</perch:label>
                        <perch:input id="name" type="text" required="true" label="Email">
                    </div>
                    <div class="input">
                        <perch:label for="name" class="formlabels">Your Phone:</perch:label>
                        <perch:input id="phone" type="text" required="true" label="Phone number">
                    </div>
                    <div class="input">
                        <perch:label for="email" class="formlabels">Your email:</perch:label>
                        <perch:input id="email" type="email" required="true" label="Email">
                    </div>
                </div>
            </article>
            <article class="halfWidthContainer" style="width:40%; float:left;">
                <div>
                    <div class="input">
                        <perch:label for="message" class="formlabels">Your message:</perch:label><br />
                        <perch:input id="message" type="textarea" required="true" label="Message" style="">
                    </div>
                </div>
            </article>
        </article>
        <article class="fullWidthContainer relative"/>
        <div style="margin-left:3%;" class="formsubmit">
            <perch:input type="submit" id="submit" value="Send"></perch:input>
        </div>

        </article>
        <perch:success>
            <div class="alert success" style="margin-left:3%;">
                <perch:content id="success-paragraph-left" type="textarea" label="Thank you message" html="true" textile="true" editor="markitup" />                    
            </div>
        </perch:success>
    </perch:form>
</article>
Lukasz Biegus

Lukasz Biegus 0 points

  • 5 years ago

Have you added the Forms App to your config file? That's the mistake I often make which leads the same issues as above.

you mean config apps.php?

<?php $apps_list = array( 'content', 'categories', 'perch_blog', 'perch_mailchimp', 'perch_forms' );

Yeah, but I think you might need a comma after that last app.

perch:input is a self-closing tag:.

I believe you need to properly close your <input /> tags.

Example from your code:

                        <perch:label for="name" class="formlabels">Your Phone:</perch:label>
                        <perch:input id="phone" type="text" required="true" label="Phone number">

Add the / backslash at the end:

                        <perch:input id="phone" type="text" required="true" label="Phone number" />

I use that example because you also want to have your <perch:label for="name"> read for="phone", but that is separate point.

At:

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

you would end with a /> and not the full </perch:input>.

Nope this did not work:

<article class="fullWidthContainer"/>
    <h3 class="depth redheader" style="text-align:center;">
        <perch:content id="page-header2" type="text" label="Contact us header" />
    </h3>
    <perch:form id="form-contact" method="post" app="perch_forms" role="form">
        <article class="fullWidthContainer" />
            <article class="halfWidthContainer" style="width:40%; margin-left:3%; ">
                <div>
                    <div class="input">
                        <perch:label for="name" class="formlabels">Your name:</perch:label>
                        <perch:input id="name" type="text" required="true" label="Email"/>
                    </div>
                    <div class="input">
                        <perch:label for="name" class="formlabels">Your Phone:</perch:label>
                        <perch:input id="phone" type="text" required="true" label="Phone number"/>
                    </div>
                    <div class="input">
                        <perch:label for="email" class="formlabels">Your email:</perch:label>
                        <perch:input id="email" type="email" required="true" label="Email"/>
                    </div>
                </div>
            </article>
            <article class="halfWidthContainer" style="width:40%; float:left;">
                <div>
                    <div class="input">
                        <perch:label for="message" class="formlabels">Your message:</perch:label><br />
                        <perch:input id="message" type="textarea" required="true" label="Message" style=""/>
                    </div>
                </div>
            </article>
        </article>
        <article class="fullWidthContainer relative"/>
            <div style="margin-left:3%;" class="formsubmit">
                <perch:input type="submit" id="submit" value="Send"/>
            </div>                
        </article>
        <perch:success>
            <div class="alert success" style="margin-left:3%;">
                <perch:content id="success-paragraph-left" type="textarea" label="Thank you message" html="true" textile="true" editor="markitup" />                    
            </div>
        </perch:success>
    </perch:form>
</article>

Any other suggestions ?

Rachel Andrew

Rachel Andrew 394 points
Perch Support

If you add debug to that page and submit the form, what does it output?

You also have some very strange markup there, the article element should not be self-closing.

I have perch runway What do you mean " very strange markup there, the article element should not be self-closing."?? I close <article with </article>, am I missing something??

I have add the <?php PerchUtil::output_debug(); ?> at the bottom of the page and this is what I get actully i am getting the same before submit the form and after:

SELECT * FROM perch2_pages WHERE pagePath='/contact.php' LIMIT 1 Using template: /templates/pages/attributes/default.html Using sub-template: /templates/pages/attributes/seo.html SELECT regionKey, regionHTML FROM perch2_content_regions WHERE regionPage='/contact.php' OR regionPage='*' ORDER BY regionPage DESC

Drew McLellan

Drew McLellan 2638 points
Perch Support

I think Rachel means this:

<article class="fullWidthContainer" />

Can you post your diagnostics?

Oh ok I will modify my articles I am posting my diagnostics below

Perch information

Perch Runway: 2.8.8
Production mode: Production (100)
Installed apps: content (2.8.8), assets (2.8.8), categories (2.8.8), perch_blog (4.6), perch_forms (1.8.3), perch_mailchimp (2.0.1), perch_backup (1.2)
DB driver: PDO
DB tables: perch2_backup_plans, perch2_backup_resources, perch2_backup_runs, perch2_blog_authors, perch2_blog_comments, perch2_blog_index, perch2_blog_posts, perch2_blog_posts_to_tags, perch2_blog_sections, perch2_blog_tags, perch2_categories, perch2_category_counts, perch2_category_sets, perch2_collection_index, perch2_collection_items, perch2_collection_revisions, perch2_collections, perch2_content_index, perch2_content_items, perch2_content_regions, perch2_forms, perch2_forms_responses, perch2_mailchimp_campaigns, perch2_mailchimp_history, perch2_mailchimp_log, perch2_mailchimp_stats, perch2_mailchimp_subscribers, perch2_navigation, perch2_navigation_pages, perch2_page_routes, perch2_page_templates, perch2_pages, perch2_resource_log, perch2_resource_tags, perch2_resources, perch2_resources_to_tags, perch2_scheduled_tasks, perch2_settings, perch2_user_privileges, perch2_user_role_privileges, perch2_user_roles, perch2_users
Users: 9
App runtimes:

<?php
    $apps_list = array(
        'content', 
        'categories',
        'perch_blog',
        'perch_mailchimp',
        'perch_forms'
    );

Scheduled tasks for perch_blog: delete_spam_comments (1440 mins)
Scheduled tasks for perch_mailchimp: update_list_stats (60 mins)
Scheduled tasks for Backup: plan_13 (10 mins)
Editor plug-ins: ckeditor, markitup
H1: 
L1: 
headerColour: #000040
content_singlePageEdit: 1
helpURL:
siteURL: /
hideBranding: 1
content_collapseList: 1
lang: en-gb
update_2.7.2: done
headerScheme: dark
latest_version: 2.8.15
on_sale_version: 2.8.15
dashboard: 1
hide_pwd_reset: 0
content_hideNonEditableRegions: 0
content_frontend_edit: 0
logoPath: /perch/resources/logo large.PNG
perch_blog_update: 5.0
perch_blog_post_url:
perch_mailchimp_secret: 
perch_mailchimp_update: 2.0
perch_blog_slug_format:
perch_blog_akismet_key:
perch_blog_max_spam_days: 0
perch_mailchimp_api_key:
perch_mailchimp_list_id:
perch_mailchimp_campaign_url:
perch_blog_comment_notify: 0
update_2.7.4: done
update_2.7.10: done
perch_backup_mysqldump_path:
update_2.8.4: done
update_runway_2.8.8: done
PERCH_DEVELOPMENT: 10
PERCH_STAGING: 50
PERCH_PRODUCTION: 100
PERCH_SITEPATH: /var/www
PERCH_SCHEDULE_SECRET: 
PERCH_DB_USERNAME: root
PERCH_DB_SERVER: localhost
PERCH_DB_DATABASE: mywebsite_cms
PERCH_DB_PREFIX: perch2_
PERCH_EMAIL_FROM:
PERCH_EMAIL_FROM_NAME: 
PERCH_LOGINPATH: /perch
PERCH_PATH: /var/www/mywebsite/perch
PERCH_CORE: /var/www/mywebsite/perch/core
PERCH_RESFILEPATH: /var/www/mywebsite/perch/resources
PERCH_RESPATH: /perch/resources
PERCH_HTML5: 1
PERCH_TZ: UTC
PERCH_IMAGE_LIB: imagick
PERCH_EMAIL_METHOD: smtp
PERCH_EMAIL_HOST: mailserver.mywebsite.com
PERCH_RUNWAY: 1
PERCH_ERROR_MODE: DIE
PERCH_DATE_LONG: %d %B %Y
PERCH_DATE_SHORT: %d %b %Y
PERCH_TIME_SHORT: %H:%M
PERCH_TIME_LONG: %H:%M:%S
PERCH_DEBUG:
PERCH_PREVIEW_ARG: preview
PERCH_TEMPLATE_PATH: /var/www/mywebsite/perch/templates
PERCH_DEFAULT_DOC: index.php
PERCH_DEFAULT_EXT: .php
PERCH_PRODUCTION_MODE: 100
PERCH_RWD:
PERCH_HTML_ENTITIES:
PERCH_SSL:
PERCH_STRIPSLASHES:
PERCH_PROGRESSIVE_FLUSH: 1
PERCH_AUTH_PLUGIN:
PERCH_DB_CHARSET: utf8
PERCH_DB_PORT:
PERCH_DB_SOCKET:

Hosting settings

PHP: 5.4.39-0+deb7u2
Zend: 2.4.0
OS: Linux
SAPI: apache2handler
Safe mode: not detected
MySQL client: 5.5.43
MySQL server: 5.5.43-0+deb7u1
Extensions: Core, date, ereg, libxml, openssl, pcre, zlib, bcmath, bz2, calendar, ctype, dba, dom, hash, fileinfo, filter, ftp, gettext, SPL, iconv, json, mbstring, session, posix, Reflection, standard, shmop, SimpleXML, soap, sockets, Phar, exif, sysvmsg, sysvsem, sysvshm, tokenizer, wddx, xml, xmlreader, xmlwriter, zip, apache2handler, PDO, curl, gd, geoip, intl, mcrypt, mysql, mysqli, pdo_mysql, imagick, mhash
GD: Yes
ImageMagick: Yes
PHP max upload size: 15M
PHP max form post size: 10M
PHP memory limit: 128M
Total max uploadable file size: 10M
Resource folder writeable: Yes
Session timeout: 24 minutes
Native JSON: Yes
Filter functions: Yes
Transliteration functions: Yes
GEOIP_ADDR: 128.1.0.176
GEOIP_CONTINENT_CODE: NA
GEOIP_COUNTRY_CODE: US
GEOIP_COUNTRY_NAME: United States
HTTP_HOST: mywebsite.com
HTTP_USER_AGENT: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:42.0) Gecko/20100101 Firefox/42.0
HTTP_ACCEPT: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
HTTP_ACCEPT_LANGUAGE: en-GB,en;q=0.5
HTTP_ACCEPT_ENCODING: gzip, deflate
HTTP_REFERER: https://mywebsite.com/perch/core/settings/diagnostics/
HTTP_COOKIE: PHPSESSID=ji8v7lvl0eaaplc3gs0duesvq0; cmsa=1
HTTP_CONNECTION: keep-alive
PATH: /usr/local/bin:/usr/bin:/bin
SERVER_SIGNATURE: <address>Apache/2.2.22 (Debian) Server at mywebsite.com Port 80</address>
SERVER_SOFTWARE: Apache/2.2.22 (Debian)
SERVER_NAME: mywebsite.com
SERVER_ADDR: 
SERVER_PORT: 
REMOTE_ADDR: 
DOCUMENT_ROOT: /var/www/mywebsite
SERVER_ADMIN: [no address given]
SCRIPT_FILENAME: /var/www/mywebsite/perch/core/settings/diagnostics/index.php
REMOTE_PORT: 
GATEWAY_INTERFACE: CGI/1.1
SERVER_PROTOCOL: HTTP/1.1
REQUEST_METHOD: GET
QUERY_STRING: extended
REQUEST_URI: /perch/core/settings/diagnostics/?extended
SCRIPT_NAME: /perch/core/settings/diagnostics/index.php
PHP_SELF: /perch/core/settings/diagnostics/index.php
REQUEST_TIME_FLOAT: 1447693609.567
REQUEST_TIME: 1447693609
Drew McLellan

Drew McLellan 2638 points
Perch Support

Can you update to the current version of Runway? All this back and forth and the problem might already have been addressed.

Sorry Drew I didnt see any relevant updates in the latest version thats why I did not do it before. I have completed the update now and I still cannot see my form submission under the admin panel. I am posting my new Diagnostics report

Perch Runway: 2.8.15
Production mode: Production (100)
Installed apps: content (2.8.15), assets (2.8.15), categories (2.8.15), perch_blog (4.6), perch_forms (1.8.3), perch_mailchimp (2.0.1), perch_backup (1.2)
DB driver: PDO
DB tables: perch2_backup_plans, perch2_backup_resources, perch2_backup_runs, perch2_blog_authors, perch2_blog_comments, perch2_blog_index, perch2_blog_posts, perch2_blog_posts_to_tags, perch2_blog_sections, perch2_blog_tags, perch2_categories, perch2_category_counts, perch2_category_sets, perch2_collection_index, perch2_collection_items, perch2_collection_revisions, perch2_collections, perch2_content_index, perch2_content_items, perch2_content_regions, perch2_forms, perch2_forms_responses, perch2_mailchimp_campaigns, perch2_mailchimp_history, perch2_mailchimp_log, perch2_mailchimp_stats, perch2_mailchimp_subscribers, perch2_navigation, perch2_navigation_pages, perch2_page_routes, perch2_page_templates, perch2_pages, perch2_resource_log, perch2_resource_tags, perch2_resources, perch2_resources_to_tags, perch2_scheduled_tasks, perch2_settings, perch2_user_privileges, perch2_user_role_privileges, perch2_user_roles, perch2_users
Users: 9
App runtimes:

<?php
    $apps_list = array(
        'content', 
        'categories',
        'perch_blog',
        'perch_mailchimp',
        'perch_forms'
    );

Scheduled tasks for perch_blog: delete_spam_comments (1440 mins)
Scheduled tasks for perch_mailchimp: update_list_stats (60 mins)
Scheduled tasks for Backup: plan_13 (10 mins)
Editor plug-ins: ckeditor, markitup
H1: 
L1: 
headerColour: #000040
content_singlePageEdit: 1
helpURL:
siteURL: /
hideBranding: 1
content_collapseList: 1
lang: en-gb
update_2.7.2: done
headerScheme: dark
latest_version: 2.8.15
on_sale_version: 2.8.15
dashboard: 1
hide_pwd_reset: 0
content_hideNonEditableRegions: 0
content_frontend_edit: 0
logoPath: /perch/resources/logo large.PNG
perch_blog_update: 5.0
perch_blog_post_url:
perch_mailchimp_secret: 
perch_mailchimp_update: 2.0
perch_blog_slug_format:
perch_blog_akismet_key:
perch_blog_max_spam_days: 0
perch_mailchimp_api_key:
perch_mailchimp_list_id:
perch_mailchimp_campaign_url:
perch_blog_comment_notify: 0
update_2.7.4: done
update_2.7.10: done
perch_backup_mysqldump_path:
update_2.8.4: done
update_runway_2.8.8: done
update_runway_2.8.15: done
PERCH_DEVELOPMENT: 10
PERCH_STAGING: 50
PERCH_PRODUCTION: 100
PERCH_SITEPATH: /var/www
PERCH_SCHEDULE_SECRET: 
PERCH_DB_USERNAME: root
PERCH_DB_SERVER: localhost
PERCH_DB_DATABASE: mywebsite_cms
PERCH_DB_PREFIX: perch2_
PERCH_EMAIL_FROM: perch@tbrperch.com
PERCH_EMAIL_FROM_NAME: mywebsite
PERCH_LOGINPATH: /perch
PERCH_PATH: /var/www/mywebsite/perch
PERCH_CORE: /var/www/mywebsite/perch/core
PERCH_RESFILEPATH: /var/www/mywebsite/perch/resources
PERCH_RESPATH: /perch/resources
PERCH_HTML5: 1
PERCH_TZ: UTC
PERCH_IMAGE_LIB: imagick
PERCH_EMAIL_METHOD: smtp
PERCH_EMAIL_HOST: mailserver.mywebsite.com
PERCH_RUNWAY: 1
PERCH_ERROR_MODE: DIE
PERCH_DATE_LONG: %d %B %Y
PERCH_DATE_SHORT: %d %b %Y
PERCH_TIME_SHORT: %H:%M
PERCH_TIME_LONG: %H:%M:%S
PERCH_DEBUG:
PERCH_PREVIEW_ARG: preview
PERCH_TEMPLATE_PATH: /var/www/mywebsite/perch/templates
PERCH_DEFAULT_DOC: index.php
PERCH_DEFAULT_EXT: .php
PERCH_PRODUCTION_MODE: 100
PERCH_RWD:
PERCH_HTML_ENTITIES:
PERCH_SSL:
PERCH_STRIPSLASHES:
PERCH_PROGRESSIVE_FLUSH: 1
PERCH_AUTH_PLUGIN:
PERCH_DB_CHARSET: utf8
PERCH_DB_PORT:
PERCH_DB_SOCKET:
PERCH_SESSION_TIMEOUT_MINS: 20

Hosting settings

PHP: 5.4.39-0+deb7u2
Zend: 2.4.0
OS: Linux
SAPI: apache2handler
Safe mode: not detected
MySQL client: 5.5.43
MySQL server: 5.5.43-0+deb7u1
Extensions: Core, date, ereg, libxml, openssl, pcre, zlib, bcmath, bz2, calendar, ctype, dba, dom, hash, fileinfo, filter, ftp, gettext, SPL, iconv, json, mbstring, session, posix, Reflection, standard, shmop, SimpleXML, soap, sockets, Phar, exif, sysvmsg, sysvsem, sysvshm, tokenizer, wddx, xml, xmlreader, xmlwriter, zip, apache2handler, PDO, curl, gd, geoip, intl, mcrypt, mysql, mysqli, pdo_mysql, imagick, mhash
GD: Yes
ImageMagick: Yes
PHP max upload size: 15M
PHP max form post size: 10M
PHP memory limit: 128M
Total max uploadable file size: 10M
Resource folder writeable: Yes
Session timeout: 24 minutes
Native JSON: Yes
Filter functions: Yes
Transliteration functions: Yes
GEOIP_ADDR: 128.1.0.176
GEOIP_CONTINENT_CODE: NA
GEOIP_COUNTRY_CODE: US
GEOIP_COUNTRY_NAME: United States
HTTP_HOST: mywebsite.com
HTTP_USER_AGENT: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:42.0) Gecko/20100101 Firefox/42.0
HTTP_ACCEPT: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
HTTP_ACCEPT_LANGUAGE: en-GB,en;q=0.5
HTTP_ACCEPT_ENCODING: gzip, deflate
HTTP_REFERER: https://mywebsite.com/perch/core/settings/diagnostics/
HTTP_COOKIE: cmsa=1; PHPSESSID=3bs21pjdfmeko9m3vscplvfi46
HTTP_CONNECTION: keep-alive
PATH: /usr/local/bin:/usr/bin:/bin
SERVER_SIGNATURE: <address>Apache/2.2.22 (Debian) Server at mywebsite.com Port 80</address>
SERVER_SOFTWARE: Apache/2.2.22 (Debian)
SERVER_NAME: mywebsite.com
SERVER_ADDR:
SERVER_PORT: 
REMOTE_ADDR: 
DOCUMENT_ROOT: /var/www/mywebsite
SERVER_ADMIN: [no address given]
SCRIPT_FILENAME: /var/www/mywebsite/perch/core/settings/diagnostics/index.php
REMOTE_PORT: 
GATEWAY_INTERFACE: CGI/1.1
SERVER_PROTOCOL: HTTP/1.1
REQUEST_METHOD: GET
QUERY_STRING: extended
REQUEST_URI: /perch/core/settings/diagnostics/?extended
SCRIPT_NAME: /perch/core/settings/diagnostics/index.php
PHP_SELF: /perch/core/settings/diagnostics/index.php
REQUEST_TIME_FLOAT: 1447923197.923
REQUEST_TIME: 1447923197

I am also posting the debug message for this page. The message is the same before and after form submission.

SELECT * FROM perch2_pages WHERE pagePath='/contact.php' LIMIT 1 Using template: /templates/pages/attributes/default.html Using sub-template: /templates/pages/attributes/seo.html SELECT regionKey, regionHTML FROM perch2_content_regions WHERE regionPage='/contact.php' OR regionPage='*' ORDER BY regionPage DESC

I receive thank you message but on the admin panel --> Apps --> Forms I get: "No forms have been submitted yet. Submit a new form to have it show up here."

Drew McLellan

Drew McLellan 2638 points
Perch Support

Do you have any rewrite rules in place that could be affecting this page?

Hi Drew,

That might be the issue, currently I dont have anything enabled inside my htaccess. Do I have to enable the below code inside my htaccess file?

Perch Runway

RewriteEngine On RewriteCond %{REQUEST_URI} !^/perch RewriteCond %{REQUEST_FILENAME} !-f RewriteRule .* /perch/core/runway/start.php [L]

Drew McLellan

Drew McLellan 2638 points
Perch Support

Yes - please follow the setup instructions https://docs.grabaperch.com/runway/installing/

Drew I modified my htaccess I have enabled

Perch Runway

RewriteEngine On

RewriteCond %{REQUEST_URI} !^/perch RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_URI} !^/$ RewriteRule .* /perch/core/runway/start.php [L]

But I still get same result when submiting my form. I only get my thank you message and no forms to the admin panel:

Debug message: SELECT * FROM perch2_pages WHERE pagePath='/contact.php' LIMIT 1 Using template: /templates/pages/attributes/default.html Using sub-template: /templates/pages/attributes/seo.html SELECT regionKey, regionHTML FROM perch2_content_regions WHERE regionPage='/contact.php' OR regionPage='*' ORDER BY regionPage DESC

Drew McLellan

Drew McLellan 2638 points
Perch Support

You need to set up contact.php as a master page in templates/pages and then create a new page based on it.

For this website i dont have a contact.php as masterpage but I have it inside my root folder. This works the same right?

<?php include('perch/runtime.php'); include('perch/templates/layouts/global/header.php'); ?>

<div class="container"> <?php tbr_perch_content('Contact - Top Page Header'); ?> <!-- Images Text Section --> <?php tbr_perch_content('Contact - Empty Section'); ?> <?php tbr_perch_content('Contact - Page');?> ///This is the region where I am calling my contact.html template <?php perch_layout('global/scroll-top'); ?> <?php perch_layout('global/footer-info'); ?> </div> <?php perch_layout('global/footer-bar'); ?>

Drew McLellan

Drew McLellan 2638 points
Perch Support

It doesn't work the same in 2.8.15, but should in 2.8.16.