Using Form Scripts in WEBPLUS



Similar documents
TectiteFormmail in WebPlus

Form Mail Tutorial. Introduction. The cgi-bin

So you want to create an a Friend action

Learn how to create web enabled (browser) forms in InfoPath 2013 and publish them in SharePoint InfoPath 2013 Web Enabled (Browser) forms

Chapter 15: Forms. User Guide. 1 P a g e

HELP DESK MANUAL INSTALLATION GUIDE

Using Webmail. Document Updated: 11/10. Technical Manual: User Guide. The Webmail Window. Logging In to Webmail. Displaying and Hiding the Full Header

enter the administrator user name and password for that domain.

Using Webmail. Technical Manual: User Guide. Document Updated: 1/07. The Webmail Window. Displaying and Hiding the Full Header.

FireBLAST Marketing Solution v2

Content Management System User Guide

-- Reading and Printing

Webmail Instruction Guide

Using Webmail. Document Updated: 9/08. Technical Manual: User Guide. The Webmail Window. Displaying and Hiding the Full Header.

The Social Accelerator Setup Guide

Chapter 28: Expanding Web Studio

Counters & Polls. Dynamic Content 1

PloneSurvey User Guide (draft 3)

Using Internet or Windows Explorer to Upload Your Site

Beginner s Guide to MailChimp

User Manual. Visit Our Site at

NETWRIX EVENT LOG MANAGER

Bitrix Site Manager ASP.NET. Installation Guide

How to Create and Send Newsletter Using G-Lock EasyMail

Search Engines. Planning & Design 1

ConvincingMail.com Marketing Solution Manual. Contents

TABLE OF CONTENTS. Creating an Account Why Use enewsletters. Setting Up an enewsletter Account. Create/Send Logging In.

Manual Password Depot Server 8

Previewing & Publishing

What you will need before beginning this guide

SPAM UNDERSTANDING & AVOIDING

Updating KP Learner Manager Enterprise X On Your Server

Shasta College SharePoint Tutorial. Create an HTML Form

Web Forms for Marketers 2.3 for Sitecore CMS 6.5 and

SEC External Guide for Using Accellion

Merak Outlook Connector User Guide

A Reseller s Guide to Using Helm

How To Build An Intranet In Sensesnet.Com

Outlook 2010 basics quick reference sheet

Microsoft Outlook Quick Reference Sheet

5.2.3 Thank you message Bounce settings Step 6: Subscribers 6.1. Creating subscriber lists 6.2. Add subscribers Manual add 6.2.

Secrets of Event Viewer for Active Directory Security Auditing Lepide Software

Talk Internet User Guides Controlgate Administrative User Guide

Customer Control Panel Manual

Using Your New Webmail

Welcome to MailChimp.

Table of Contents. Welcome Login Password Assistance Self Registration Secure Mail Compose Drafts...

NetWrix File Server Change Reporter. Quick Start Guide

Web Hosting Getting Started Guide

Webmail User Guide. The Webmail Window. Logging In to Webmail. Displaying and Hiding the Full Header. Printing an . Composing a New

CEFNS Web Hosting a Guide for CS212

Drop Shipping. Contents. Overview 2. Quick Tips 3. Basic Setup 4. Drop Ship Options 5. File Pickup Options 6. Messages 8

How To Create A Campaign On Facebook.Com

Manual. Netumo NETUMO HELP MANUAL Copyright Netumo 2014 All Rights Reserved

T320 E-business technologies: foundations and practice

Chapter 3 ADDRESS BOOK, CONTACTS, AND DISTRIBUTION LISTS

Cross Bulk Mailer 5.4 User Guide

the barricademx end user interface documentation for barricademx users

Using the ISCR FTP Program

The easy way to a nice looking website design. By a total non-designer (Me!)

An Introduction To The Web File Manager

Cross Bulk Mailer 6.1 User Guide

Composing a New Message

OET Cloud Services Getting Started Guide

Avaya Network Configuration Manager User Guide

A User s Guide to Helm

BUILD2WIN Lab 2.6. What s New in BUILD2WIN?

Livezilla How to Install on Shared Hosting By: Jon Manning

e-template Instructions

Vodafone Hosted Services. Getting started. User guide

The FTP Monitor application performs the following main functions:

CREATING YOUR ONLINE PRESENCE

Sophos Mobile Control Startup guide. Product version: 3

Using Microsoft Expression Web to Upload Your Site

