This patch removes referencing $component['type'] in a few of our component render functions. These calls are entirely unnecessary because we already know which component we're in, so there's no need to use a variable. The motivator for this issue is better compatibility with Form Builder. See #1149964: Reduce duplicated code between Form Builder and Webform (default fields).

Comments

quicksketch’s picture

Status: Active » Fixed

Committed to both branches.

tstoeckler’s picture

Status: Fixed » Needs work
+++ b/components/fieldset.inc
@@ -52,13 +52,13 @@ function _webform_edit_fieldset($component) {
+    '#attributes' => array('class' => array('webform-component-fielset'), 'id' => 'webform-component-' . $component['form_key']),

Seems this should have been 'webform-component-fieldset' (note the d in fieldset). The typo is only in the D7 patch.

quicksketch’s picture

Status: Needs work » Fixed

Nice one! Thanks tstoeckler! Fixed and committed.

Status: Fixed » Closed (fixed)

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