I have the search-form and a custom Webform-form, both in blocks (in the right sidebar), and the id for the submit button is the same for both: "edit-submit" ... which of course doesn't validate. I have read several comments saying that this is fixed in Drupal 6 and they refer to http://drupal.org/node/111719. But does this node really say that it is fixed in Drupal 6? So why doesn't it work for me using Drupal 6.13? Is it a Webform problem? So, what is the problem? What have I missed? (I have also tried the different phptemplate_submit-fixes presented for Drupal 5, with no success ... just in case.)

Comments

bengt’s picture

Maybe it was a cache-issue ... now there are numbers in the ids. But only if I use this phptemplate_submit-fix:

function phptemplate_submit($element) {
   static $count_double_id=0;
  $tmp = str_replace('edit-submit', 'edit-submit-'. $count_double_id++, theme('button', $element));
  return str_replace('edit-name', 'edit-name-'. $count_double_id++, $tmp);
}

But is it this they talk about when they say that it is fixed in Drupal 6? I thought it was a fix in the core...

This issue is not a Webform issue any longer, so maybe it should be closed, but does anyone have any comment on this or can direct me further?

prisonbreaker82’s picture

I have the same problem... Any solution?

quicksketch’s picture

Status: Active » Closed (fixed)

I can't confirm this problem on new versions of Webform and Drupal. As noted, Drupal 6 should prevent this problem because it gives each element a unique ID by adding a counter to elements with the same name.