Since I updated to the latest dev version I have a strange problem with hiding fields on conditions.

I have 9 text fields. Each one should trigger a fieldset to become visible when the text field is not empty. So the rule is "if text field is not empty show fieldset" for each of the 9 fields individually. This worked with 7.x-4.7. Now all fields are showing initially. Only when something is entered in the text field, the focus leaves the field, the text field becomes empty again and the focus leaves it again then the fieldset gets hidden. I've tried the rules the other way around "if textfield is empty then hide fieldset", with the same problem.

This block of 9 conditions occurs several times in the webform. They all have show the same behavior, except for one. In the first block of conditions the first text field is working as expected, and the last of the 9 is not hiding the fieldset even after entering and removing text in the field.

I've tested it with Chrome and Firefox. I can't find anything that is different about the condition that is working.

Comments

DanChadwick’s picture

Exactly which version are you using. 7.x-4.7+N-dev -- what is N (the number of commits since 4.7).

I think you'll need to simplify this to a set of instructions I can follow to start with a new webform and reproduce the problem.

Did you update function run correctly? Until 4.7+19-dev (the latest as of today) there was an problem with the hook_update, which probably prevent its operation.

And last, if you look in the database, was the table webform_conditional_actions get properly created and populated with one entry for each entry in webform_conditionals?

steeph’s picture

Category: Bug report » Support request
Status: Active » Fixed

I could fix this by going back to 7.x-4.7 and updating to dev again. Maybe something went wrong the first time I updated. (There was no error message though.) I'll answer your questions anyway. Maybe it helps somebody.

On the download page it says 7.x-4.7+19-dev, and I am sure this is the one I have installed. But my module page says 7.x-4.5+6-dev (with Drupl 7.36).

There was no error running update.php, but apparently there wasn't an update either. There is no webform_conditional_actions table, only webform_conditional and webform_conditional_rules.

Before replacing the module again, I could reproduce it with a simpler webform:
Create a webform with more than 2 fieldsets, each containing a textfield.
Create more than 1 condition with the pattern "If [fieldset: textfield] is not blank then show [different fieldset].
The first condition works as expected, all the following conditions only apply after the textfield was filled and emptied.
(My real form is more complex. But it's the same structure and the same behavior.)

DanChadwick’s picture

I don't think the packaging manager lies. Maybe you downloaded to another directory. You might search to prevent confusion later.

steeph’s picture

Well, I looked into it again. I guess I didn't have the latest dev installed until now. I do now and everything seems to works. I'm confused anyway.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.