Send form to Email address based on condition | V3.1_RC5.5

pipodyer 28 Mar, 2010
Hello Bob,

I have read FAQ 31 and other forum questions but there is no answer to the following so far.

I am evaluating your software and unfortunatelly do not know much neither about CF nor about PHP. So far I am very impressed but there is an immediate issue I need to solve, and it is to send the content of my form to a specific email address based on criteria condition which could be hardcoded on my php code.

In other words, there are 5 people who will take care of the applicant based on the College criteria which is its ZipCode,City,EmailsCounter:
Something like:
if zipcode=xxxx1 and city=A and EmailsCounter then UseEmailaddress= [email][/email]
if zipcode=xxxx2 and city=A and EmailsCounter then UseEmailaddress= [email][/email]
if zipcode=xxxx3 and city=C and EmailsCounter then UseEmailaddress= [email][/email]

I thank you for your reply.
GreyHead 29 Mar, 2010
Hi pipodyer,

Basically the FAQ #31 code is what you need plus some extra PHP to handle the conditions.

What happens if EMailsCounter is not set?

pipodyer 31 Mar, 2010
Hello Bob,

Thanks for your quick reply.
I have reviewed the code and certanly the login does not seem to apply to my case, can you please provide me with a sample code so I can apply it to my particular problem?
I hope this is not too much to ask.
Thanks in advance.

GreyHead 31 Mar, 2010
Hi pipodyer,

I don't understand where the login comes into this??

The basic code you need is in FAQ #31 but you'll need to add the PHP to include the test for the extra conditions.


PS I'm sorry but as it says in the Asking Questions in the Forums sticky posts here.

F. Please do not ask us to Code your Form for you (unless you are prepared to pay). ChronoForms makes it very easy to create forms using the built-in Wizard or to copy and paste code from any HTML editor. We are happy to help out but we don't have the time to do basic work for free.

G. Please don't ask us to give you basic help with HTML, CSS, PHP or JavaScript. If you want to use the full power of ChronoForms and of Joomla then you ae going to need some basic coding skills. There are excellent tutorials on the net and they should really be your first point of reference. Michelle Steigerwalt's post on the Mootools blog Help I don't know JavaScript is an excellent place to start - not just for JavaScript.

GreyHead 05 Apr, 2010
Hi pipodyer,

How much code gets written here depends on a whole bunch of things. [list]
  • How busy I am (or bored with what I'm doing
  • How busy the forum is, if there are 2 or 3 posts a day then I have more time; if, as at the moment, there are 20-30 then just taking a few minutes on each can easily take an hour or two in the day when I could be working on other client stuff that pays the bills.
  • Whether the code is already here many times
  • Whether I have a code example of my own that I can use
  • Do I think that this code is going to be useful to many other readers (or is it a very narrow application)
  • Does the problem pique my curiosity - or is it similar to something that I've answered many times before.
  • Whether the poster has already 'had a go', checked the forum & FAQs and maybe tried some code that doesn't work.
  • It helps if the poster reads my questions and answers them, most people do, some seem to change the subject or answer something completely different.
  • At some level if the poster seems friendly and polite. I don't deliberately discriminate but I'm sure that at some level I respond better to 'I have a problem, can you help fix it' than I do to 'ChronoForms is broken and doesn't do what I want'. (And yes I do know that many people here are not native English speakers and I try to remember that.)
  • [/list]I'm sure that there are others too.

    None of these may apply to your request; I just thought I'd answer your general question as I'm sure that other people have the same thought.

    This topic is locked and no more replies can be posted.