I'm trying to disable a form button (contact form 7) after submitting and then save the disabled state to localstorage. This disables the button after submitting:
jQuery(document).ready(function($) {
$("#buttonID").click(function () {
setTimeout(function () { disableButton(); }, 100);
});
function disableButton() {
$("#buttonID").prop('disabled', true);
}
});
How can I save the disabled state to localstorage so it stays disable?