Forum

Thread tagged as: Problem, Forms

Form not redirecting to thank you page

Hi,

For some reason the contact page is not redirecting to the thank you page after submission. Instead it is loading underneath the form on the contact page

Here is the form code in contact.php

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

                <div class="main-cf form-group clearfix">
                    <div class="col-md-12"><label>Contact Form</label><br><br></div>
                    <div class="col-md-6">
                        <p><perch:input type="text" id="fname" required="true" label="First Name" placeholder="First Name" />
                    </div>
                    <div class="col-md-6">
                        <p><perch:input type="text" id="lname" required="true" label="Surname" placeholder="Surname" /></p>
                    </div>
                    <div class="col-md-6">
                        <p><perch:input type="email" id="email" required="true" label="Email" placeholder="you@company.com" /></p>
                    </div>
                    <div class="col-md-6">
                        <p><perch:input type="text" id="phone" required="true" label="Phone Number" placeholder="Phone Number" /></p>
                    </div>
                    <div class="col-md-12">
                        <p><perch:input type="textarea" id="message" required="true" label="Message" /></p>
                        <button class="thm-btn"><perch:input type="submit" id="submit" value="Submit Now" /></button>
                    </div>
                </div>

            </perch:form>

And here is a screenshot of the form settings in Perch for the redirection

https://www.evernote.com/l/Ai_5keXd3tNOU5EGhTx6O7pNUTzcNH_-Jc8

Neil Duddridge

Neil Duddridge 1 points

  • 4 years ago

Diag as follows:

Perch: 3.0.8
Production mode: Production (100)
Installed apps: content (3.0.8), assets (3.0.8), categories (3.0.8), perch_blog (5.5.1), perch_forms (1.9.1)
DB driver: PDO
DB tables: perch2_blog_authors (2), perch2_blog_comments (0), perch2_blog_index (135), perch2_blog_posts (2), perch2_blog_posts_to_tags (5), perch2_blog_sections (1), perch2_blog_tags (4), perch2_blogs (1), perch2_categories (2), perch2_category_counts (2), perch2_category_sets (1), perch2_content_index (1391), perch2_content_items (115), perch2_content_regions (17), perch2_forms (1), perch2_forms_responses (16), perch2_menu_items (10), perch2_navigation (2), perch2_navigation_pages (13), perch2_page_templates (2), perch2_pages (12), perch2_resource_log (297), perch2_resource_tags (0), perch2_resources (78), perch2_resources_to_tags (0), perch2_settings (27), perch2_user_passwords (1), perch2_user_privileges (39), perch2_user_role_privileges (29), perch2_user_roles (2), perch2_users (2)
Users: 2
App runtimes:
<?php
        $apps_list = [
                'perch_blog',
                'perch_forms'
        ];
?>
Scheduled tasks for perch_blog: delete_spam_comments (1440 mins)
Editor plug-ins: ckeditor
H1: e4e014b49974351a2524776dffc2630f
L1: 3ff0272f47274428a2542486bbbceeb8
F1: 0c66c2e1f82f9e0b7617b2cb8270f2c7
headerColour: #292929
content_singlePageEdit: 1
helpURL:
siteURL: /
hideBranding: 1
content_collapseList: 1
lang: en-gb
update_2.8.31: done
latest_version:
on_sale_version:
headerScheme: dark
dashboard: 1
hide_pwd_reset: 0
content_hideNonEditableRegions: 0
content_frontend_edit: 0
perch_blog_site_name:
perch_blog_post_url: /blog/post.php?s={postSlug}
perch_blog_slug_format: %Y-%m-%d-{postTitle}
perch_blog_akismet_key:
perch_blog_max_spam_days: 0
perch_blog_comment_notify: 0
logoPath: /assets/avonbridge-02.jpg
perch_blog_update: 5.0.1
update_3.0.8: done
keyboardShortcuts: 0
content_skip_region_list: 0
PERCH_DEVELOPMENT: 10
PERCH_STAGING: 50
PERCH_PRODUCTION: 100
PERCH_DB_USERNAME: root
PERCH_DB_SERVER: localhost
PERCH_DB_PORT: 8889
PERCH_DB_DATABASE: avonbridge_dev
PERCH_RESFILEPATH: /Users/#/so53dev/repos/avonbridge.local/project/#/assets
PERCH_RESPATH: /assets
PERCH_DEBUG: 1
PERCH_DB_PREFIX: perch2_
PERCH_TZ: Europe/London
PERCH_EMAIL_FROM: #
PERCH_EMAIL_FROM_NAME: #
PERCH_LOGINPATH: /site_admin
PERCH_PATH: /Users/#/so53dev/repos/avonbridge.local/project/#/site_admin
PERCH_CORE: /Users/#/so53dev/repos/avonbridge.local/project/#/site_admin/core
PERCH_HTML5: 1
PERCH_RUNWAY:
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_RUNWAY_ROUTED:
PERCH_STRONG_PASSWORDS:
PERCH_ASSET_VERSION: 5163d57ff611b3cf853b
PERCH_PREVIEW_ARG: preview
PERCH_TEMPLATE_PATH: /Users/#/so53dev/repos/avonbridge.local/project/#/site_admin/templates
PERCH_TEMPLATE_FILTERS:
PERCH_DEFAULT_DOC: index.php
PERCH_DEFAULT_EXT: .php
PERCH_PRODUCTION_MODE: 100
PERCH_XHTML_MARKUP:
PERCH_RWD: 1
PERCH_HTML_ENTITIES:
PERCH_SSL:
PERCH_STRIPSLASHES:
PERCH_PROGRESSIVE_FLUSH: 1
PERCH_PARANOID:
PERCH_FORCE_SECURE_COOKIES:
PERCH_DEFAULT_BUCKET: default
PERCH_TRANSLATION_ASSIST:
PERCH_PASSWORD_MIN_LENGTH: 6
PERCH_MAX_FAILED_LOGINS: 10
PERCH_AUTH_LOCKOUT_DURATION: 1 HOUR
PERCH_VERIFY_UPLOADS:
PERCH_PRIV_ASSIST:
PERCH_CUSTOM_EDITOR_CONFIGS:
PERCH_AUTH_PLUGIN:
PERCH_DB_CHARSET: utf8
PERCH_DB_SOCKET:
PERCH_APPS_EDITOR_PLUGIN: markitup
PERCH_APPS_EDITOR_MARKUP_LANGUAGE: markdown
Hosting settings

