Making a contact form
Had someone ask me over Twitter the other day how to make a contact form like mine in Graffiti. Here are some quick steps to get it accomplished for you.
- Create a post and set its post name to "contact", or something similar and just make a note of it.
- In your theme's folder, create a file named "contact.view", or if you created the post with another name, use "post-name.view" (replaces spaces with -).
- Fill the contents of the file with the following (key pieces in bold, rest will depend on your theme... the markup below is specific to my site's layout):
- In the Graffiti Control Panel, go to Presentation, Navigation, and add a reference to your Contact post onto your navigation bar.
And there you have it! With this, your post's title and body will be shown on the page, allowing you to easily manage the content of the page through the control panel, and the macro adds in all the necessary form elements to handle the contact page.