I have this under the options section of webform for the Select field.

info@company.com|General
sales@company.com|Sales
tech@company.com|Technical Support

The form is submitted to info@company.com even if I select the button for Sales or Technical Support.

Thanks in advance.

Comments

quicksketch’s picture

Category: support » bug
Priority: Major » Normal

Thanks, I'll have a look into this when I get an opportunity.

-Mania-’s picture

Where can I find this conditional recipients feature? I've been meaning to do exactly what josw described but can't find any place to add something like "If selection 1 has been made, email group1. If selection 2 has been made email group2". I thought the E-mails tab 'Component value' would be the obvious place but it has no such setting.

kiwad’s picture

I have a webform with three page.

I want to send a copy to an address conditionnal to the city

I've added an hidden field which is conditionnal : if cityID -> trigger

The default value of this field is an email

in webform/emails, I add my component value

Not sure if it is the way intended by the design, but It seems to work fine sending my form results to both general and specific email adress

kiwad’s picture

Status: Active » Needs review
quicksketch’s picture

Status: Needs review » Postponed (maintainer needs more info)

I haven't been able to confirm this problem. Setting up a select list or radio buttons e-mails get sent properly to the right address.

ShannonK’s picture

But where is the conditional recipients option? With the new version of Webforms (6.x-3.4), I see the E-mails tab, but nothing that looks like I can send to a conditional recipient....for example, when a user selects Admin. Building from a select list, I'd like the form to be sent to a certain email, adminbuild@example.com. BUT if a user makes a selection other than the Admin. Building, adminbuild@example.com gets nothing. How do I accomplish this?

kiwad’s picture

Component: User interface » Documentation
Category: bug » support

@ShannonK

The conditionnal rule is in the form where you define your field

In few steps (hopes it's clear enough to help)

1 - in www.yoursite.com/node/[nid]/webform add an hidden field

2 - In default value, write the email address where you want to send an email

3 - In conditionnal rule, choose the field that will trigger the condition and choose de value(s) (which will be an ID ex. 1)

4 - save

5 - in www.yoursite.com/node/[nid]/webform/email choose "component value" -> your hidden field

6 - You can customize how your email is being sent or simply save default and it should work

This has been tested and works with webform 6.x-3.2 and hopefully with 3-4 but I need to update so can't confirm (yet)

ShannonK’s picture

I'm sorry...I get lost at #3. Where do I enter a conditional rule? I don't see a place for this in the "Form Components>hidden_component>edit" or in "form settings." What am I missing here??

Thanks for the help...

kiwad’s picture

Component: Documentation » User interface
Category: support » bug

OK! I've done some tests

Couldn't see that before since my webform was already configure that way.

You need a pagebreak...

Your triggering field must be before pagebreak and condition field after pagebreak

kiwad’s picture

Version: 6.x-3.2 » 6.x-3.4
Component: User interface » Documentation
Category: bug » support

Sorry, changed status by mistake on previous post

I make it to version 3.4 since i've just tested it with this release

ShannonK’s picture

I'm still not understanding where I can enter the conditional rule?

kiwad’s picture

StatusFileSize
new404.65 KB

Hi ShannonK,

You'll find in the pdf attached a short tuto made from fresh install

The only module installed is webform 3.4 and you'll see the conditional rule

-Mania-’s picture

Thanks for the pdf kiwad. I must say that's a confusing way of getting it to work. I don't get the whole point of having to create hidden fields at all. Can't this be implemented in the E-mails area?

ShannonK’s picture

Thank you kiwad. This works...except for one thing. It only seems to work with the preceding Pagebreak. But, unfortunately, that means when a user fills out the form they get to the end of the form and have to click "Next" instead of "Submit", then they're taken to another page which states "you've already submitted this form," which is of course confusing to the user, after which they have to click "Submit" on that page. Is there any way to make this work without the pagebreak?

Thank you again for the pdf...it was very useful and I'm sure others will find it so as well.

ShannonK’s picture

StatusFileSize
new14.02 KB

Also, when using the pagebreak, it shows up when looking at the webform Results. It also shows the hidden field. I attached a screenshot to show what I mean...

kiwad’s picture

Drupal offers many ways to skin a cat. In my case, that was a way of handling it that works and was giving me the outcome I needed. As Mania mentions, it may be confusing, but for me it was something really simple comparing to the way webform 2-x was handling it...

Hidden values are indeed shown in the result which, in my case, is logical. As stated in Webform presentation : "Webform can be used when performing data collection that is a one-way communication, that is, many users submitting values to a very small set of administrators. Webform is not a front end for letting users create custom nodes."

On the other hand, you can choose which values are being sent by webform in the email configuration.

jtchem’s picture

So, am I understanding this correctly:
to make conditional email recepients work in version 3.4 there HAS to be a pagebreak in the form? Or will it work without the pagebreak?

jtchem’s picture

Answered my own question - there doesn't need to be pagebreaks and I now have this working splendidly on one of my forms - thanks.

erehm’s picture

Issue tags: +webform, +hidden field

JTCHEM: How do you get a hidden field to show the "Conditional Rules" without inserting a pagebreak?

For me, the "Conditional Rules" don't show up without a page break. And, I tried adding the page break, adding the hidden email field and conditional rule, then removing the page break...then the conditional rule didn't show up or fire any more.

HELP!

jtchem’s picture

erehm --
my fields that I was using with conditional rules weren't hidden -- it was more like, if this box is checked, email to this person.... sorry, I haven't done this with hidden fields

quicksketch’s picture

Conditional rules are not supported without page breaks, that's this feature request: #732114: Merge Webform Conditional into Webform (support for same-page conditional fields)

quicksketch’s picture

Status: Postponed (maintainer needs more info) » Closed (fixed)