View Full Version : FormMailer help Please

Mr Deck
06-29-2005, 05:04 PM
I am a little lost on these instructions.

Below is the php:General Variables

// Default Error and Success Page Variables
$error_page_title="Error - Missed Fields";
$error_page_text="Please use your browser's back button to return to the form and complete the required fields.";
$thanks_page_title="Message Sent";
$thanks_page_text="Thank you for your inquiry";

// options to use if hidden field "config" has a value of 0
// recipient info
// Mail contents config
$subject[0]="Subject of Email";
$mail_intro[0]="The following are form results from your web site:";
// Send back to sender config
$copy_subject[0]="Subject of Copy Email";
$copy_intro[0]="Thanks for your inquiry, the following message has been delivered.";
// Result options

// options to use if hidden field "config" has a value of 1
// recipient info
// Mail contents config
// Send back to sender config
// Result options
Ok what I want to do is add fields but not sure on where or how things go.

Here are the instrustions...
<select name="config" id="config">(Where does this go?)
<option value="9">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;------ Select agent -------</option>
<option value="0">fred blogs - Broker / Owner</option>
<option value="1">Mr Bean - Office Manager</option>
<option value="2">A_team- Development</option>
<option value="3">Bee Gees - Project Manager</option>
<option value="4">Elvise- Listings / Sales</option>
<option value="5">Mr diy - Listings / Sales</option>
<option value="6">Mr Deck - Project Manager</option>
<option value="7">Blong Girl - Project Manager</option>
<option value="8">Red head - Project Manager</option>
<option value="9">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;----------------------------------</option>
<option value="9">General Inquiry - Myweb site</option>

More Instructions from the help file.
It is possible to have a selectable recipient list by making your config field a select type form field like so:
<select name="config">
<option value="0">Sales</option>
<option value="1">Support</option>
<option value="2">Marketing</option>
which makes the config value variable upon the choice of the user.

Any help appriciated thank you.

06-29-2005, 05:48 PM
What do you mean you want to add fields?
All you posted was the stuff for config. Did you want to know how to add more config options per that select?
Because all you need to do for that is copy/paste the code for config[1], change the index to match your select index (config[2], config[3], etc), and change the data as desired.

The option values in the select correspond to the array index, from what I can tell here. Either that or the position in the select element (the options array index). I'm not sure b/c right now, they are the same thing. The options[0] value is 0, options[1] value is 1, and so on. If you keep that up, it won't even matter. ;)

Mr Deck
06-29-2005, 06:11 PM
I guess I did'nt give a good example? ok here is a link to the example I have seen Here (http://www.evangelistadesign.com/html/contact.html)

As you can see the dropdown menu selecs the service's you want.
so I guess I need to know where:
<select name="config">
<option value="0">Sales</option>
<option value="1">Support</option>
<option value="2">Marketing</option>
and where/how the email address go in the script. I am new at this once i see an example then i'll get it right from there I hope lol

Take care Pat

06-29-2005, 07:48 PM
Okay, view the html source of that page and look at the form.
See this?
<input TYPE=HIDDEN name="config" value="0">

Replace that with the select named config instead.

Does that help?

06-29-2005, 10:46 PM
If you're sending e-mails, consider using PHPMailer (http://phpmailer.sourceforge.net/) instead.....

It's very easy to use....

06-30-2005, 03:47 AM
Ooh, neat.

/me puts it in her list of neat things

Mr Deck
06-30-2005, 05:10 PM
Thank you guys I'll have a look at both and see what I come up with. Any ideas on a locked area? I have a program but not happy with it, I need a Login for members only with mailing lisy iof poaaible? I don'd mind paying a few quid (ús for none brits)

Any help appriciated.

KInd regards Patrick :thumbsup: