An error occurs if you include in the module Webform to send emails in HTML code.
Notice: Undefined index: #type in bootstrap_form_element_label() (line 199 of /.../sites/all/themes/bootstrap/includes/form.inc).
This is most likely due to the fact that the Bootstrap wrapper adds a "control-label" is to all forms
// @Bootstrap: Add Bootstrap control-label class except for radio.
if ($element['#type'] != 'radio') {
$attributes['class'][] = 'control-label';
}
How to avoid this is for the module web form I do not know. It is worth noting that the Bootstrap does not use this class in CSS.
Comments
Comment #1
markhalliwellIt was likely an error in the webform module. I cannot reproduce this with the latest dev of this base theme and the latest release of webform.
Comment #2
jmedina commentedAny updates on this? Webform still seems to store the data just fine but I am wondering if I can get rid of that warning.
Comment #3
jmedina commentedIf you still can't reproduce this please feel free to switch the status.
Comment #4
markhalliwellI already tried to reproduce it, I couldn't. Screenshots and reproduction steps (ie: click by click creation of webform/submission) will need to be submitted.
Comment #5
jmedina commentedI will try to provide you with more info. This seems similar. https://drupal.org/node/1778642
If it seems to store everything just fine there should be no problem right?
Comment #6
jmedina commentedOdd... I seem to only be getting the error with one particular form. Not only that but the module that creates the PayPal donate button is acting up. Not related to this but I am thinking that module is really buggy.
Comment #7
robin van emden commentedI encounter the same problem with the latest webform (4.x-dev) module - if you view a submission, $element does not contain #type. Maybe you can add
to ensure no warnings are issued, even though another module might be the culprit?
Comment #8
Angry Dan commentedI'm getting the same error for a non-related issue.
Adding this helps:
Robin, using
!issetand||instead because the if should only not run if#typeis 'radio'. Probably of little relevance but this is functionally equivalent to current behaviour without the notice.Comment #9
amberau79 commentedThe fix from #8 solved this for me
Comment #10
agerson commentedI get this error as well.
Comment #11
jaesperanza commentedHi amberau, how did you exactly implement #8? getting WSOD inserting the line...
Comment #12
jaesperanza commentedPlease disregard my question, got #8 working by this:
change from:
to:
Thanks!
Comment #13
markhalliwellThis has been (mostly) fixed in 3.x already. The 2.x branch only receives security fixes.