Customize form elements in your form-generated emails

This tutorial will show you how to create a email to be sent from your website when your user submits a form. When you use the email wizard on a page with a form, Data Bridge automatically includes all of the form elements in the body of your email. This tutorial shows you how to customize those elements and include only the ones you want.

So you want to make a form that sends an email when it's submitted? Well, the first step in the whole process is making that form. For this, we're going to use the form tools built into the ever propitious Data Bridge.

For those of you still unsure if Data Bridge was worth the purchase: it was.

Configure the form

In Dreamweaver, make sure your site is selected.

Open a PHP page within your site.

In the menu bar, click WebAssist > Forms > Insert New Form.

This Opens the Form Builder Add Form Wizard. This is where we will make our form. You can configure your form however you wish, but for this tutorial, we will use, and make references to, the Appointment Request form.

Under "Choose a form", change the first dropdown menu to "Contact".

Change the second dropdown menu to "Appointment Request".

Configure email

Click the form function tab.

Click the "Send the form contents in an email" checkbox.

Next to the From field, click the bindings lightning bolt.

Expand the Current Working Form list.

Select the Email_Address binding.

Click OK.

Enter your email address in the To field.

Enter "Appointment Request" in the Subject field.

Click Finish in the Form Builder Wizard.

Your form is being built with some fancy pants fields, and a basic copy of the Universal Email server behavior added on the page. This is what we'll use to send emails.

Nothing makes someone feel more successful than someone or something telling them, "You've done it. You've inspired us all". We're going to create a basic success page so that people know they went the distance, and have really made it.

Click File > New in the menu bar.

Create a blank PHP page named form-success.php .

In the body of the page, enter the following text.Note that this is just for this tutorial. You may want to use something more personalized to your application.

Thank you for your appointment request. We will contact you within the hour.

Save the page.

Now we have a rudimentary success page that will be shown once the form is submitted.