Tell me more ×
Drupal Answers is a question and answer site for Drupal developers and administrators. It's 100% free, no registration required.

According to module description this is possible.

However I didn't find how to do it and I did not able to exclude form by any way, e.g:

http://drupalcode.org/project/hide_submit.git/commit/8aab1ab

share|improve this question
The 7.x-1.x branch is very different to the 7.x-2.x branch, and it looks like you've got the former installed. The description on the module page refers to the latter, which is probably where the discrepancy in functionality is coming from – Clive Apr 25 at 12:00
@Clive, yes I have 7.x-2.0 – drupality Apr 25 at 12:01
My mistake, 2 secs I'll put an answer in... – Clive Apr 25 at 12:03

2 Answers

The commit you link to is from Sun, 19 Apr 2009. That code no longer exists in the latest drupal 7 version.

After having a quick look at the latest drupal 7 code there doesn't seem to be such a feature in it anymore.

share|improve this answer
1  
Have a peek at the hide_submit.api.php file, the solution is documented in there in the latest stable release (I used it myself a couple of weeks ago, works a treat) :) – Clive Apr 25 at 12:13
I did the same research and I can confirm it – drupality Apr 25 at 12:14
@Clive Thanks, I'll do – drupality Apr 25 at 12:14
Nice, so you can do it, there just isn't a setting in the UI anymore. – rooby Apr 25 at 12:16
1  
Yeah...that module confuses the **** out of me; if I'm being honest, I actually ditched the module altogether and wrote my own version of the code soon after implementing that hook. More trouble than it's worth – Clive Apr 25 at 12:17
show 1 more comment

The 2.x branch introduced hook_hide_submit_alter() which can be implemented to exclude certain forms based on the current path:

function MYMODULE_hide_submit_alter($hide_submit_settings) {

  // IMPORTANT NOTE: given the way module_invoke_all and array_merge work you
  // should not modify and return the original array. Instead create a new one
  // and add only the keys you care about. If two modules implement this hook
  // and try to modify the same values then the default will be used instead.
  $altered_settings = array();  

  // Disable the module for my special form page.
  if (arg(0) == 'my-special-form') {
    $altered_settings['hide_submit']['hide_submit_status'] = FALSE;
  }

  return $altered_settings;
}

There doesn't look to be a way to turn the functionality off for a specific form, just by path. Might be worth a feature request on the module issue queue if that's something you'd like to see.

share|improve this answer
1  
I would upvote but I used all my votes for the day so I'll go to bed :) – rooby Apr 25 at 12:17

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.