PHP: 7.0.15
Zend: 3.0.0
OS: Darwin
SAPI: cgi-fcgi
Safe mode: not detected
MySQL client: mysqlnd 5.0.12-dev - 20150407 - $Id: b5c5906d452ec590732a93b051f3827e02749b83 $
MySQL server: 5.6.35
Free disk space: 22.71 GB
Extensions: Core, date, libxml, openssl, pcre, sqlite3, zlib, bcmath, bz2, calendar, ctype, curl, dom, hash, fileinfo, filter, ftp, gd, SPL, iconv, intl, json, ldap, mbstring, session, standard, mysqlnd, PDO, pdo_mysql, pdo_sqlite, Phar, posix, readline, Reflection, mysqli, SimpleXML, soap, sockets, exif, tokenizer, wddx, xml, xmlreader, xmlwriter, xsl, zip, cgi-fcgi, imap, gettext, mcrypt, pgsql, pdo_pgsql, igbinary, memcached
GD: Yes
ImageMagick: No
PHP max upload size: 32M
PHP max form post size: 32M
PHP memory limit: 128M
Total max uploadable file size: 32M
Resource folder writeable: Yes
Session timeout: 24 minutes
Native JSON: Yes
Filter functions: Yes
Transliteration functions: Yes
PHP_FCGI_CHILDREN: 4
PWD: /Applications/MAMP/fcgi-bin
PHP_FCGI_MAX_REQUESTS: 200
__CF_USER_TEXT_ENCODING: 0x1F5:0x0:0x2
ORIG_SCRIPT_NAME: /fcgi-bin/php7.0.15.fcgi
ORIG_PATH_TRANSLATED: /Users/#/so53dev/repos/avonbridge.local/project/#/site_admin/core/settings/diagnostics/index.php
ORIG_PATH_INFO: /site_admin/core/settings/diagnostics/index.php
ORIG_SCRIPT_FILENAME: /Applications/MAMP/fcgi-bin/php7.0.15.fcgi
SCRIPT_NAME: /site_admin/core/settings/diagnostics/index.php
REQUEST_URI: /site_admin/core/settings/diagnostics/?extended
QUERY_STRING: extended
REQUEST_METHOD: GET
SERVER_PROTOCOL: HTTP/1.1
GATEWAY_INTERFACE: CGI/1.1
REDIRECT_URL: /site_admin/core/settings/diagnostics/index.php
REDIRECT_QUERY_STRING: extended
REMOTE_PORT: 50268
SCRIPT_FILENAME: /Users/#/so53dev/repos/avonbridge.local/project/#/site_admin/core/settings/diagnostics/index.php
SERVER_ADMIN: you@example.com
DOCUMENT_ROOT: /Users/#/so53dev/repos/avonbridge.local/project/#
REMOTE_ADDR: ::1
SERVER_PORT: 8888
SERVER_ADDR: ::1
SERVER_NAME: avonbridge.local
SERVER_SOFTWARE: Apache
PATH: /usr/bin:/bin:/usr/sbin:/sbin
HTTP_COOKIE: PHPSESSID=4f97fbffdbb5357492a485507dbd6376; cmsa=1; __atuvc=132%7C24; __atuvs=593e63c323fae77e055
HTTP_ACCEPT_LANGUAGE: en-US,en;q=0.8
HTTP_ACCEPT_ENCODING: gzip, deflate, sdch
HTTP_REFERER: https://avonbridge.local:8888/site_admin/core/settings/diagnostics/
HTTP_ACCEPT: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8
HTTP_USER_AGENT: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/58.0.3029.110 Safari/537.36
HTTP_UPGRADE_INSECURE_REQUESTS: 1
HTTP_CONNECTION: keep-alive
HTTP_HOST: avonbridge.local:8888
REDIRECT_STATUS: 200
REDIRECT_HANDLER: php-fastcgi
FCGI_ROLE: RESPONDER
PHP_SELF: /site_admin/core/settings/diagnostics/index.php
REQUEST_TIME_FLOAT: 1497272208.2
REQUEST_TIME: 1497272208
argc: 1
Drew McLellan

Drew McLellan 2638 points
Perch Support

Instead it is loading underneath the form on the contact page

It being the thank you page? That sounds very odd.

Have you got any JavaScript running?

Hi Drew,

Thanks for the prompt. There was some form validation js. I've now removed that code and the redirect works :)