Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Change 'Submit' button to 'Processing...' and disable it
add_filter('gform_pre_render', 'disable_submit');
function disable_submit($form) {
<script type="text/javascript">
$('#gform_submit_button_<?php echo $form['id']; ?>').on('click', function(event){
var submitCopy = $(this).clone();
submitCopy.prop('id', '').prop('disabled', true).prop('value', 'Processing...').insertAfter($(this));
return $form;

This comment has been minimized.

Copy link

bluantinoo commented Mar 7, 2016

I've got an error on line 9 that prevents messages to be sent.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.