Buy Now
Sign in

Drop down to determine Form Destination

indieben , November 09 2020, 09:11
I
indieben 151
November 09 2020, 09:11 #394768
Hello,
I found https://www.chronoengine.com/faqs/52-cfv4/cfv4-emails/2603-how-can-i-send-an-email-to-different-addresses.html that is ancient and I have a slightly more complex use case.
Here is my form:
1. My enquiry is about (dropdown):
***Each dropdown needs to go to a different inbox.***
HOWEVER - one of these items is "a policy"- when "a policy" is selected, it enables a subcategory drop down box with different items that need ***to go to different inboxes again***. The "a policy" selection on the main subject box should not have an Email inbox attached to it - obviously.
Thanks and Kind Regards,
Indieben.
admin 33
November 10 2020, 05:18 #394781
 1
use {data:field_name} in the email recipients setting, you can use a holder value in the dropdown and update it with the "Alternative data" behavior in the dropdown settings
This video may be helpful:
I
indieben 151
November 19 2020, 00:25 #394921
So i'm trying to follow your video and I can't see the actions section anywhere..
I have purchased a subscription too.
Thanks,
admin 33
November 19 2020, 13:38 #394926
 1
if you can not find the actions section then your form is of type contact and you should convert it to advanced, this can be done under the form Settings area, just make sure you have the latest update, change the form type and then save the form with the double check button!
I
indieben 151
November 20 2020, 00:57 #394930
Thanks for this,
So, I presume that I don't need to follow the video that requires an email address to be also set up as a joomla user and that I can have in my dropdown
1 Finance
2 IT
3 HR
And then simply have alternative behaviour setup
= 1 finance@company.com
And then have {data:field_name} (replacing field_name of course with the real field name) set in the email recipients box?
A couple of further questions please:
what should I put in data scope and what is the difference please? Email settings seemed the most obvious but then override data made sense too...
I need to be able to send through an email address from a dropdown selection on a second dropdown (subgroup) sometimes instead of stemming from the selection in box 1 so:
1. I presume that if 2 (in the example above: IT) was not listed in the alternative data) that I could trigger my second dropdown upon selection of IT (as normal) and specify the alternative behaviour (destination Email in box 2 for example for Microsoft products, Linux for example stemming from the IT category).
2. I presume that the clue to answer 1 is that Email recipientS is plural and so it can also take more than one data source and that if an Email address isn't present in box 1, nothing will be sent, and if there is a destination in box 2 it will be because I've set the Email recipients to read the two data sources? How would you format that would it just be {data:field_name1}{data:field_name2}?
3. Purely in case someone comes across this and needs it as a use case, what would Chonoforms do if there was a destination set for IT itself and then also for Microsoft or Linux suboptions/destinations stemming from box 2 becoming available as a result of selecting IT in box one?
Thanks ever so much.
admin 33
November 20 2020, 07:16 #394937
Override Data will affect the {data:field_name} value
Email Settings will affect fields selected in the email, for example when you select the field in the Email recipients dropdown directly!
The alternative data can be set for any field, so just use it in your 2nd dropdown, it works after the form is sent, or did I misunderstood the 2nd part of your question ?
I
indieben 151
November 20 2020, 11:23 #394945
Thanks for this - I'm struggling to word this a touch:
So, the contact form first of all needs a subject that will often be enough to determine where the form needs to be Emailed to so drop down 1:
Customer Services
Tech Support
Vacancies
Let's say tech support just goes to an IT Email address and Vacancies needs to simply go to a vacancies Email address.
BUT, let's say that there are 4 different customer service teams dealing with different services so - in order to determine which of the 4 customer service teams we need to route the form through to, we need to:
A) On visitor selecting Customer Services, make a second dropdown visible - product A customer services, product B customer services etc - this is done.
B) Specify Product A, B customer services Email addresses in alternative behaviour in the second dropdown that had appeared as customer services was selected in box 1.
Whereas, if visitor had selected Tech support in box 1, we'd not need box 2 as we'd know the necessary Email address at that stage so alternative behaviour can go into box one for tech support and vacancies.
Re Your earlier part: Are you saying that I should not be using {data:field_name}, replacing field_name with the field name within the Emall Recipients? And should I be using override data or Email settings in the scope?
Thanks again.
admin 33
November 21 2020, 14:33 #394969
So you want to choose some value based on the values of 2 fields, for this you may either:
1- use some PHP code in a PHP action and return the value you want then use {var:php_name} in the email setting
2- use the Variables action with the Run Conditions behavior inside and that will do the same thing as the PHP but using the CF interface!
I
indieben 151
November 21 2020, 17:32 #394976
thanks, is there a walk through for what I'm trying to achieve please?
Thanks
admin 33
November 22 2020, 14:38 #394984
if($this->data("drop1") == "123' AND $this->data("drop2") == "456"){
return "email1@gmail.com";
}
use multiple blocks of this in a PHP action then use {var:php_name} in your email recipients!
We do provide pro paid support if you need the full code written for your case!
I
indieben 151
November 22 2020, 20:06 #394989
That might be so but ultimately for something that costs £20, you have created a target audience of people who will want to use it for business use already.
I spent a lot of time last year highlighting issues with V6 so that you have a better product this year. As I said last year, if you want to create a product that does not have the kind of things that a business would look for and point them to hard coding, they might as well code their form from scratch and then it would also be fully SASS/SCSS compliant and not need a user manual where you have sold a product that doesn't have one.
I think you'll already realise that I cannot hard code but, for my needs, a friend would be cheaper coding the form from scratch and commenting their code properly as they'd only want a pint!
As it happens, good luck to you attempting to rince me for extra cash - I don't even get paid myself.
admin 33
November 23 2020, 14:18 #395014
We do not try to get extra cash here, but doing a custom code based on your requirements will take time which is charged, that's normal, I have already proposed the solutions above and provided a code example and you can do them yourself for free!
And I do not think that coding a custom form is better, the form builder can do any number of forms and you can edit your form easily!
Your comments are appreciated and we use them to improve the product and provide free support for everybody!