Closed (duplicate)
Project:
Webform
Version:
7.x-4.0-alpha6
Component:
Miscellaneous
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
29 Jan 2013 at 10:39 UTC
Updated:
29 Jul 2014 at 20:48 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
quicksketchHi @FNGR, thanks for the report. I haven't experienced this problem myself but I'll try to reproduce it when I get the chance. Webform should be able to handle this situation. Since all conditional checking hinges purely on the submitted values, it shouldn't matter if a 3rd field is dependent upon a 2nd field (which is dependent upon the 1st field). As long as the 2nd field has the right value, the 3rd field should be shown when viewing the results.
Comment #2
Drupal Musician commentedI am experiencing this issue as well. My issue is not limited to select list responses not being included, text fields are not included either. After looking into an issue with the Select (or other) module and webform labels I saw that the fields which are not in the results are those whose display is conditional on a select list with the "other" option enabled. To be clear. If the Field A is a select list with the other option enabled, the fields that are displayed conditional to A's answer do not store in the results. I decided to try disabling the Select (or other) module. This solved the issue with the labels and the conditionals of select lists not being shown in the results. It seems that there is an issue with of the Select (or other) module which interferes with the conditions of the select list it is applied to I have recreated the issue in 7.x 2.19 and 2.18. It throws this error as well when enabled.
Warning: strcasecmp() expects parameter 1 to be string, array given in webform_conditional_operator_string_equal() (line 892 of /sites/all/modules/webform-7.x-4.0-alpha10/webform/includes/webform.conditionals.inc).Comment #3
michaelschutz commentedHi - I can confirm that this is happening with Select (or other) fields only. Values in fields are displayed as a result of conditions (both select and textfields) are not being submitted properly (though they're acting just fine on the form page - they show up properly and can be filled out/clicked on normally). I get the same error for each value that's trying to be passed:
"Warning: strcasecmp() expects parameter 1 to be string, array given in webform_conditional_operator_string_equal() (line 892 of /SITEDIR/sites/all/modules/webform/includes/webform.conditionals.inc)."
If it's a select that doesn't include "other", then it stores the value fine. I don't know enough to know if this is a fix needed in Webform or Select-or-Other.
Using 7.x-4.0-beta1.
Comment #4
TBarina commentedSubscribe #3
Comment #5
blueblot commentedhi
I had the same problem with conditionals and select-or-other. I just disabled the select-or-other module and created my select list with conditionals.
After I enabled the module select-or-other again, I added the "other" option and now it works fine.
also using 7.x-4.0-beta1
Blueblot
Comment #6
msnassar commentedi also faced this issue and still.
i have hierarchical multiple select with select_or_other component like:
field1 (radio btn)
----field11 (multiple select with select_or_other)
------field111 (multiple select with select_or_other)
Warning: strcasecmp() expects parameter 1 to be string, array given in webform_conditional_operator_string_equal() (line 892 of sites/all/modules/contrib/webform/includes/webform.conditionals.inc).
i am using 7.x-4.0-beta2
any fix?
Comment #7
msnassar commentedHi again,
The issue still exists in beta3.
Comment #8
joelstein commentedSame issue here. The $input_values come in as a nested array of 'select' and 'other' arrays, instead of a single array of values.
The attached patch doesn't fix all conditional callbacks, but it does fix for the "is equal" callback, which is what I needed. Somebody else can run with this and fix the other use cases.
Comment #9
liam morlandThe fix in #2307619: Warning: strcasecmp() expects parameter 1 to be string, array given in webform_conditional_operator_string_equal() takes care of the "strcasecmp() expects parameter 1 to be string" warning. It does essentially the same thing as the patch in #8.
Setting to "needs review" due to the patch in #8.
Comment #10
danchadwick commentedRe patch #8: I suspect that this patch would cause problems with a select list containing "select" as a key and no "other" list.
Comment #11
danchadwick commentedComment #13
danchadwick commentedFixed by virtue of related issue being fixed (in a different way than patch #8). Marking as duplicate.