Easy-to-follow video tutorials help you learn software, creative, and business skills.Become a member

Building a simple contact form extension

From: ColdFusion Builder Essential Training

Video: Building a simple contact form extension

Before we get really started in this chapter, let's take a minute to go over exactly what we're going to be building. We're going to build a simple contact form extension that will create a contact form page where the details of the form can be e-mailed to us. I'm going to show you the extension first and then we'll spend the rest of the chapter building it. You'll find the extension under the Chapter 8 folder. It's called SimpleContactForm.zip. So, we'll install this extension. I'll just click the plus icon here in the Extensions view. I already have my Chapter 8 folder selected so I'll pick that zip file, click Open and here we can say it creates a simple contact form.

Building a simple contact form extension

Before we get really started in this chapter, let's take a minute to go over exactly what we're going to be building. We're going to build a simple contact form extension that will create a contact form page where the details of the form can be e-mailed to us. I'm going to show you the extension first and then we'll spend the rest of the chapter building it. You'll find the extension under the Chapter 8 folder. It's called SimpleContactForm.zip. So, we'll install this extension. I'll just click the plus icon here in the Extensions view. I already have my Chapter 8 folder selected so I'll pick that zip file, click Open and here we can say it creates a simple contact form.

I can right-click anywhere in my Project view to install it. Click Next again. There is my license. I'll accept the license agreement. Then I'll choose my server. All these steps were the same as when we went through using an extension in the previous chapter. Next once more and then Finish. Extension was successfully installed so I'll click OK. And now I'll show you how to use the extension. I can right-click anywhere in here. I'll choose Dan Short and Simple Contact Form, and all I need to do is specify the name of a file that I want to save and then where I want this form contents to be e-mailed to.

So, I'll click Browse and I see the list of my projects and I can choose where I want my file to go. I'll click OK and I then have some validation here. I can see the fileName cannot be empty, so I'll go around here and pick a file name. I can also ensure that it's a valid file name. If you notice, I'll not fill it out completely. Then I need to provide an e-mail. Here, we can see now that I've gone to the e-mail field then actually put in some data.

There is some additional validation that's been run on the filename. The filename must have a valid .cfm file. So, I guess I have to add a .cfm there. Now that the form is complete, the OK button is enabled, so I'll click OK. I then get a dialog that says A new file has been written. I'll click Close, and now I can see that file here in my Project View. If I open that up, we can see it's just checking to make sure that a form has been submitted. It's doing some simple validation and then running a cfmail tag, but you can see that it's being sent to dan@sitedriveinc.com, the exact same e-mail address that I provided in my dialog.

So, basically, what we're going to do is, if you take a look at the Begin folder, we're going to take this formTemplate.cfm. Let's go ahead and open that up. And we have a number of placeholders here. You'll notice I have two brackets and then the string mailTo. I have two brackets in mailSubject. I'm basically going to take all of the input that's provided to me through the extension dialog and I'll loop through each of those values that get sent and do a replace inside of my formTemplate. So, if I scroll over here you can see I also have data for the mailServer, the username, the password.

All of the details that I asked for in that form are going to be replaced where these brackets are. And if I go and take a look at the extension itself, I need to refresh this to get it to show those new files that got added. You'll see I have an ide_config file just like our previous extensions we've looked at. Then in the handlers directory, I have a formTemplate.cfm and a single index.cfm. This index.cfm is going to be my handler, which we're going to cover later in this chapter.

So, that's our project for this chapter. We're going to build our extension UI and then we're going to use all of the data provided through that UI to do some simple replacements inside of our formTemplate.

Show transcript

This video is part of

Image for ColdFusion Builder Essential Training
ColdFusion Builder Essential Training

40 video lessons · 3947 viewers

Daniel Short
Author

 
Expand all | Collapse all
  1. 7m 48s
    1. Welcome
      59s
    2. Installing ColdFusion Builder
      2m 20s
    3. Installing ColdFusion Builder as a plug-in
      3m 18s
    4. Using the exercise files
      1m 11s
  2. 17m 42s
    1. Workspace overview
      2m 25s
    2. Organizing your workspace
      6m 19s
    3. Adding and selecting workspaces
      2m 53s
    4. Installing and managing plug-ins
      6m 5s
  3. 12m 12s
    1. Creating projects
      2m 11s
    2. Importing projects
      2m 48s
    3. Creating project working sets
      2m 23s
    4. Managing projects
      2m 22s
    5. Linking folders
      2m 28s
  4. 23m 2s
    1. Configuring and managing ColdFusion servers
      6m 26s
    2. Using the Services Browser
      4m 15s
    3. Using RDS Dataview and Fileview
      4m 52s
    4. Using FTP
      7m 29s
  5. 18m 10s
    1. Creating editor profiles
      2m 6s
    2. Using Code Assist
      5m 43s
    3. Setting code coloring
      4m 5s
    4. Using shortcut keys
      3m 5s
    5. Working with outlines and syntax checking
      3m 11s
  6. 37m 40s
    1. Using code completion
      7m 25s
    2. Using snippets
      9m 23s
    3. Using SQL editing and the Query Viewer
      5m 55s
    4. Working with components
      7m 27s
    5. Working with variable mapping
      2m 14s
    6. Navigating code and documents
      5m 16s
  7. 13m 12s
    1. Getting set up
      3m 50s
    2. Using the ColdFusion debugger
      5m 37s
    3. Watching logs with Tailview
      3m 45s
  8. 13m 8s
    1. Installing extensions
      4m 5s
    2. Using the CFC Generator extension for ColdFusion 8
      4m 52s
    3. Using the CFC Generator extension for ColdFusion ORM
      4m 11s
  9. 34m 5s
    1. Building a simple contact form extension
      3m 42s
    2. Creating user interfaces
      8m 55s
    3. Packaging the extension
      3m 55s
    4. Building the handler
      8m 10s
    5. Using the Builder extension
      9m 23s
  10. 25s
    1. Goodbye
      25s

