I've been running into a problem with conditional fields not properly hiding themselves in forms using CiviCRM processing. When I duplicate the fields and their conditional criteria in a standard, non-CiviCRM-integrated Webform, the conditionals behave as they should.
For example:
question 1 - select list values a, b, c - should always show (and does)
question 2 - select list or radio button values 1, 2, 3 - should show ONLY if value of question 1 is b or c
In a CiviCRM webform, question 2 will not hide, whether on a fresh form load (showing "-select-" for question 1), or when I select the "a" option. In a standard Webform, it respects the conditional values.
In addition to Webform_CiviCRM 7.x-1.4, my site is using CiviCRM 4.0.3, Webform Conditional 7.x-1.x-dev, Webform 7.x-3.11, and the Webform patch provided in #15 of http://drupal.org/node/1078750 (to add -Select- and -None- to select lists).
I realize this problem crosses some module boundaries -- since I can reproduce it only on Webforms with CiviCRM integration this seems like the place to start. Thanks for any help!
Comments
Comment #1
colemanw commentedI have never used webform_conditional, so I'm not sure what's going on for you. Is this still a problem with the 2.x branch?
Comment #2
petednz commentedOne risk is that the info page on this module says "Also Works Nicely With" Webform Conditional so there is some expectation by the punters ;-)
Comment #3
colemanw commentedSo far this is the only report of any problems with those two working together. Were your tests all successful Pete?
Comment #4
m.e. commentedJust reporting back that since my 2.x upgrade - and removing, then re-adding all the fields on this form - I am no longer seeing this problem.
Comment #5
colemanw commentedWell good. That's one issue we can close.
Comment #6
m.e. commentedAlas, I spoke too soon. With yes/no fields, the problem still exists - again, only in Webforms integrated with CiviCRM. I can't reproduce it in a standard Webform. Note: when a field is created using the Webform GUI, there is no yes/no type as in CiviCRM, so my test fields are of "select options" type. I have tested them both as radio buttons (the default) and list/dropdown display (as per the option on the Webform GUI) and the conditionals work flawlessly both ways.
On my site under development I have developed a workaround using one field with more options, so this may not be your top priority, but I thought you'd want to know.
Comment #7
m.e. commentedI'm poking this thread again because I have a field pair that isn't responding to my workaround. @coleman, if you still have the credentials, you can log back into my site as user 1 and look at the 3rd form in the FORMS tab. The 3rd question on that form is a CiviCRM yes-no that should control the appearance of the 4th question, but doesn't. The 4th question won't go away. (Other yes/no fields do seem to be able to control later questions -- this one pair of fields is stubborn, I guess.)
I wondered whether Webform Conditional was malfunctioning just because of the sheer number of options in the 4th question, but if you look at the form with alias "testtest" you'll find a non-CiviCRM Webform with a many-optioned field that does know how to hide itself based on a previous answer. So that's not it....
I'm on 7.x-2.x-dev (last updated 9-2-11).
Thanks!
Comment #8
colemanw commentedI think I just don't know enough about this to be helpful. I've never used webform_conditional and so probably shouldn't have advertised compatibility with it. I just thought that it should work since this module doesn't mess with anything that webform_conditional should care about. Guess not.
Comment #9
m.e. commentedI found a workaround rather than trying to solve this mystery. :)
Comment #10
colemanw commented