Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
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.
Comment | File | Size | Author |
---|---|---|---|
#10 | Screen Shot 2014-02-24 at 1.14.04 PM.jpg | 187.28 KB | agerson |
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 CreditAttribution: 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 CreditAttribution: 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 CreditAttribution: 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 CreditAttribution: 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 CreditAttribution: 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 CreditAttribution: Angry Dan commentedI'm getting the same error for a non-related issue.
Adding this helps:
Robin, using
!isset
and||
instead because the if should only not run if#type
is 'radio'. Probably of little relevance but this is functionally equivalent to current behaviour without the notice.Comment #9
amberau79 CreditAttribution: amberau79 commentedThe fix from #8 solved this for me
Comment #10
agerson CreditAttribution: agerson commentedI get this error as well.
Comment #11
jaesperanza CreditAttribution: jaesperanza commentedHi amberau, how did you exactly implement #8? getting WSOD inserting the line...
Comment #12
jaesperanza CreditAttribution: 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.