Forms magento 1.8验证不适用于自定义联系人表单中的新字段

Forms magento 1.8验证不适用于自定义联系人表单中的新字段,forms,validation,contact,magento-1.8,Forms,Validation,Contact,Magento 1.8,我正在尝试验证自定义联系人表单中的新字段,以下是我的表单链接: 我将表单id包括在以下行中:var contactForm=new VarienForm('customcontacts',true); 我在课堂上的每一个输入都是这样的: <input class="required-entry input-fields" name="country" id="country" title="<?php echo Mage::helper('customcontacts')->

我正在尝试验证自定义联系人表单中的新字段,以下是我的表单链接:

我将表单id包括在以下行中:
var contactForm=new VarienForm('customcontacts',true);

我在课堂上的每一个输入都是这样的:

<input class="required-entry input-fields" name="country" id="country" title="<?php echo Mage::helper('customcontacts')->__('Pays') ?>" value="" type="text" />
您的
是在
之间定义的,这是无效的。那会把事情搞砸的。如果您在javascript控制台中打印出表单
document.getElementById('customcontacts').outerHTML
的内容,那么您将看到它是空的。 确保
标记位于有效位置(通常当您从firefox查看页面源时,它会用红色标记无效标记)。那么验证就应该起作用了