自定义联系表单:无法提交您的请求.请稍后再试


Custom contact form: Unable to submit your request. Please, try again later

我在以下位置创建了一个新的联系表单:

app/design/frontend/base/default/template/contacts

命名 form2.phtml

我收到错误:无法提交您的请求。请稍后再试。

这是我的代码:

            <div id="messages_product_view"><?php echo $this->getMessagesBlock()->toHtml() ?></div>
            <h2>Questions? Comments?<br>
            Contact us here and we’ll get back to you shortly.</h2>
            <form action="<?php echo $this->getFormAction(); ?>" id="contactForm2" class="footer-form" method="post">
                <div class="fieldset">
                    <ul class="form-list">
                        <div class="form-row">
                            <li>
                                <div class="input-box">
                                    <input placeholder="First Name *" name="first name" id="name" title="<?php echo Mage::helper('core')->quoteEscape(Mage::helper('contacts')->__('First Name')) ?>" value="<?php echo $this->escapeHtml($this->helper('contacts')->getUserName()) ?>" class="input-text required-entry" type="text" />
                                </div>
                            </li>
                                        <li>
                                <div class="input-box">
                                    <input placeholder="Last Name *" name="last name" id="name" title="<?php echo Mage::helper('core')->quoteEscape(Mage::helper('contacts')->__('Last Name')) ?>" value="<?php echo $this->escapeHtml($this->helper('contacts')->getUserName()) ?>" class="input-text required-entry" type="text" />
                                </div>
                            </li>
                        </div>
                        <div class="form-row">
                            <li>
                                <div class="input-box">
                                    <input placeholder="Email *" name="email" id="email" title="<?php echo Mage::helper('core')->quoteEscape(Mage::helper('contacts')->__('Email')) ?>" value="<?php echo $this->escapeHtml($this->helper('contacts')->getUserEmail()) ?>" class="input-text required-entry validate-email" type="text" />
                                </div>
                            </li>
                            <li>
                                <div class="input-box">
                                    <input placeholder="Telephone" name="telephone" id="telephone" title="<?php echo Mage::helper('core')->quoteEscape(Mage::helper('contacts')->__('Telephone')) ?>" value="" class="input-text" type="text" />
                                </div>
                            </li>
                        </div>
                        <li class="wide">
                            <div class="input-box">
                                <textarea placeholder="Message *" name="comment" id="comment" title="<?php echo Mage::helper('core')->quoteEscape(Mage::helper('contacts')->__('Comment')) ?>" class="required-entry input-text" cols="5" rows="3"></textarea>
                            </div>
                        </li>
                    </ul>
                </div>
                <div class="buttons-set">
                    <input type="text" name="hideit" id="hideit" value="" style="display:none !important;" />
                    <button type="submit" title="<?php echo Mage::helper('core')->quoteEscape(Mage::helper('contacts')->__('Submit')) ?>" class="button"><span><span><?php echo Mage::helper('contacts')->__('SEND') ?></span></span></button>
                </div>
            </form>
            <script type="text/javascript">
            //<![CDATA[
                var contactForm = new VarienForm('contactForm', true);
            //]]>
            </script>

任何想法会导致这种情况吗?当我将其切换回默认表单时,默认表单工作正常。我错过了某个地方的一步吗?

谢谢

由于您添加了"hideit"输入,因此注释掉了

if (Zend_Validate::is(trim($post[’hideit’]), ‘NotEmpty’)) { 
    $error = true; 
}

内部应用程序/代码/核心/法师/联系人/控制器/索引控制器.php