I have a webform which has a multiple select list which on submit only the currently selected one is emailed. I would like all my selections from conditional fields to be emailed not just one.

My use case is, I have a select list with A,B,C,D and E and my condition is that text-field F & G is shown when A is selected. This is also the case when B is selected to show text-field H & I, but upon entering options on text-field H & I the data entered for F & G is lost on submission.

What would be ideal is to remember all selections with conditional fields that are NOT empty. My use case is a reservation page that ask users to choose a drink i.e Wine, Beer, Champagne and each selection is triggered by a conditional field(s) which prompt for more info.

Thanks in advanced. P.S grid type is not an option because it allows only one selection per question.

CommentFileSizeAuthor
#4 selection.png10.29 KBlikewhoa
#4 options.png6.88 KBlikewhoa
#4 conditions.png36.6 KBlikewhoa
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

quicksketch’s picture

Hm, what you're describing is intentional functionality of Webform. If a condition determines that a field should not be shown, then the values from the hidden field are entirely discarded from the submission. Additionally, the rendering of the submission follows the same conditional rules, so even if the values were saved, they wouldn't be displayed when viewing a submission unless the conditional field determined that the target field should be shown. I think what you're trying to do would be better served by something other than the conditional system, such as basic JavaScript added to your page to show/hide certain fields.

likewhoa’s picture

so you can't have multiple conditional events on a single element is what your saying because only one of them will be submitted? Doing JS won't actually work since webform only submits via email what is shown on the page, that is whatever selections are made and those selections done with multiple conditions on a single field are limited to one.

quicksketch’s picture

Doing JS won't actually work since webform only submits via email what is shown on the page, that is whatever selections are made and those selections done with multiple conditions on a single field are limited to one.

Webform doesn't care what's shown or not shown on the page, that's just for the benefit of the end-user. If you show/hide fields with CSS or JS, Webform will be none-the-wiser for it. Webform only accepts the values based on server-side processing of the conditional rules. The JS that Webform adds by default just makes it so that the user experiences the same thing that the server will process.

likewhoa’s picture

FileSize
36.6 KB
6.88 KB
10.29 KB

I understand but from a UIX point of view, having to show all hidden fields would look really confusing to the client. I have one drop down list which has conditions to show two text fields and since webform's conditionals doesn't allow you to show/hide the same field(s) from multiple conditions I had to clone these fields so they would show up when an option is selected on the drop down list.

Having to show these fields using JS on selection and bypass webform's conditional fields would really clutter up the page. What would be ideal is for webform to continue using it's conditional logic, but instead of not remembering which fields and selections got selected, it should just submit these since the users made a selection.

Eitherway, I might just end up using conditional_fields modules with a content type and setup rules to email on submission. Thanks for your feedback and support.

DanChadwick’s picture

Issue summary: View changes
Status: Active » Closed (works as designed)

Closing for lack of activity. I don't see this being implemented in webform, and I'm not sure it is desirable.