Have many emails that can be sent via autoresponder depending on the item chosen from a drop down li

Danny Boy asked on February 12, 2016 14:44

The Goal:

To have a form where the client can enter their name, email and then choose a package they are interested in from either a drop down list or checkbox form element.

Then depending on the package chosen the data from the name field would be entered into the appropriate spot on a pre-written mail. This mail would of course be describing the package that was selected and be sent immediately to the email address that was entered by the client.

Is this possible with kentico?

Recent Answers

Brenden Kehren answered on February 12, 2016 15:04

The auto responder will only send an email to that one field. So if the user enters a semi-colon separated list of emails, it will send it to all of those people. Problem is, that isn't a valid email so it probably won't get past the form validation. What you can do is create a global event handler to perform your other email sending and attaching of documents after the form is inserted based on their selections. This would be your best route.

0 votesVote for this answer Mark as a Correct answer

Joshua Adams answered on February 12, 2016 15:24

You should be able to just use macros in your html for the template and do checks such as this:

{% MyValue == "optiona" ? " write optiona" : "optionb" %} Note:You may want to set the string value to lower as well just for reliability!

Depending on how many options you have, you could also do an if statement with multiple else clauses and then have your html or output in the else clause.

1 votesVote for this answer Mark as a Correct answer

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