Example of creating a Custom Form in Membergate

It is easy to create custom forms that automatically send you the information when a visitor completes the form. Here is an example

As you build your MemberGate powered web site, you may need to create a page with a form that visitors fill out, and have a way for that information to be sent to you.

Below is an example of what I mean.

  MemberGate Host Migration Request
Use this form to request that your MemberGate Powered Website
be moved by Intermedia.net to the new dedicated server for MemberGate customers.

Note: Your hosting fees will remain the same, but there is a $50 fee charged by Intermedia.net to move your site and all its contents and settings to the new server.
Your Name:
Your Email:
Your Domain Name:
Current Intermedia.Net Account Name:
Comments:
  Yes, please move my account to the new dedicated server. I understand that my hosting charge will remain the same, and that there is a one time $50 migration fee that will be charged to my account by Intermedia.net.

In MemberGate, you can create forms like this where the submitted information will be automatically sent to you via email.

Here's how to do it:

Creating Mail To Forms

You only need to create two content pages for the mailform.

  1. The Thank You Page

    The first content page is the 'thank you' page the visitor will see after the form is emailed. In this instance, we are using content page 92.cfm as our example, your Thank You page will most likely be a different page number. Generally a content page will have the following in the text box - the text can be anything, but the final line must include the mailform command:



    Create the above page, place it in the same department as the form, set the page as to not show on the department or portal page, and then make the page active.

  2. The Form Itself

    You will then need to create the form itself. Since the form involves using HTML, you probably will want to do this in an HTML editor until you get the look you want.

    Within the form, you'll need the following elements:

    	<FORM METHOD="POST" ACTION="http://www.yoursite.com/member/92.cfm">
    	<!--- <strong>The form action must be exactly like this line, replace the action page address 
    	with the full html  address the form should post to - this will be the address of the 
    	thank  you page you created above</strong> --->

    <input type="hidden" name="subject" value="MemberGate Migration Request"> <!--- <strong>This will be the subject of the email sent with form contents</strong> --->

    <input type="hidden" name="sendto" value="bmyers@membergate.com"> <!--- <strong>This is the email address the form will be sent to - it must be an email address registered to your site</strong> --->

NOTE:

In addition the above, you'll want the normal html code used to create form elements. You can include as many form input fields as you like - the only restriction is these form field names can not start with a number and should not have spaces, brackets or any special characters etc.

It can NOT be:

It MUST be:


OR

Below is the actual code for the form shown above.


NOTE:

The form MUST include a FROM feild which is an email address. You can either have that field in the form or as a hidden field, if you do not want to collect the users email.

Include the from field in either of the following ways:

  1. This will be a hidden field so the user will not see it and you could then include a field to get the user name



  2. This is used in the example form below, where the form includes an input field where the user enters their email.


Your Email:



<div align="center">
  <FORM METHOD="POST" ACTION="92.cfm">
<input type="hidden" name="page" value="92">
<input type="hidden" name="subject" value="MemberGate Migration Request">
<input type="hidden" name="sendto" value="bmyers@membergate.com">

<TABLE bgcolor="#dedfdf" border="2" cellpadding="4" width="450"> <TR valign=top><td colspan="2" align="center" valign="top">

<FONT size="3" face="arial"><B>  MemberGate Host Migration Request</B> </font><br> <font face="Arial" size=-1>Use this form to request that your MemberGate Powered Website <br> be moved by Intermedia.net to the new dedicated server for MemberGate customers.<br><Br>Note: Your hosting fees will remain the same, but there is a $50 fee charged by Intermedia.net to move your site and all its contents and settings to the new server.</font> </td></TR>

<tr> <td><font face="Arial" size="-1" color="#000000"> <b>Your Name:</b></font> </td> <td><input TYPE="text" NAME="cust_Name" size="40"></td> </tr> <tr> <td><font face="Arial" size="-1" color="#000000"> <b>Your Email:</b></font> </td> <td><input TYPE="text" NAME="from" size="40"> </td> </tr> <tr> <td><font face="Arial" size="-1" color="#000000"> <b>Your Domain Name: </b></font> </td> <td><input TYPE="text" NAME="Domain_Name" size="40"> </td> </tr>

<tr> <td><font face="Arial" size="-1" color="#000000"> <b>Current Intermedia.Net Account Name: </b></font></td> <td><input TYPE="text" NAME="cust_account" size="40"></td> </tr> <tr> <td><font face="Arial" size="-1" color="#000000"> <b>Comments:</b></font> </td> <td><textarea NAME="cust_comments" ROWS="4" COLS="45"> </textarea> </tr> <tr> <td colspan=2><input type="checkbox" name="agree" value="agree" checked>    <font face="Arial" size="-1" color="#000000"> Yes, please move my account to the new dedicated server. I understand that my hosting charge will remain the same, and that there is a one time $50 migration fee that will be charged to my account by Intermedia.net.</font> </td> </tr> <tr><td colspan="2" align="center" valign="top"><input type="submit" value="Submit Request"> </td></tr></table> </form> </div>

Require Fields:

If you wanted your form to have required fields then you can use either JavavScript of Coldfusion request. the eaisest way is to use Coldfusion CF Form tag.

  1. The form must start and end with


  2. The require input fields become CFINPUT and no longer INPUT

  3. The required=yes and message are added to the input field.

 

The form below uses required fields.

 

MemberGate Required Fields Form
Text here

Your Name:
Your Email:
Your Domain Name:
Current Intermedia.Net Account Name:
Comments:
Yes, please move my account to the new dedicated server. I understand that my hosting charge will remain the same, and that there is a one time $50 migration fee that will be charged to my account by Intermedia.net.

This is code for the form above:


<cfform method="POST" action="92.cfm">





























MemberGate Required Fields Form

Text here

Your Name:

<cfinput TYPE="text" NAME="cust_Name" size="40" required="yes" message="Please enter your name">

Your Email:

<cfinput TYPE="text" NAME="from" size="40" required="yes" message="Please enter your email">

Your Domain Name:
<cfinput TYPE="text" NAME="Domain_Name" size="40" required="yes" message="Please enter your domain">

Current Intermedia.Net Account Name:
<cfinput TYPE="text" NAME="cust_account" size="40" required="yes" message="Please enter your customer number">

Comments:

<cftextarea NAME="cust_comments" ROWS="4" COLS="45" required="yes" message="Please enter your customer number">
</cftextarea>
<cfinput type="checkbox" name="agree" value="agree" required="yes" message="Please confirm">

Yes, please move my account to the new dedicated server.
I understand that my hosting charge will remain the same,
and that there is a one time $50 migration fee that will be
charged to my account by Intermedia.net.

value="Submit Request">

/cfform