Contact Jan Thomas Consulting

January 16, 2009

Create a Contact Form in WordPress

Filed under: HomePage, WordPress Techniques — AdminJan @ 8:08 pm

Want more contact with your website visitors? CFormsII is a WordPress plugin created for just that purpose. Simply design your form through the CFormsII interface. Add it to a WordPress Page or Post. Then provide your users with a link to the Page or Post. This handy utility sends you the completed form via email. Learn how to set this up.

1. Install the CFormsII Plugin.

2. Bring up CFormsII in the WordPress administrator. CFormsII link is in the main WordPress menu. Look for the icon: cformsii-icon


3. Label fields: (Add fields as needed.)
Add any fields needed. Dropdown fields, edit fields, etc.
For Select Box separate options with a # for example: Type of Contact#Website#Blog#Flash.

VIEW THE CONTACT FORM WITH SELECT BOX

How to use the “Multiple form mail recipients” dropdown option:
Select field type Multiple Recipients. Click the Edit button. Enter the option name to be displayed in the drop down, then beside the name add the email address into the optional value field.

4. Create a new Page (or Post) to hold the Contact Form

  • Bring up the Pages menu on the main WordPress menubar.
  • Click the “Add New” Link.
  • Label the page something like “Contact Information”.
  • Add the Contact form by clicking in the page content area and press CForms button then insert. A string of code will be added to your page that looks something like this: <– cforms name=”contactpage”–>
  • The CForms button isn’t necessary. There are times I don’t see the CForms button in Edit Page and Edit Post. Just add this line of code into your page or post:

    <!--cforms name="contactpage"-->

    Where “contactpage” is the name of the CFormsII form you created.

  • Call this page to bring up the Contact Form. Here’s how I bring up my new Contact Form: www.janbthomas.com/jansblog/defaultcontact/

5. Create a Success Page for the Contact Form: (optional)
Core Form Admin -> Redirect
Select: Enable alternative success page.
URL: Create an html file to display a Thank you message. Add it to the themes directory.
[This step isn't required. This option is used to hide the contact form on success and replace it with a simple "Success" page.]

VIEW DEMO OF CONTACT WITH REDIRECT

6. As an alternative, create a template customized for the Content Form. For example, a template could be created without the menus and banners. Once created, add this template into the themes directory, and into the Content Information Page.

7. Here’s another option: bring up the contact form in a popup window. Use this HTML code to create a link to the new Contact Form:

<a class="postLink" href="#" 
onClick="window.open('http://www.janbthomas.com/jansblog/contact/', 'Contact Us','toolbar=yes,location=yes,directories=no,status=no, menubar=yes,scrollbars=no,width=500,height=500,top=100,left=250');"/> 
Contact Jan </a>

Here’s the final result: Contact Jan

For a more detailed description: View Popup Window Post

2 Comments »

  1. Your article about cform ii is very useful to me. I just installed it and created two forms that I love.

    Question: how do i use the “values” i added in a new form with radio buttons? I saw an excellent survey on someone else’s website, and it returns a different response depending on the total value. 9see that page attched), I know it’s possible, but don’t have a clue how to activate it.

    Can you give me some directions? I am non-techie, so I appreciate your patience.

    Sanda

    Comment by EmailComments — January 13, 2010 @ 1:51 pm

  2. Hi Sanda,

    CForms provides a programming solution that will allow you to change the success message depending on the values in your form.

    Here is a description of how to make this happen: Click to view the post.

    I hope this helps.

    Comment by AdminJan — January 13, 2010 @ 1:55 pm

RSS feed for comments on this post. TrackBack URL

Leave a comment

You must be logged in to post a comment.

Powered by WordPress