How to send a form to a specific email address based on field values

Colin Lynas asked on October 13, 2015 02:14

I first referenced this post before posting this question.

https://devnet.kentico.com/articles/how-to-send-form-notifications-to-different-emails-based-on-field-values

I am using Kentico 8.2 out of the box and unfortunately the instructions outlined in the above link do not appear to work for me. I suspect its a version issue or lack of a particular plugin, whatever the reason I would love some assistance with my problem.

I would like a list on the form for the visitor to select what department they would like to send the email to. This list would have a label such as 'DisplayName' and a value such as 'value@value' The article above really does describe exactly what I wish to achieve.

Could a form guru give me a hand? I am pretty new to the Kentico platform but am learning quickly. Any help to solve my problem would be great.

Kind regards, Colin ANZCA

Recent Answers


Brenden Kehren answered on October 13, 2015 02:39 (last edited on March 24, 2018 12:15)

There is no plug-in you need to reference. Can you tell me what happened when you first tested? The key is to have one key pair per line in your list. It should be value;display name So it could read something like humanresources@domain.com;Human Resources.

Then when you select a notification email you simply add the macro by clicking the right arrow and adding the macro. Use the field name in your macro like so {% FieldName %}

0 votesVote for this answer Mark as a Correct answer

Colin Lynas answered on October 13, 2015 03:30

Many thanks for your prompt response, it is greatly appreciated.

From the original post I expected the drop down list to display (Human Resources) however it displayed (humanresources@domain.com;Human Resources)

I expected the email address to be dropped from the visible list and only the display name component to appear. It was at this point I stopped and asked the question.

Regards, Colin

0 votesVote for this answer Mark as a Correct answer

Ilesh Mistry answered on October 13, 2015 14:24

Hi Colin, if this has still not been resolved, can specify how you have set this up please?

So what field settings did you use and when you add the value;display name combination, which radio button is selected etc...

From what Brenden has described, this should just work, but it would be interesting to know if there is something we are missing.

Thanks

Ilesh

0 votesVote for this answer Mark as a Correct answer

Colin Lynas answered on October 14, 2015 06:09

Thanks Ilesh,

I have been unable to resolve my issue. I followed the instructions in the original post.

"The field should be a drop-down list." I created a standard drop-down list as one of my questions.

I then populated the values of the drop-down list as indicated in original instructions.

"value;Display" Ensuring to use the semi colon to separate the email address from the display label.

The next step was to text the form layout to ensure it displayed only the label and not the value. The display test reviled all the text was displayed in each drop-down field including the semi colon.

I also added the form into a page to ensure it wasn't some sort of configuration view I was seeing but it still displays all the characters in the selection including the semi colon.

I have searched through all related posts and google to see if I have missed some step but it appears to be very simple.

The problem is I want to hide the actual email address as the original post seems to indicate.

Any further assistance would be greatly appreciated.

Kind regards,

Colin

0 votesVote for this answer Mark as a Correct answer

Colin Lynas answered on October 22, 2015 05:11

With the help of the dev team I found that "Every" line must include the separator.

Incorrect: Please select... Correct: ;Please select...

You can omit the email address but you must include the colon.

Kind regards, Colin

0 votesVote for this answer Mark as a Correct answer

   Please, sign in to be able to submit a new answer.