Start learning today

Get unlimited access to all courses for just $25/month.

Become a member
Sometimes @lynda teaches me how to use a program and sometimes Lynda.com changes my life forever. @JosefShutter
@lynda lynda.com is an absolute life saver when it comes to learning todays software. Definitely recommend it! #higherlearning @Michael_Caraway
@lynda The best thing online! Your database of courses is great! To the mark and very helpful. Thanks! @ru22more
Got to create something yesterday I never thought I could do. #thanks @lynda @Ngventurella
I really do love @lynda as a learning platform. Never stop learning and developing, it’s probably our greatest gift as a species! @soundslikedavid
@lynda just subscribed to lynda.com all I can say its brilliant join now trust me @ButchSamurai
@lynda is an awesome resource. The membership is priceless if you take advantage of it. @diabetic_techie
One of the best decision I made this year. Buy a 1yr subscription to @lynda @cybercaptive
guys lynda.com (@lynda) is the best. So far I’ve learned Java, principles of OO programming, and now learning about MS project @lucasmitchell
Signed back up to @lynda dot com. I’ve missed it!! Proper geeking out right now! #timetolearn #geek @JayGodbold
Share a link to this course

What are exercise files?

Exercise files are the same files the author uses in the course. Save time by downloading the author's files instead of setting up your own files, and learn by following along with the instructor.

Can I take this course without the exercise files?

Yes! If you decide you would like the exercise files later, you can upgrade to a premium account any time.

Become a member Download sample files See plans and pricing

Please wait... please wait ...
Upgrade to get access to exercise files.

Exercise files video

How to use exercise files.

Learn by watching, listening, and doing, Exercise files are the same files the author uses in the course, so you can download them and follow along Premium memberships include access to all exercise files in the library.


Exercise files

Exercise files video

How to use exercise files.

For additional information on downloading and using exercise files, watch our instructional video or read the instructions in the FAQ .

This course includes free exercise files, so you can practice while you watch the course. To access all the exercise files in our library, become a Premium Member.

Join now Already a member? Log in

Are you sure you want to mark all the videos in this course as unwatched?

This will not affect your course history, your reports, or your certificates of completion for this course.


Mark all as unwatched Cancel

Congratulations

You have completed ColdFusion Builder Essential Training.

Return to your organization's learning portal to continue training, or close this page.


OK
Become a member to add this course to a playlist

Join today and get unlimited access to the entire library of video courses—and create as many playlists as you like.

Get started

Already a member ?

Become a member to like this course.

Join today and get unlimited access to the entire library of video courses.

Get started

Already a member?

Exercise files

Learn by watching, listening, and doing! Exercise files are the same files the author uses in the course, so you can download them and follow along. Exercise files are available with all Premium memberships. Learn more

Get started

Already a Premium member?

Exercise files video

How to use exercise files.

Ask a question

Thanks for contacting us.
You’ll hear from our Customer Service team within 24 hours.

Please enter the text shown below:

The classic layout automatically defaults to the latest Flash Player.

To choose a different player, hold the cursor over your name at the top right of any lynda.com page and choose Site preferences from the dropdown menu.

Continue to classic layout Stay on new layout
Exercise files

Access exercise files from a button right under the course name.

Mark videos as unwatched

Remove icons showing you already watched videos if you want to start over.

Control your viewing experience

Make the video wide, narrow, full-screen, or pop the player out of the page into its own window.

Interactive transcripts

Click on text in the transcript to jump to that spot in the video. As the video plays, the relevant spot in the transcript will be highlighted.

Thanks for signing up.

We’ll send you a confirmation email shortly.


Sign up and receive emails about lynda.com and our online training library:

Here’s our privacy policy with more details about how we handle your information.

Keep up with news, tips, and latest courses with emails from lynda.com.

Sign up and receive emails about lynda.com and our online training library:

Here’s our privacy policy with more details about how we handle your information.

   
submit Lightbox submit clicked
Terms and conditions of use

We've updated our terms and conditions (now called terms of service).Go
Review and accept our updated terms of service.