2012-11-15, 21:08:11
(2012-11-15, 02:05:53)PiN Wrote: ... but not know how to hook it up to GetSimple ...
Here is some help to get you started. You will also have to do a little bit of work yourself.
The attached file contains the code to put in a component (I will name this component 'contactform' for this example). It will be necessary to edit some settings in this code (according to your site information and admin. e-mail address, for example). Follow the comments to see what you must do.
Where it has changed from the original, I have marked the code like this:
//GS_edit - necessary changes to use with GetSimple.
//GS_site - some of the changes that will be necessary according to your site and hosting settings.
Compare this file with the original to see all the differences.
You must also install the DynPages plugin, to allow the component to be called from a page.
For the contact form page, you only need to insert
Code:
{% contactform %}
You must also make a page with the slug contact-pre, which has the introduction to the form and a page with the slug contact-post, which has the 'thank you' message after the form is sent. Do not add these two pages to the menu (they can also be 'Private' pages, so they cannot be seen directly from the front-end).
For the form styling, copy the CSS from the original contact.php file. The whole form is inside <div id="contactform"> ... </div> tags, so it is easy to adjust the appearance.
I think that is all. Take some time to experiment before you have to use this for a live site!
--
Nick.
Nick.