Forum

Thread tagged as: Problem, Addons, Forms

Perch Forms - Not Working

I added perch_forms in the config\app.php file

I added the perch_forms folder in addons\apps\perch_forms

I used the form example from this page https://docs.grabaperch.com/video/v3/contact-form/

I added a perch region and set the template to my contact-form.html template

I ran a debug and got this:

Debug Message - Perch 3.0.8

[28] SELECT DISTINCT settingID, settingValue FROM perch3_settings WHERE userID=0

[11] SELECT * FROM perch3_pages WHERE pageNew=0 AND pageHidden=0 AND pageDepth >=0 AND pageDepth<=2 ORDER BY pageTreePosition ASC

[1] SELECT pageTreePosition FROM perch3_pages WHERE pagePath='/contact-texas-western.php' LIMIT 1

[1] SELECT pageID FROM perch3_pages WHERE pageTreePosition IN ('000-006', '000') ORDER BY pageTreePosition DESC

[6] Using template: /templates/navigation/item.html (this was red)

[1] SELECT regionKey, regionHTML FROM perch3_content_regions WHERE regionPage='/contact-texas-western.php' OR regionPage='*' ORDER BY regionPage DESC

And nothing is working....what am i missing?

Brittany Lewis

Brittany Lewis 0 points

  • 4 years ago
Rachel Andrew

Rachel Andrew 394 points
Perch Support

What do you mean "nothing is working"?

We need all of the debug not just the version number.

When I press the submit button, the form does nothing, no submission message comes through, no success message nothing. Also above is the debug on the contact page. Here is all of it from the admin panel.

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='5bb9152b92ccbfacbdef3a9d7a4173d5' LIMIT 1 UPDATE perch3_users SET userHash='bab13b4aa0ca115d6ab0e28478f1b62d' WHERE userID='1'

[39] SELECT p.privKey FROM perch3_user_privileges p

[28] SELECT settingID, settingValue, userID FROM perch3_settings WHERE userID=1 OR userID=0 ORDER BY userID ASC

[8] SELECT itemValue FROM perch3_menu_items WHERE itemType='app'

[nil] SELECT *, REPLACE(pagePath, '/index.php', '') as sortPath FROM perch3_pages WHERE pageNew=1 ORDER BY LENGTH(sortPath)-LENGTH(REPLACE(sortPath, '/', '')) ASC

[11] SELECT p.*, (SELECT COUNT(*) FROM perch3_pages WHERE pageParentID=p.pageID) AS subpages FROM perch3_pages p WHERE p.pageParentID IN (0, 11, 3) ORDER BY p.pageTreePosition ASC

[22] SELECT * FROM perch3_content_regions ORDER BY regionOrder ASC

[nil] SELECT * FROM perch3_content_regions WHERE regionPage='*' ORDER BY regionKey ASC

[1] SELECT * FROM perch3_menu_items WHERE itemActive=1 AND itemType='menu' AND parentID=0 ORDER BY itemOrder ASC LIMIT 0, 1

[3] 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='content' 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/apps/content/modes/list.post.php

[15] SELECT DISTINCT regionTemplate FROM perch3_content_regions ORDER BY regionTemplate ASC

[nil] SELECT * FROM perch3_content_regions WHERE pageID=15 AND regionPage!='*' ORDER BY regionOrder ASC

[nil] SELECT * FROM perch3_content_regions WHERE pageID=16 AND regionPage!='*' ORDER BY regionOrder ASC

[nil] SELECT * FROM perch3_content_regions WHERE pageID=14 AND regionPage!='*' ORDER BY regionOrder ASC

Queries: 19

Memory: 3.4614

Rachel Andrew

Rachel Andrew 394 points
Perch Support

Sorry - I meant Diagnostics. Can you post your Diagnostics Report?

The form template too.

Blog 5.6.1 is up to date

Forms 1.9.1 is up to date

Perch: 3.0.8, PHP: 5.5.38, MySQL: mysqlnd 5.0.11-dev - 20120503 - $Id: 15d5c781cfcad91193dceae1d2cdd127674ddb3e $, 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)

App runtimes: <?php $apps_list = [ 'perch_blog', 'perch_forms', ];

PERCH_LOGINPATH: /login

PERCH_PATH: /home/athtests/public_html/texaswestern/login

PERCH_CORE: /home/athtests/public_html/texaswestern/login/core

PERCH_RESFILEPATH: /home/athtests/public_html/texaswestern/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/athtests/public_html/texaswestern

HTTP_HOST: www.texaswestern.athtestsites.com

REQUEST_URI: /login/core/settings/diagnostics/

SCRIPT_NAME: /login/core/settings/diagnostics/index.php

        <section class="tw<perch:content id="section_background_color" type="select" label="Section Color" options="TWH Brand Green|green, TWH Dark Green|palegreen, TWH Brown|tan, TWH Dark Grey|dkgrey, TWH Light Grey|ltgrey, White|white" allowempty="false" required="true" /> pd-40">
            <div class="container">
                <div class="row" style="display:block;">


                    <div class="four columns">

                        asfadasdas


                    </div> 

                    <div class="eight columns">


<h2><perch:content id="heading" type="text" label="Heading" required="true" /></h2>
<perch:form id="form-contact" method="post" app="perch_forms" role="form">
  <div class="input<perch:error for="name" type="required"> error</perch:error>">
    <perch:label for="name">Your name:</perch:label>
    <perch:input id="name" type="text" required="true" label="Name" />
    <perch:error for="name" type="required"> 
    <p class="about-error">Please enter your name</p>
    </perch:error>
</div>
<div class="input<perch:error for="email" type="required"> error</perch:error><perch:error for="email" type="format"> error</perch:error>">
    <perch:label for="email">Your email:</perch:label>
    <perch:input id="email" type="email" required="true" label="Email" />
    <perch:error for="email" type="required"> 
    <p class="about-error">Please enter your email address</p>
    </perch:error>
    <perch:error for="email" type="format"> 
    <p class="about-error">Please enter a valid email address</p>
    </perch:error>
</div>
<div class="input<perch:error for="message" type="required"> error</perch:error>">
    <perch:label for="message">Your message:</perch:label>
    <perch:input id="message" type="textarea" required="true" label="Message" />
    <perch:error for="message" type="required"> 
    <p class="about-error">Please enter your message</p>
    </perch:error>
</div>
<perch:input type="submit" id="submit" value="Send" />

<perch:success>
<div class="alert success">
<perch:content id="success" type="textarea" size="m" label="Thank you message" markdown="true" editor="simplemde" required="true" />
</div>
</perch:success>

</perch:form>


                    </div>  

                </div>   
            </div>  
        </section>
Duncan Revell

Duncan Revell 78 points
Registered Developer

Brittany,

do you have a .htaccess rule that strips .php from the url?

If so, you may need to add an action parameter to your perch:form:

<perch:form id="form-contact" method="post" app="perch_forms" role="form" action="contact-texas-western">

That Worked! Thank you! Sorry, That never even crossed my mind!

Thanks Again!