Applied the beta to my local testing site & it broke the form. Also tested on my production site: the second field on this form should hide or show a date picker, depending on whether the value is 0 or 1 (no or yes). After applying the beta update, the date picker is visible in either condition. Rolling back to the previous alpha fixes.

CommentFileSizeAuthor
#2 node_export_webform_conditional.txt5.92 KBAnonymous (not verified)

Comments

tedbow’s picture

@seezee, Could provide text form export that has this problem. Instruction are provided here http://drupal.org/node/add/project-issue/webform_conditional

This will make fixing this problem easier. Thank you.

Anonymous’s picture

StatusFileSize
new5.92 KB

Here's the export.

tedbow’s picture

@seezee, thanks for the export. when I import form the date picker is hidden and shown depending on radio buttons. Seems to be working.

Anonymous’s picture

Hmm … even on this simple form in my local site, it stopped working if I updated to the beta (rolling back fixes). I checked for javascript errors & don't see any.

Also tested in various browsers w/ same results: current WIN versions of Chrome, FF, Opera, & Safari + IE6 & IE8 w/ & w/o compatibility mode. What next?

tedbow’s picture

Could be some other module or theme you have enabled is conflicting?

Also to make sure your problem is caused by this module please try to re-create your problem Webform on a new install of Drupal with only the modules you need, preferably only Webform and Weform Conditional. Also test your form with a stock Drupal theme that comes with core Drupal. Theme code can cause the Javascript code in this module not to work.

Could try re-importing the form you provided above. Maybe it's working for me b/c the import fixes some error(not likely but you never know)

Anonymous’s picture

OK, I've narrowed down the cause, but don't have a solution: There's a second webform in a block on the page, normally hidden in a tabbed dropdown. Removing the block temporarily eliminates the misbehaviour.

To reproduce: create 2 webforms. In the 1st form, add a block. In the block, type

$block = module_invoke('webform', 'block_view', 'client-block-##'); print $block['content'];

where "##" is delta for the 2nd form. Now try adding conditionals to the 1st form — it breaks.

szeidler’s picture

Thank you seezee. You saved me a lot of time debugging this problem. But I do not have a solution for this problem, yet.

It looks, that it has something to do with the new structure of
Drupal.webform_conditional.wrappers = new Object(); (webform_conditional.js)
and the removed
if (!empty($js_fields)) {...} (webform_conditional.module)

tedbow’s picture

There are some issue with module and using blocks. I will into it.

tedbow’s picture

Issue tags: +blocks

tagging with "blocks"

densolis’s picture

Hi,

This is just a status update. I will have Ted follow up on this.

Dennis

tedbow’s picture

Issue tags: +2forms1page

Adding 2forms1page tag for issues that seem to happen if you try to put 2 webforms in 1 page

tedbow’s picture

Version: 7.x-1.0-beta1 » 7.x-1.x-dev
Status: Active » Needs review

I just commit a related patch here #1704682: multiple webforms on one page do not trigger conditionals (includes working patch).

It should fix the issue with having 2 forms on 1 page

Let me know if this fixes the issue

avpaderno’s picture

Issue summary: View changes
Issue tags: -, -2forms1page