Forum

Thread tagged as: Question, Problem

Form just will not work?

Hi,

I have created a reservation form on this site. The form isn't anything clever, it just emails the request.

I've played with this a lot, but I just can not get the form to register?

Here is my form template:

<div class="modal-body">
  <div class="table-reserv-module-inner-2">
    <h6 class="text-uppercase text-bold text-center">Reservation form</h6>
    <perch:form id="reservation" method="post" app="perch_forms" class="rd-mailform text-left form-reservation offset-top-40">

      <div class="form-inline offset-top-18">
        <div class="form-group">
          <perch:label for="name" class="form-label rd-input-label">Name</perch:label>
          <perch:input id="name" type="text" class="form-control form-control-has-validation form-control-last-child" required>
          <perch:error for="name" type="required">Please add your name</perch:error>
        </div>
        <div class="form-group">
          <perch:label for="email" class="form-label rd-input-label">Email</perch:label>
          <perch:input id="email" type="email" class="form-control form-control-has-validation form-control-last-child" required>
          <perch:error for="email" type="required">Please add your email address</perch:error>
          <perch:error for="email" type="format">Please check your email address</perch:error>
        </div>
        <div class="form-group">
          <perch:label for="phone" class="form-label rd-input-label">Phone</perch:label>
          <perch:input id="phone" type="text" class="form-control form-control-has-validation form-control-last-child" required>
          <perch:error for="phone" type="required">Please add a contact phone number</perch:error>
        </div>
      </div>
      <div class="form-inline form-inline-mod-1 offset-top-18">
        <div class="form-group">
          <perch:label for="date" class="form-label form-label-outside text-bold rd-input-label">Date</perch:label>
          <perch:input id="date" type="text" class="form-control" placeholder="27 / 07 / 2018">
        </div>
        <div class="form-group offset-top-18">
          <perch:label for="time" class="form-label form-label-outside text-bold rd-input-label">Time</perch:label>
          <perch:input id="time" type="text" class="form-control" placeholder="7pm">
        </div>
        <div class="form-group offset-top-18">
          <perch:label for="comment" class="form-label form-label-outside text-bold rd-input-label">Comment</perch:label>
          <perch:input id="comment" type="textarea" class="form-control form-control-has-validation form-control-last-child" required>
          <perch:error for="comment" type="required">Please add a message</perch:error>
        </div>
      </div>
      <div class="text-center offset-top-40">
        <perch:input id="send-enquire" type="submit" value="Submit enquiry" class="site_button brand_blue">
      </div>

      <div class="text-center offset-top-40">
        <perch:success>
            <perch:content id="sucess" type="textarea" label="Thank you message" textile editor="markitup">
        </perch:success>
      </div>

    </perch:form>
  </div>
</div>

Other forms I'm running on the site all work as expected.

Any help would be gratefully received.

Grant Smith

Grant Smith 0 points

  • 3 years ago
Rachel Andrew

Rachel Andrew 394 points
Perch Support

Have you enabled debug to see what that tells you?

https://docs.grabaperch.com/perch/help/#try-perch-debug-mode

I have, doesn't seem to show any errors

