If you have 2 blocks with the same webforms on the page, they (and their content) haven't got unique HTML id tags.

In webform.module:

  // Avoid building the same form twice on the same page request (which can
  // happen if the webform is displayed in a panel or block) because this
  // causes multistep forms to build incorrectly the second time.
   $cached_forms = &drupal_static(__FUNCTION__, array());
   if (isset($cached_forms[$node->nid])) {
     $form = $cached_forms[$node->nid];
   }

Comments

vejed’s picture

Issue summary: View changes
Status: Patch (to be ported) » Active
DanChadwick’s picture

Status: Active » Closed (works as designed)
Issue tags: -webform id webform-client-form

I believe from the comment that multi-page forms requires that the ids be the same, even though this will make the form fail html validation. Under the circumstances, I think this is the best we can do.

I will ask quicksketch to comment directly. I would also think that is probably not a great user experience to see the exact same form on the page twice.

quicksketch’s picture

Yes, this functionality is intentional (as indicated by the code comments). It's not great that some modules (Panels) render the entire node twice on the same page, but only display them once. From the original issue, we had several complaints about CSS and conditionals breaking when used within a panel. In this case, it's the lesser of two evils.