Page 1 of 1

Disable button on submit (v9)

Posted: Sat Aug 03, 2013 10:41 pm
by Adam

I'm not sure if this is a problem, or just how the feature is implemented...

I've just added a Multi-Update feature that allows records to be updated in batches of up to 500.

I've noticed that, with a large batch, the submit button remains clickable... right up to the point that the list page is re-displayed.

I assumed that the button would be disabled with JS or jQuery so I'm not quite sure what to make of this.

Is it a problem or is the "disabling" being handled another way?


Re: Disable button on submit

Posted: Mon Aug 05, 2013 4:30 pm
by danielc

Have you enable [Tools]->[Advanced Setting]-> [Disable button on submit] option? What PHPMaker version you are using?

You can search for "//Submit" in ewp*.js to see the code.


Re: Disable button on submit

Posted: Wed Aug 07, 2013 6:17 am
by lhardee

Hi Adam,

I had this problem as well.....another way to handle this in addition to what the Webmaster has provided is the following:

At the bottom of my add/edit page, i place the following javascript

<script type="text/javascript">
$(document).ready(function() {
// bind to on submit event
$('form').bind('submit', function(e) {
// disable any input buttons
$(this).find('input:submit').attr('disabled', 'disabled');
// after 3 seconds, renable them, should give enough time to submit as normal
setTimeout( function() {
$('form').find('input:submit').removeAttr('disabled');
}, 50000);
});
});
</script>

This works nicely because if the user needs to hit submit again, you can adjust the time (50000), which will make the submit button clickable again.

Hope this helps!!!

lhardee


Re: Disable button on submit

Posted: Thu Aug 08, 2013 1:41 am
by Adam

Thanks for that - yeah... I did have the option set in advanced settings (running 9.20) but this is an especially ong process (or can be) so I just need to disable the button and wait for the page to refresh.