How do I create web mail or contact forms in MemberGate?

Tutorial

In MemberGate you can use a simple Tag to create & adds web mail or contact forms on your site.

When using this tag, by default, all mail will be sent to the webmaster address in "Email Settings" and the default "Thank you" page is always content page 3 on your site.

How do I create web mail or contact forms in MemberGate?

 

The Mail Form Tag

<cfinclude template="programs/mailform.cfm">

OR

<cfinclude template="programs/sendmailbcheck.cfm">

 (This code add a small Captcha script to your form)

 

Place this tag in the Text or HTML to Appear on This Page box in Add/Edit Content (remember to toggle the WYSIWYG editor off)

How do I create web mail or contact forms in MemberGate?

 

This tag produces a nice contact form like this one here: //www.membergate.com/public/department13.cfm

How do I create web mail or contact forms in MemberGate?

 

Confirgure a default contact mail form to send to a specific email address

You can also edit where this default form is sent by using the following tag directly below the sendmail tag:

<cfset sendto="[email protected]">

 

Example use

This is how the tags would look together on your site. Change '[email protected]' to your new email address.

<cfset sendto="[email protected]">
<cfinclude template="programs/mailform.cfm">

That's all you have to do.

 

Advanced Controlling the subject, the send to address, and the thank you page

If you wish to have complete control over the email form, you can use the following options:

Send-to - by default all email forms will be sent to [email protected]. You can change that by including the following above the call to the email form:

<cfset sendto="[email protected]">

The only restriction is that the email address must be one assigned to your site.

Subject Line - By default the subject line of the email form is left blank to be filled out by those who use the form. You can 'pre-load' the subject line by including the following code:

<cfset subject="Example Mail form">

Change the value to that of the subject line you wish to appear.

Thank You Page - by default, when a visitor uses the mail form, they will be shown the default thank you page (always content page 3 on your website). The page will usually look like: //www.membergate.com/public/3.cfm You might want a different thank you page to appear. To do that, include the following code:


<cfset thankyou="//www.membergate.com/public/3.cfm">

The value is full URL link to the thank you page, including the http://

The Message - By default the message area of the email form is left blank to be filled out by those who use the form. You can 'pre-load' the area by including the following code:

<cfset message="I'd love to see a tutorial on . . .">

 

An Advanced Form Example

The following code is an example of a mail form that sends an email to [email protected], with the subject line, 'tutorial request', with the thank you page being '113'.

<cfset subject="MemberGate tutorial request">


<cfset sendto="[email protected]">


<cfset thankyou="//www.membergate.com/members/113.cfm">


<cfset message="I'd love to see a tutorial on . . .">


<cfinclude template="programs/sendmail.cfm">