Manual - MailForm
-
Edit the mail.php file
- Customize it :
-
$recipient = The email address where the form should be sent
-
$sender = The email address which is shown as sender in the confirmation mail to the form sender (e.g. 'noreply@yourdomain.com')
-
$fix_topic = A subject which must be empty if you'll use a subject input field (which must be defined as the last before the text field) - if you dont wish a subject input field, you can enter a fixed subject (e.g. New Request from my Homepage)
- $confirm_text_sender = A message which should also be show up in the mail except the input field data - in the confirmation mail to the form sender
- $confirm_text_recipient = A message which should also be show up in the mail except the input field data - in the mail to the recipient
- $success = Text, which shall show up if the form was sent
- $yes_color = color code for the green tick
- $no_color = color code for the red cross
- $fieldsize = length of the input fields
- $textcols = count of the text field columns
- $textrows = count of the text field rows
- $fieldname[] = name of the input field ( must consitst in 1 word without any special characters and required a respective $fielddescription[] )
- $fielddescription[] = description of the input field ( visible above the input field )
- $textfieldname = name of the text field ( must consitst in 1 word without any special characters )
- $textfielddescription = description of the text field ( visible above the text field )
- Upload the fiel to your webspace
-
call the mail.php - done.
Both images will be created by the script during the first call of it. If it's done, they will be displayed once. If it dont works there is maybe an older version of php running on your webspace or the GD library isn't installed. In this case you can send me an eMail and I'll send you the images. Alternately you can also create your own images which you need to store in the same directory like the mail.php and label them 'mail_no.png' and 'mail_yes.png'.
If you include the mail.php in your existent contact page, the images will be created in the directory where the contact page is located.
You are able to format the whole script with CSS. The form is in a div called 'mail_form', the input fields are in divs called 'mail_fields', the text field is in an own div called 'mail_textfield' and the success message $success is in an own div called 'mail_success'.
The number of input fields is arbitrary, the only important thing is to define for each input field also an field description. Copy text field is not allowed. To use the implemented email-syntax-check the name of the email-input-field must contain 'mail' in lower case.
If you want a subject field, leave $fix_topic blank and add the respective field-pair as the last pair before the text field. If you wont define a subject field, set a fixed subject at $fix_topic.