Conditional fields are always hidden in the submission result page

The correct fields are already filtered in the code (inside the function `webform_conditional_webform_submission_render_alter`)
The javascript then hides the remaining conditional fields, which should actually be shown.

Quick&dirty patch would be to check for an input in the javascript and only hide the field if one is found (on line 50):

    if(formItemWrapper.length > 0 && formItemWrapper.find(':input').length){

Comments

tedbow’s picture

Should the javascript even be output on this page?

jtjones23’s picture

Any update on this issue? I've set up a conditional select field and only one field is displayed on the submission no matter how many I choose.

Never mind, I changed the keys from a,b,c to 1,2,3 and and the submissions display properly.

raulmuroc’s picture

Issue summary: View changes

Same prob here and agree, this piece of code:

if(formItemWrapper.length > 0){
    // Add onclick handler to Parent field
    Drupal.webform_conditional.addOnChange (triggerField_key, triggerField_info, key);
  }
});

Makes fields being hidden. To be more concrete, on a webform multistep, when forward to next step, and the coming back to the previous step, fields like sub-selects are hidden (disappeared, as its values are not anymore being considered).

raulmuroc’s picture

Version: 7.x-1.0-beta1 » 7.x-1.x-dev
raulmuroc’s picture

Curious, I uploaded webform from 7.x-3.21 to 7.x-3.22 and now this solution doesn't work. :S weird....

eeric49’s picture

Assigned: Unassigned » eeric49
Category: Bug report » Support request

Hello Team I wish to ask on how to work around the Webform same conditional.
Here is what I tried but cant make it work..
//---------------
Select No. of days ____ [1, 2, 3, 4, 5, 6]
Depending on the number select...
For example:
I select 3 days (The conditional rule will display 3 selection fields and hide fields 4,5,6)
Display Field Select 1:
Display Field Select 2:
Display Field Select 3:

//-------------
I appreciate your continued support. Apologizes for any inconvenience

spadxiii’s picture

Assigned: eeric49 » Unassigned
Category: Support request » Bug report

@eeric49: Please post a new issue instead of changing existing issues, which are quite unrelated to your question.