Debug Message - Perch 3.1.1
[35] SELECT DISTINCT settingID, settingValue FROM perch3_settings WHERE userID=0
[9] SELECT regionKey, regionHTML FROM perch3_content_regions WHERE regionPage='/index.php' OR regionPage='*' ORDER BY regionPage DESC
[1] SELECT * FROM perch3_pages WHERE pagePath='/index.php' LIMIT 1
Using template: /templates/pages/attributes/seo.html
[1] SELECT regionID, regionTemplate, regionPage, regionRev AS rev FROM perch3_content_regions WHERE regionKey='Company Profile' AND (regionPage='/index.php' OR regionPage='*')
[1] SELECT * FROM ( SELECT idx.itemID, c.regionID, idx.pageID, c.itemJSON, idx2.indexValue as sortval FROM perch3_content_index idx JOIN perch3_content_items c ON idx.itemID=c.itemID AND idx.itemRev=c.itemRev AND idx.regionID=c.regionID JOIN perch3_content_index idx2 ON idx.itemID=idx2.itemID AND idx.itemRev=idx2.itemRev AND idx2.indexKey='_order' WHERE ((idx.regionID=2 AND idx.itemRev=20)) AND idx.itemID=idx2.itemID AND idx.itemRev=idx2.itemRev ) as tbl GROUP BY itemID, pageID, itemJSON, sortval, regionID ORDER BY sortval ASC
[1] Using template: /templates/content/company/header_intro.html
[1] SELECT * FROM ( SELECT idx.itemID, c.regionID, idx.pageID, c.itemJSON, idx2.indexValue as sortval FROM perch3_content_index idx JOIN perch3_content_items c ON idx.itemID=c.itemID AND idx.itemRev=c.itemRev AND idx.regionID=c.regionID JOIN perch3_content_index idx2 ON idx.itemID=idx2.itemID AND idx.itemRev=idx2.itemRev AND idx2.indexKey='_order' WHERE ((idx.regionID=2 AND idx.itemRev=20)) AND idx.itemID=idx2.itemID AND idx.itemRev=idx2.itemRev ) as tbl GROUP BY itemID, pageID, itemJSON, sortval, regionID ORDER BY sortval ASC
[1] Using template: /templates/content/company/header_address.html
[1] SELECT * FROM ( SELECT idx.itemID, c.regionID, idx.pageID, c.itemJSON, idx2.indexValue as sortval FROM perch3_content_index idx JOIN perch3_content_items c ON idx.itemID=c.itemID AND idx.itemRev=c.itemRev AND idx.regionID=c.regionID JOIN perch3_content_index idx2 ON idx.itemID=idx2.itemID AND idx.itemRev=idx2.itemRev AND idx2.indexKey='_order' WHERE ((idx.regionID=2 AND idx.itemRev=20)) AND idx.itemID=idx2.itemID AND idx.itemRev=idx2.itemRev ) as tbl GROUP BY itemID, pageID, itemJSON, sortval, regionID ORDER BY sortval ASC
[1] Using template: /templates/content/company/header_phone.html
[1] SELECT * FROM ( SELECT idx.itemID, c.regionID, idx.pageID, c.itemJSON, idx2.indexValue as sortval FROM perch3_content_index idx JOIN perch3_content_items c ON idx.itemID=c.itemID AND idx.itemRev=c.itemRev AND idx.regionID=c.regionID JOIN perch3_content_index idx2 ON idx.itemID=idx2.itemID AND idx.itemRev=idx2.itemRev AND idx2.indexKey='_order' WHERE ((idx.regionID=2 AND idx.itemRev=20)) AND idx.itemID=idx2.itemID AND idx.itemRev=idx2.itemRev ) as tbl GROUP BY itemID, pageID, itemJSON, sortval, regionID ORDER BY sortval ASC
[1] Using template: /templates/content/company/header_open.html
[1] SELECT * FROM ( SELECT idx.itemID, c.regionID, idx.pageID, c.itemJSON, idx2.indexValue as sortval FROM perch3_content_index idx JOIN perch3_content_items c ON idx.itemID=c.itemID AND idx.itemRev=c.itemRev AND idx.regionID=c.regionID JOIN perch3_content_index idx2 ON idx.itemID=idx2.itemID AND idx.itemRev=idx2.itemRev AND idx2.indexKey='_order' WHERE ((idx.regionID=2 AND idx.itemRev=20)) AND idx.itemID=idx2.itemID AND idx.itemRev=idx2.itemRev ) as tbl GROUP BY itemID, pageID, itemJSON, sortval, regionID ORDER BY sortval ASC
[1] Using template: /templates/content/company/header_social.html
[15] SELECT * FROM perch3_pages WHERE pageNew=0 AND pageHidden=0 AND pageDepth >=0 AND pageDepth<=5 ORDER BY pageTreePosition ASC
[1] SELECT pageTreePosition FROM perch3_pages WHERE pagePath='/index.php' LIMIT 1
[1] SELECT pageID FROM perch3_pages WHERE pageTreePosition IN ('000-001', '000') ORDER BY pageTreePosition DESC
Using template: /templates/navigation/level_1.html
[7] Using template: /templates/navigation/level_2.html
[7] Using template: /templates/navigation/level_2.html
[1] SELECT * FROM ( SELECT idx.itemID, c.regionID, idx.pageID, c.itemJSON, idx2.indexValue as sortval FROM perch3_content_index idx JOIN perch3_content_items c ON idx.itemID=c.itemID AND idx.itemRev=c.itemRev AND idx.regionID=c.regionID JOIN perch3_content_index idx2 ON idx.itemID=idx2.itemID AND idx.itemRev=idx2.itemRev AND idx2.indexKey='_order' WHERE ((idx.regionID=2 AND idx.itemRev=20)) AND idx.itemID=idx2.itemID AND idx.itemRev=idx2.itemRev ) as tbl GROUP BY itemID, pageID, itemJSON, sortval, regionID ORDER BY sortval ASC
[1] Using template: /templates/content/company/footer_address.html
[1] SELECT * FROM ( SELECT idx.itemID, c.regionID, idx.pageID, c.itemJSON, idx2.indexValue as sortval FROM perch3_content_index idx JOIN perch3_content_items c ON idx.itemID=c.itemID AND idx.itemRev=c.itemRev AND idx.regionID=c.regionID JOIN perch3_content_index idx2 ON idx.itemID=idx2.itemID AND idx.itemRev=idx2.itemRev AND idx2.indexKey='_order' WHERE ((idx.regionID=2 AND idx.itemRev=20)) AND idx.itemID=idx2.itemID AND idx.itemRev=idx2.itemRev ) as tbl GROUP BY itemID, pageID, itemJSON, sortval, regionID ORDER BY sortval ASC
[1] Using template: /templates/content/company/footer_info.html
[1] SELECT * FROM ( SELECT idx.itemID, c.regionID, idx.pageID, c.itemJSON, idx2.indexValue as sortval FROM perch3_content_index idx JOIN perch3_content_items c ON idx.itemID=c.itemID AND idx.itemRev=c.itemRev AND idx.regionID=c.regionID JOIN perch3_content_index idx2 ON idx.itemID=idx2.itemID AND idx.itemRev=idx2.itemRev AND idx2.indexKey='_order' WHERE ((idx.regionID=2 AND idx.itemRev=20)) AND idx.itemID=idx2.itemID AND idx.itemRev=idx2.itemRev ) as tbl GROUP BY itemID, pageID, itemJSON, sortval, regionID ORDER BY sortval ASC
[1] Using template: /templates/content/company/footer_social.html
Rachel Andrew

Rachel Andrew 394 points
Perch Support

I don't see a form being posted there.

Ah, yes, very odd. There is actually three (or should be!).

Reservation form is in the content area, and two in the footer, contact form and MailChimp form, both contact and mailchimp appear to be working as I expect.

Drew McLellan

Drew McLellan 2638 points
Perch Support

Is the debug from after the form is posted?

It is yes

Thanks both, don't really know what I changed, but the form is now working?