It would be great if there was an option of making an exception for specific forms or buttons.

For instance, you may not want to use it for Search button, but for anything else. Or you may want to use it only with comments (Preview and Submit).

Comments

optalgin’s picture

This is on my todo list but this is a complicated feature and will take some time

* Alternate button selectors using CSS tags

optalgin’s picture

I've implemented this feature in 6.x release and it is being tested now
I'll backport this into 5.x soon

* wasn't too complicated after all :-)

mkrakowiak’s picture

Great news, Optalgin! I'll be happy to test the D5 version.
Thanks very much!

optalgin’s picture

5.x-1.x-dev is ready with some new features and fixes
Check the advanced fieldset, new configuration added for excluding forms by form-id
or by (advanced) jQuery attribute filter

use the following to exclude "Search" button.
This one is using the button's text

[value!=Search]

optalgin’s picture

Assigned: Unassigned » optalgin
Status: Active » Needs review
mkrakowiak’s picture

Great job! It... almost works as it should. The only problem I see right now is caching. With caching enabled in normal mode you'll get white screen of death. I've encountered this before though and know that what's causing it is calling drupal_add_js() in hook_init(). See this: http://api.drupal.org/api/function/hook_init/5. Right now I'm swamped with work but in a week or so I may play with the code a bit more and try to fix it.

optalgin’s picture

Status: Needs review » Fixed

I guess this one is fixed...

mkrakowiak’s picture

Version: 5.x-1.0-beta1 » 5.x-1.0
Category: feature » bug
Status: Fixed » Active

Optalgin, I never got a chance to work on it and it still crashes the website with normal caching on. It works fine until I refresh any page. Then I get white screen with this message:

Fatal error: Call to undefined function filter_xss_admin() in /sites/all/modules/hide_submit/hide_submit.module on line 297

To make this work, I actually have to disable caching...

optalgin’s picture

Sorry for changing the status, I was sure it is fixed..

Can you try and remove this function call and try again..
It is not really necessary if you are the site admin

mkrakowiak’s picture

For a minute I thought this was now fixed, but then I got the following error:

Fatal error: Call to undefined function t() in /home/sleekmod/public_html/cpj/sites/all/modules/hide_submit/hide_submit.module on line 280

optalgin’s picture

Status: Active » Fixed

I think the original issue is closed, according to title
I'm closing the current issue and re-opening an old issue about t() function

#463468: When site caching is enabled I get - Fatal error: Call to undefined function t()

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.