To my knowledge same page conditionals were merged into webforms in the alpha 6 installment. However, I am unable to get this to work properly using the standard approaches previously used with the separate module. Setting a component that will be conditional in a subsequent field is not rendering properly.

If "List Option 1" is "A" then show "List Option 2" is the current conditional.

Where List Option 1 is before List Option 2 but on the same page. Further I have tried placing list option 2 in its own fieldset and calling that to show instead of List Option 2 directly.

I have no other webform modules enabled.

Members fund testing for the Drupal project. Drupal Association Learn more


JMOmandown’s picture

65.55 KB

Looking at this in IE shoed that the JS was screwing up. Disabling JS aggregation made all the selection properties in the conditionals tab display properly (In IE the top conditional was always completely blank with it Enabled, even when moving a different conditional to the top). With JS ag. disabled a new clue has presented itself. It seems that all conditionals are automatically assigning the "time - is at" selection by default and not allowing this to be changed.

If this is indeed the case then it would obviously explain why the same page conditional is not working. Not real sure where to proceed from here?

quicksketch’s picture

Thanks JMOmandown for the report. This sounds similar to #1713384: Selecting Any Field With value="equal" in conditional rules jumps to "Time - is at". I'm having trouble replicating these problems, so any more information you can provide is appreciated.

Besides IE throwing errors, other browsers also don't work, correct?

JMOmandown’s picture

Correct, although the "Time- is at" is display as "Selection - is" in other browsers. In any case all browsers are not dynamically changing the display of items dependent upon selection (same page) as they should.

If it would help you to solve these issues, keeping in mind that you are having problems reproducing, I have no problem setting up an account for you to take a look at it on our site directly and working with you to test code fixes.

Nicolas Bouteille’s picture

It might help you to now that this problem is happening to me only on Webform nodes that were previously created when I was on Webform 3.17.
I want to hide my textfield "Other country" unless the option "Other" is selected in the Countries list but is isn't working.
Although no conditional rules had ever been added to this node before, I tried to run the update script from Webform conditional 2.x-dev so that my old webform node could be updated but it didn't make a difference.
It tried creating a new Webform node with these only two fields now that I am on Webform 4.alpha6 and the "Other country" field shows and hides correctly.

ramez.gaberiel’s picture

I had a similar issue where I installed the webform conditional module alongside a webform3.x module, I created a few conditionals, then read that webform4.x had merged them so I uninstalled the webform conditionals module and upgraded to webform4.x alpha.
I saw that no matter what options I selected it always updated my answer to Time -is at.

I was able to resolve this issue however by clearing my Drupal cache (configuration ->Performance -> clear all caches)
AND clearing my browser cache.

This also fixed another problem I had with removing those conditionals and I was getting errors.

I hope this helps someone

pjbarry21’s picture

I'm having the same issue. Went from the older version of webform and a form that was created in that version, to version 4 and now the conditionals do not work (the old conditional info didn't get pulled in AND any conditionals I create now do not do anything). I have cleared the cache for the site and for my browsers and no change (in terms of trying what worked in #5).

Any thoughts on what else I could do to get this working or what else I should be checking? There are no errors.


quicksketch’s picture

@pjbarry21: I hate to ask, but you did run update.php when you upgraded to 4.x, right? The new conditionals system requires new database tables. The upgrade should convert the old conditionals to the new ones for you upon running update.php. And it should go without saying: make a database backup before you upgrade from 3.x to 4.x in the event that the upgrade encounters any errors.

pjbarry21’s picture

The update was done a while ago and yes, update.php has been run several times (for this and for other updates). Thanks for checking, though. I see the new tables in the database and there's info in there for the forms that looks right (based on what I enter on the new conditional "tab").

And I'm fine with it not having the old conditional info -- I just want to be able to create new ones and while I can create them, they don't do anything.

soundstripe’s picture

I'm having the same issue

1) installed webform on a new site (along with mollom, options elements, and select or other).
2) created a new webform
3) added a conditional based on a select options field to show a text field if a certain value is selected
4) tested form. conditional does not work (some js is working, because the select field has an "other" option that does work).

quicksketch’s picture

1) installed webform on a new site (along with mollom, options elements, and select or other).

Hey @soundstripe, I've confirmed that Webform's same-page conditionals do not work when using a select-or-other field. When using a field without the "other" option enabled, everything works fine.

quicksketch’s picture

This patch fixes the problem described in #9, where conditionals based on select or other were not working properly. The issue here was that the "Other" textfield was the only field that was being checked for a value, rather than the select list. I've rearranged the conditional checking to do checks on radios/checkboxes, then select lists, then text fields and areas. This fixes select or other fields when they are the source elements in a conditional.

I've committed this patch to the 4.x branch of the project. I'm leaving this issue open for any further feedback for the time being. Between this fixing #9, and #5
reporting that the problem was fixed by clearing browser and Drupal caches, I'm not sure if there are additional problems left here that need to be solved.

quicksketch’s picture

Status: Active » Postponed (maintainer needs more info)

Any further reports of this problem, please provide steps to reproduce them.

epiphanydigital’s picture

Using this in combination with "select or other" fails every time for me. There are no errors, but if "allow other" is selected on a select list field with radio buttons, then nothing happens with a rule in place. I'm trying to show/hide a fieldset. The moment I remove "allow other" option on the field, everything works as expected.

quicksketch’s picture

@epiphanydigital: Could you elaborate? Did you apply the patch in #11 (or run the latest dev version?) The current alpha6 does not include the change.

philsward’s picture

Just a quick note for anyone else having a similar problem but nothing else seems to work...

I noticed in an issue (not sure which) that JS aggregation was causing someone problems with conditionals and disabling it, fixed their problem. I too had a similar problem as this issue and the issue regarding the time - is at. I decided to test the aggregated js fix but I use the Advanced CSS/JS Aggregation module instead of what core has, disabled it and voila! The conditionals started working.

At the time of testing (having problems), I was using an older dev from June 2013 but rc3 was released in Aug 2013. I updated to rc3 and things started working as expected.

If you're having issues, try disabling any js aggregation and see what happens.

sheila8stamp’s picture


I was having similar problems but had no js aggregation set but finally worked out what was happening on my webforms. I am on Webform 7.x-4.0-alpha10 on Drupal 7.23.

Using Chrome's development tools I found I was getting a message - "Uncaught Syntax error, unrecognized expression."

I eventually narrowed it down to the Fieldset component.

If you tick the Hide Label you get the above message and the conditionals won't work. If you leave the Hide Label unticked, conditionals work fine.

Hope this helps someone!


quicksketch’s picture

Thanks @sheila8stamp! That's a great report. It might make sense to be a dedicated issue, but it's hard to tell if that was the cause of the original poster's issue or not. It definitely warrants investigation though!

quicksketch’s picture

Issue summary: View changes
Status: Postponed (maintainer needs more info) » Active

Let's set this back to active. If anyone gets a chance to confirm #16 before I do, please post your results.

quicksketch’s picture

Title: Same Page Conditionals Not Working » Same Page Conditionals Not Working when Fieldset title hidden
DanChadwick’s picture

Using a fieldset as a source component is definitely a problem, and is fixed in #1713384: Selecting Any Field With value="equal" in conditional rules jumps to "Time - is at". If you ever see option groups in the operator list, jQuery has had an exception and stopped running. Use the javascript console to see the error.