Fix for Fix for Fix for Disable a form using jQuery, then Renable with a button

  1. Drupal.behaviors.enableSignupEditForm = function(context) {
  2.   var $button = $('#edit-update-signup', context).click(enableForm);
  3.   var $form_elements = $button.parents('form:first').find('input, textarea, select');
  4.   var title = $button.val();
  5.  
  6.   $form_elements.attr('disabled', 'disabled');
  7.   $button.attr('disabled', '').val(Drupal.t('Change values'));
  8.  
  9.   function enableForm() {
  10.     $form_elements.attr('disabled', '');
  11.     $button.unbind('click', enableForm).val(title);
  12.     return false;
  13.   }
  14. }
  15. http://www.google.com

Submit Fix

Any tags you'd like to associate with your code, delimitered by commas (example: Views, CCK, Module, etc).
Select the syntax highlighting mode to use.