Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to send form to different people thru a dropdown

Status
Not open for further replies.

lexus

MIS
Oct 1, 1998
277
Problem:
"THEY" want to have a form that has a dropdown with different prople in a department. Client selects one person from this dropdown list. This is the person who the form will need to get sent to.

I have done forms before with multiple persons on the receiving end but don't know how to do this type where the client selects the person they want the form to go to.

Running Apache, html, and no database. Can it be done with the regular cg-mail script? I am not sure which script we are runnning, but I bet it's Matt's script!

I hope I have made myself clear on this and an early thanks for any help! If this isn't possible, I can figure out another way maybe!

Thanks,
Lexus

**Quiquid latine dictum sit altum viditur.**
 
This is very easy but you'll need to use a programming language to process it.

Basically you can have an array of addresses that their dropdown selection is compared with, or a switch, or if/else statement...

OR....

The easiest way is to have the value of each dropdown to be the first part of the email address. IE-
<select name="to">
<option value="johnsmith">John Smith</option>
<option value="janesmith">Jane Smith</option>
etc
</select>

Then on the processing side you just mail to their selection + the rest of the email. This way they choose who it goes to and you don't have the full email on the page to be picked up by spam bots.

Does this all make sense to you?

NATE


Got a question? Search G O O G L E first.
 
Yes it can be done.
Even with Matts Script Archive Mail script.

Use a select box form control.

Matt's Script has a field for specifying the message recipient, probably "To" (check the documentation). Just create your select box with the correct ID and it will get passed to the script.

If you write your own script then it's a simple matter of capturing the value from the select box and using that value when sending the mail.



<honk>*:O)</honk>
Designease Ltd. - polyprop folders, ring binders and creative presentation ideas
Earl & Thompson Marketing - Marketing Agency Services in Gloucestershire
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top