Create an Campaign. Create & Send Your Newsletter

1 Classified Script. User Guide v1.0

MARKETING BEST PRACTICES.

Form Builder - User Guide

OutDisk 4.0 FTP FTP for Users using Microsoft Windows and/or Microsoft Outlook. 5/1/ Encryptomatic LLC

How To Use Nest For An Employer

Administrator s Plus. Backup Process. A Get Started Guide

WINDOWS LIVE MAIL FEATURES

ClickDimensions Quick Start Guide For Microsoft Dynamics CRM /1/2011 ClickDimensions

CITY OF BURLINGTON PUBLIC SCHOOLS MICROSOFT EXCHANGE 2010 OUTLOOK WEB APP USERS GUIDE

Installing GFI Network Server Monitor

IBM Unica emessage Version 8 Release 6 February 13, User's Guide

1. First login to your RSJoomla! account 2. Head to Resources >> Customer Downloads >> RSMail! membership >> Downloads

XMailer Reference Guide

Barracuda Spam Firewall

Connecting to LUA s webmail

Marketing. Send beautiful campaigns, track the results and manage your subscribers. For further information, call or

Jim2 ebusiness Framework Installation Notes

Getting Started with Dynamic Web Sites

Hypercosm. Studio.

CDUfiles User Guide. Chapter 1: Accessing your data with CDUfiles. Sign In. CDUfiles User Guide Page 1. Here are the first steps to using CDUfiles.

Lyris ListManager Tutorial

Advanced Training Reliance Communications, Inc.

Composite.Community.Newsletter - User Guide

Transcription:

Using Form Scripts in WEBPLUS In WEBPLUS you have the built-in ability to create forms that can be sent to your email address via Serif Web Resources. This is a nice simple option that s easy to set up, and it works well. However, some forum members want to be able to do more than just send form results to a single email address. Some have expressed the wish to save form data to a database, whilst other want to be able to post form data to more than one email address. In order to do this, you must use a form script on your host server. The good news is that such scripts are not nearly as complicated to set up as you may first imagine. There are many scripts available, but in most cases your hosting company will have a script ready for you to use. One of the most popular scripts is the Tectite Formmail Script that is available free of charge, and this is often the script that most web hosts use. Some WEBPLUS users have advised that this particular script has certain security vulnerabilities. However, if set up correctly, the chances of your script being used by spammers to create an email gateway are virtually eliminated. In this article, we are going to use the Formmail script as an example. You will find a link later on in the article where you can configure and download a script specifically for your web site. But first, lets look at the elements of the script that you will need to understand: Mangled Email Addresses: This is a security feature of Formmail. Essentially, it replaces the @ in your email addresses with a text string that you create. For example, if you define your Mangle string as htrs897rbm0915 The email addresses sent to the script will look something like this: Yournamehtrs897rbm0915yourdomain.com Clearly, this would not be recognised by an email harvesting bot as an email address. However, when the script processes your forms it will UN-MANGLE the address correctly. We strongly suggest that you use this feature to help prevent email harvesting on your site. When you come to configure your script (instructions later) you will be given the option of creating a mangle string. Just be sure that you write down the string somewhere, as you will need it whenever you set up a form in WEBPLUS. Hidden Fields: Scripts, such as Formmail use hidden fields that send information to your script. Basically, these fields contain instructions on what the script must do with the form data. In WEBLUS, you will see that you can define hidden fields in your forms. When hidden fields are set up, users of your form won t see these fields, and will not, therefore, be able to change any of the field values. One of the most used hidden fields will be one named recipients. The value of this field will be the list of email addresses to which your form data will be sent. Again, as a security feature, you must ensure that your recipient s email addresses are the Mangled email addresses. You can specify as many addresses as you want. Furthermore, you can have different email addresses for each form on your web site. So, although all your forms get processed by the same script, the recipient hidden field tells the script where to send that particular form s data.

