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

colemanw’s picture

I 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?

petednz’s picture

One risk is that the info page on this module says "Also Works Nicely With" Webform Conditional so there is some expectation by the punters ;-)

colemanw’s picture

So far this is the only report of any problems with those two working together. Were your tests all successful Pete?

m.e.’s picture

Just 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.

colemanw’s picture

Version: 7.x-1.4 » 7.x-2.x-dev
Status: Active » Closed (cannot reproduce)

Well good. That's one issue we can close.

m.e.’s picture

Status: Closed (cannot reproduce) » Active

Alas, 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.

m.e.’s picture

I'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!

colemanw’s picture

I 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.

m.e.’s picture

I found a workaround rather than trying to solve this mystery. :)

colemanw’s picture

Status: Active » Closed (cannot reproduce)