我需要在提交验证后禁用或在表单上放置加载图像。任何一个为我工作。点击一次后,我找到了许多禁用“提交”按钮的方法,但这并没有考虑到验证错误。在Magento验证后点击一次后禁用提交按钮
我试图以许多不同的方式来看这个,但我似乎无法找到有效的东西。
我使用Magento在当前窗体上使用的默认原型表单。
这是我目前有:
var contactForm = new VarienForm('productcontactForm', true);
contactForm.submit = function(){
if (this.validator.validate()) {
$('#productcontactForm').submit(function(){
$('input[type=submit]', this).attr('enabled', 'enabled');
});
} else {
$('#productcontactForm').submit(function(){
$('input[type=submit]', this).attr('disabled', 'disabled');
});
}
}.bind(contactForm);
任何人有任何建议吗? – Corey 2014-08-29 14:33:24