You can also set up hidden fields for cc, bcc, from, and subject. If using any of these additional email address fields, be sure to use the Mangled email addresses. Hidden fields are also used by the script to do all sorts of other things that are currently not supported in standard WEBPLUS forms. For example, you could remove all form validation from your WEBPLUS form, and let the script handle it directly. One reason you may wish to do this is if you have a situation where you want users to complete only one out of several fields. A recent forum post specifically asked if it was possible to have two drop-down boxes but to allow only one or the other to be selected. This is the sort of validation that can be handled with a simple conditions hidden field. Other common uses for hidden fields are: To derive new fields by concatenating two other fields e.g. by combining the fields first name and last name to create a new field called Full name. To create an autoresponse to the person filling in your form To format your email with specific characters To save your data to CSV files for integrating into a database. To display confirmation pages on successful processing, or to display a different page if processing was unsuccessful. There are many other options - full details of all can be found on the Tectite web site. Setting Up your Script Fortunately, the developers of the Formmail script have made it really easy to set up a script for your web site. They have a Wizard that creates your script for you, and then downloads it to your computer as a zip file. The file contains the script that you ll need to upload to your server, a test form so that you can try out your script, and a useful readme file. Click here to go to Tectite s configuration wizard. Their site will open in a new window, so keep this one open so you can switch between the wizard and our instructions for completing the wizard information. The first thing you will be asked for is the email address that the script can use to send you alert messages if a problem occurs when it s processing forms. Enter a valid email address in this field. (don t use a Mangled email address) Next you must enter the URL of your web site. I recommend your use the http:// prefix in your URL. (If you intend placing your script in a special directory on your website, be sure to add the full path as part of the URL. E.g. http://mysite.com/scripts/) Next, select the type of operating system used on your server. The next part of the configuration wizard needs information about your target email addresses. You basically have three choices here. You can simply check the box that says any email address on your domain, create a list of other domains that you may want to send form results to, or finally, a list of specific email addresses that you may wish to use. (Don t use Mangled email addresses) Note: Although you may specify actual email address, Formmail doesn t use these addresses to forward email automatically. It simply uses the email addresses to

compare with the email address supplied through your hidden fields. If your hidden fields contain email addresses that are not specified here, then Formmail will not forward the information. This is primarily to prevent your web site becoming an email gateway for spammers. Next, you give the wizard some information that will allow it to create a sample form for you. Enter one or more email addresses in the appropriate field. In the next field you can either accept the wizard-generated Mangle string, or create one of your own. This is the string that will replace the @ symbol in your email addresses. Next, specify a name for your script. This will be the script file name you will point your forms to when creating them in WEBPLUS. Finally, select a language for your script. You will now be able to select a version of the script to download. Always accept the default to get the latest version. Once you ve selected a version you will be taken to the download page where you can download your customised script package. Uploading to your Site Unzip your package and FTP the script and the test form to your server. You could put the script into a scripts directory if you wish. If you do this you should also put the testing form into the same folder. Although you will be creating your forms in WEBPLUS, its best to test your script using the sample form created for you. Just call up the form by typing its full URL in your web browser. Complete the form and submit. If everything is ok, you should receive your form data to your email. If there is a problem, you should get a notification email to the alert email address you supplied in the configuration wizard. This message will give you an indication of what the problem may be. You can then refer to the Tectite web site to see how to resolve your problem. In the final part of this article, we ll show you how to use your script with WEBPLUS forms. However, please make sure your test form works correctly before going further.

Creating Forms in WEBPLUS that use your form script You create your WEBPLUS forms in exactly the same way as if you were going to use Serif Web Resources. You can choose to use WEBPLUS form validation, or your script s validation options. You can get full details of those options from the Tectite web site. There are two fields that must be included in your form if the script is to work correctly. These are: email - which must contain the email address of the sender. This should be a mandatory field validated to be a real email address (for extra security, you may like to include a validate email address field also. You can then use the script s validate function to make sure both email addresses are the same) realname: this can be a field in the actual form, or a hidden field that gets created from say a first and last name field on your form. For most forms, you can simply use realname as the field label on your normal Name field. Once your form is created, right-click on your form and select Edit Form Properties. On the Action tab, select A Remote Script and then enter the full URL of your script on your server. E.g.http://yoursite.com/scripts/myscript.php Now click on the Hidden Fields tab and add this hidden field to your form: Name: recipients Value: a list of email addresses that the form data should be sent to, each separated by a comma (eg. jackattmysite.com,maryatthersite.com). Notice we have used the Mangled email addresses) If you want to create a subject field, create another hidden field as follows: Name: subject Value: Form Submission (or any other message that you want to place in your subject line) You should also use the good_url and bad_url hidden fields to automatically redirect the user to success or failure pages in your site. Simply create the hidden fields with the above names. In the value field, enter the full URL of the relevant pages. This is because the WEBPLUS form properties dialog removes the redirect option when you send your form to your own script. And that s all there is to it. I strongly suggest that you download the documentation for this script from Tectite to see all of the many options you can use in hidden fields. Many

