Hi,
I am building an enquiry form with the following fields: Name, Your Email, Phone, Select Product, Message and a submit button. The form works fine when it is configured to send the enquiry to one (or predefined email address.)
The fields are configured as follows:
- Name - text
- Your Email - email
- Phone - text
- Select Product - dynamic select (selects articles from a category with title as name and id as value) --> option A, option B, option C, option D
- message - textarea
- Submit - submit button
- Send Enquiry - email (hidden).... sends the enquiry
What I want is a case where if someone selects Option A in the select box... the message/email is mailed to email address A
Option B..... mail to address B
.... and so on.
How can I go about this?
I have altered the article form to include a field in the backend where an email can be manually entered in case of enquiries to that article.
Now the problem is how to use that email field from each article, which is stored in #__content table, and compare with what value has been selected in the Select Box... to send email to that address
To be more clear, because the select box returns article id as value.... how can set a conditional (if possible), on the hidden email field to load addresses from the field stored in database by comparing with what has been selected in the Select Box?
I need help... alternative suggestions are welcome on how to implement that.