Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // Snippet to change GravityForms 'Submit' button to 'Processing...' and disable it
- add_filter('gform_pre_render_1', 'disable_submit');
- function disable_submit($form) {
- ?>
- <script type="text/javascript">
- jQuery(document).ready(function($){
- $('#gform_submit_button_<?php echo $form['id']; ?>').on('click', function(event){
- var submitCopy = $(this).clone();
- submitCopy.prop('id', '').prop('disabled', true).prop('value', 'Processing, please wait...').insertAfter($(this));
- $(this).hide();
- });
- });
- </script>
- <?php
- return $form;
- }
Add Comment
Please, Sign In to add comment