So... I change line 1623 in uc_cart.module from:
<?php
$form['submit'] = array('#type' => 'submit', '#value' => variable_get('uc_checkout_submit_button', t('Submit order')));
?>To:
<?php
$form['submit'] = array(
'#type' => 'submit',
'#value' => variable_get('uc_checkout_submit_button', t('Submit order')),
'#attributes' => array('onclick' => '$(this).click(function() { return false; });'),
);
?>When someone clicks the button, it will get a new onclick function that returns false, thereby canceling any duplicate form submissions. My only question is what if there is a timeout or something else? Then they'll sit there click "Submit Order" over and over with no result.
Any thoughts? Should I keep this mod?



Joined: 08/07/2007