of the forum questions regarding form validation options and storing to databases will be answered in the documentation, so it s well worth keeping the documents as a handy reference. On the following pages, we point out some of the other useful functions of this script, and how to use those functions with WEBPLUS.

Success and Failure Pages All versions of FormMail display a default page to the user if you don't specify something else. There are two possible outcomes to a user's form submission: Success; or, Failure In the case of a successful form submission, FormMail defaults to a generic "Thank you" page. In the case of a failed form submission, FormMail defaults to a generic error page. You can choose a different page by specifying a URL with "good_url" and "bad_url" hidden fields, for success, and failure, respectively. In the WEBPLUS hidden fields you would create two fields like this: Name=good_url Value=http://yoursite.com/thanks.htm Name=bad_url Value=http://yoursite.com/error.htm Template Pages The "good_url" feature provides you with a static results page. If you'd like to show some of the information the user submitted, you can use a hidden field called good_template" instead of good_url. To do this, you need to open your FormMail script in a text editor and look for the entry for TEMPLATEDIR in the configuration area. There you would specify the actual directory of your template files. The entry should look something like this: $TEMPLATEDIR = "/home/mysite/public_html/templates"; Also, download the Sample Good Template from the Tectite website and read the instructions in there. There's a similar feature for error handling called "bad_template". However, error handling is more complicated so you should go and read the HOW TO guide on Advanced Error Handling on the tectite website. To create a template, just prepare an HTML page in WEBPLUS or any HTML editor. You then use your form s field names prefixed with a $ symbol to show user data. For example: Dear $firstname Thank you for your enquiry about $product...etc. Alternatively, you can just create a simple message saying Thank you for your enquiry. Below is a summary of the information you have sent. Then just list all the fields.

You can also add a print button to this template that allows the user to print the confirmation as a receipt. If you download the Sample Good Template from the Tectite website, you will find all the code you need to do this. Once your template is created, you upload it to your template directory on your webserver. You then use the good_template hidden field in your WEBPLUS forms. You enter the template name in the value field. There is no need to put a full URL to the template, just the template name with its htm or html extension. This is because you ve already told the script where to find your templates. Common Questions Q: Why do I have to specify a directory for my templates in the script, and not simply put the template URL in my hidden field? A: This is for your site s security. It wouldn t be wise to have forms going out that reveal where your template files are stored on your server. By specifying the directory in the script, that information is hidden from prying eyes. Q: Why would I want to display a printable confirmation page to users when I could simply create an auto-response message that gets emailed back to the sender? A: This is the best way of protecting your email address from those crazy people who fill up forms on websites in order to spam people. Think about this, A spammer sees your form and decides to use it for his spamming campaign. He s got his list of target email address and starts using them in your form. He then uses any comment area on your form to make his pitch usually on the lines of Great Value on Replica Watches go to... etc. He then hits the send button. If you set up an auto-response containing the form data, the response will get sent to the target email by your server along with the spammer s pitch. Furthermore, the target who receives the spam now has your email address on the autoresponse. That s when your ISP starts getting complaints, and you lose your reputation. That s why it s better to have a response that gets delivered back to the spammer s web browser. He will quickly understand that he can t use your site as a spam gateway. Some other useful Hidden Fields Whilst WEBPLUS can do forms validation for you, it s often easier to let you form handling script take over the job, particularly if your validation requirement are quite complex. For example, you may want fields compared to another field, or you may want to disable a field based on an entry in another field. Also, you may want to create a CSV string to send to a database or log file. All this is possible with hidden fields. Take this for an example of a hidden field in your WEBPLUS form: Name: required Value: email: Enter Your email address, realname: Enter Your name, Country: Enter Your Country, Reason: Enter The reason you're interested in our product In this one hidden field, we ve validated 4 fields on our form. If any of these fields are not completed, the user will see the appropriate message. This field is also saying that ALL these fields are REQUIRED fields. However, we could also include some additional

validation that only require one or another field to be required. It would look something like this: field1:name1^field2:name2 What this is saying is that EITHER of the fields named field1 or field2 can be completed BUT NOT BOTH. It s a simple syntax that s very easy to learn and understand. There are many more examples and a fuller explanation on the tectite website. It s well worth getting a full understanding of these features. This way, you ll be better placed to effectively utilise you powerful new forms processor, and reduce your reliance on Serif Web Resources.