There are pages where you come across multiple form submit buttons, for example pages with both a search box and a comment options form, like the following:

http://drupal.org/comment/reply/270093

In the page code above you have

line 38:
<input type="submit" name="op" id="edit-submit" value="Search" class="form-submit" />

line 96:
<input type="submit" name="op" id="edit-submit" value="Post comment" class="form-submit" />

where "edit-submit" is not unique.

Hope this will be fixed in future drupal releases…

Comments

stevenpatz’s picture

Version: 5.7 » 7.x-dev
IncrediblyKenzi’s picture

This is actually a big issue, especially when invoking custom scripting functionality against #edit-submit, or running any kind of automated testing that clicks the edit-submit button.

The obvious fix is to set the search submit button's name to 'search-submit.'

I note that this is now slated for 7.x, but is there any chance of a backport?

lilou’s picture

mr.baileys’s picture