Forum

Thread tagged as: Question, Problem, Forms

Form Not Posting With Date Inputs

I have a basic form that is located in a modal. Initially the form gathered first name, last name and email address. The client requested that two additional fields of birthday and anniversary also be added to this form as well. The form was submitting correctly and submissions were being displayed in the forms app prior to these two additional inputs being added. After adding the two fields, the form will not submit. Is there a specific attribute that needs to be added to inputs with the type of date?

Below is the brief diagnostics report ~~~

Perch: 2.7.6, PHP: 5.4.40, MySQL: mysqlnd 5.0.10 - 20111026 - $Id: c85105d7c6f7d70d609bb4c000257868a40840ab $, with PDO
Server OS: Linux, cgi-fcgi
Installed apps: content (2.7.6), assets (2.7.6), categories (2.7.6), perch_forms (1.8.2), perch_mailchimp (2.0.1)
App runtimes: <?php $apps_list = array( 'content', 'categories', 'perch_forms', 'perch_mailchimp', );
PERCH_LOGINPATH: /cms
PERCH_PATH: /home/mcinty6/public_html/cms
PERCH_CORE: /home/mcinty6/public_html/cms/core
PERCH_RESFILEPATH: /home/mcinty6/public_html/cms/resources
Image manipulation: GD
PHP limits: Max upload 128M, Max POST 128M, Memory: 512M, Total max file upload: 128M
Resource folder writeable: Yes
DOCUMENT_ROOT: /home/mcinty6/public_html
HTTP_HOST: mcintyrejewelry.com
REQUEST_URI: /cms/core/settings/diagnostics/
SCRIPT_NAME: /cms/core/settings/diagnostics/index.php
Ross Smith

Ross Smith 0 points

  • 6 years ago
Rachel Andrew

Rachel Andrew 394 points
Perch Support

We need to see your template.

Also, Perch is pretty out of date so the first thing to do would be to update Perch.

Here is the template code

<perch:content id="text" type="textarea" label="Email Acquisition Disclaimer" markdown="true" editor="markitup" help="This is the disclaimer text that site visitors will see." />

<perch:form id="email-acquisition" method="post" app="perch_forms" double-optin="false" send-welcome="false">
    <div class="left">
        <!--First Name-->
        <perch:label for="first-name">First Name</perch:label>
        <perch:input type="text" id="first-name" required="true" label="First Name" mailer="FNAME"/>
        <perch:error for="first-name" type="required">Please enter your First Name</perch:error>
    </div>
    <div class="right">
        <!--Last Name-->
        <perch:label for="last-name">Last Name</perch:label>
        <perch:input type="text" id="last-name" required="true" label="Last Name" mailer="LNAME"/>
        <perch:error for="last-name" type="required">Please enter your Last Name</perch:error>
    </div>
    <div class="left">
            <!--Birthday-->
            <perch:label for="bday">Birthday</perch:label>
        <perch:input type="date" id="bday" required="true" label="Birthday" native="true" mailer="BDAY"/>
        <perch:error for="bday" type="required">Please enter your Last Name</perch:error>
        <span class="form-helper">Format: MM/DD/YYYY</span>
    </div>
    <div class="right">
            <!--Anniversary-->
            <perch:label for="anniversary">Anniversary</perch:label>
        <perch:input type="date" id="anniversary" required="true" label="Anniversary" native="true" mailer="ANIV"/>
        <perch:error for="anniversary" type="true">Please enter your Last Name</perch:error>
        <span class="form-helper">Format: MM/DD/YYYY</span>
    </div>
    <div class="full">
        <!--Email-->
        <perch:label for="email">Email</perch:label>
        <perch:input type="text" id="email" required="true" label="Email" mailer="email"/>
        <perch:error for="email" type="required">Please enter your Email address</perch:error>
    </div>
    <!--Submit Button-->
    <div class="button-group">
        <button type="button" class="btn btn-default" data-dismiss="modal">No Thanks</button>
        <perch:input type="submit" id="email-acquisition-submit" value="Add Me!" class="btn btn-success"/>
        <perch:input type="hidden" value="1" id="confirm" mailer="confirm_subscribe" />
    </div>
    <!--Success Message-->
    <perch:success>
        <perch:content id="thankyou" label="Success message" type="textarea" textile="true" editor="markitup" />
    </perch:success>
</perch:form>

I'll get the update going.

Have finished updating to current version.

Drew McLellan

Drew McLellan 2638 points
Perch Support

If you're using an HTML5 date field, you need to follow the format that field uses, which is ISO YYYY-MM-DD. If that's not what you want, stick with a text field.