Creating a Contact Form in Freeway

12th of April, 2012

Creating a contact form in Freeway is very easy. On the face of it all forms are the same, they contain one or more input items that visitors of your site can type inside or select, and a submit button. When the submit button is clicked, the text entered and options selected by the visitor is sent off to an email address (or addresses) of your choice. How this happens depends on your hosting package so it will be different for some people. The following steps require you to have PHP on your server, they won't work on MobileMe or servers that don't support PHP.

If you require a host that supports the PHP Feedback Form then we have fully tested and recommend using FatCow, or InMotion hosting.

Creating the Form

  1. Start off by drawing a table on the page, this will be used to line up the form elements on the page. Click the Table toolbar icon and draw the table on the page. The number of rows and columns will depend on the amount of data you want to get from visitors, but, for the purpose of this tutorial, give the table 4 Rows and 2 Columns. Set the Spacing to 5px and the Padding and Border to 0px.
  2. Double click inside the first cell and type Name:
  3. Double click inside the second cell and select Text Field from the Insert menu
  4. Select this item and in the Inspector palette's third pane (Item Output settings) enter name in the Name field

  5. Enter Email: into the first cell of the second row
  6. Insert another Text Field into the second cell of the second row
  7. Enter email in the Name field of the Inspector's Item Output settings.

  8. Enter Message: in the first cell of the third row
  9. Double click inside the second cell on the third row and this time select Text Area from the Insert menu
  10. Enter message in the Name field of the Inspector's Item Output settings.
  11. Double click inside the second cell of the fourth row and select Button from the Insert menu. This will be a submit button by default
  12. Change the appearance of what you have to fit in with your design, if you are finding that the form items you have are smaller in preview than they are in Freeway then use the Freeze Form Action to force them to a specific pixel width and height.

Controlling the Form with a Script

You will now have a form on your page, the final steps are to set this form up so it can be sent to your email address.

The recommended way doing this is with PHP, so contact your host to find out if your hosting package supports it. Don't worry, you won't need to learn PHP to do this, just download and install the PHP Feedback Form Action (it's available for Pro and Express).

Assuming that your server supports PHP:
  1. Open the Page Actions menu from the Page menu and select PHP Feedback Form
  2. Open the Actions palette by selecting Actions from the Window menu (if you see an error message in the Actions palette stating that the Action requires AppleScript, go to Preferences in the Freeway dropdown menu and switch on the "Enable AppleScript in Actions" option)
  3. In the Error Page pulldown choose Other...
  4. In the Hyperlink dialog that appears click New Page. Call the page Error.html (this new page will be displayed if there is a problem sending your form)
  5. Select Error.html and click Ok
  6. In the Success Page pulldown choose Other...
  7. In the Hyperlink dialog that appears click New Page. Call the page Thanks.html (this page will be displayed if there are no problems sending your form)
  8. Select Thanks.html and click Ok
  9. Type your email address into the Email Recipient field
  10. Amend the Error and Thanks pages to match your design
  11. Upload your site using the Upload dialog from the File menu to test it
If your hosting package doesn't have PHP or you want to try something else then there are other options available. Take a look at the following tutorial to see if it suits your needs:

Formmail tutorial (Perl/CGI)

You might also be interested in looking into using a third-party form creation method such as FormsToGo from Bebosoft which lets you set up a form which works using PHP, ASP or Perl/CGI. Please note that you will need to contact Bebosoft for support for making forms with FormsToGo.

Another excellent PHP Action can be found here along with superb documention: easiForm with Freeway

User Opinions

71% thumbs up 28% thumbs down (59 votes)

How would you rate this answer?

Thank you for rating this answer.