|
You are here: Home / MailForm: The Sitellite Form API |
MailForm: The Sitellite Form API
All we have left to do now is to actually DO
something with the form once it has been submitted by a visitor to our
site. We do this in the onSubmit() method of our form
class. Let's use an example that would be appropriate for our
form and have it email us the visitor's message.
<?phpNow you should have a working contact form. In the real world, you would want to check that the mail() function actually worked, and you would also want to move your response message into a template, for the sake of cleanliness. But for a short example, I'm sure you'll forgive my poor habits. :) As you can see, building forms in Sitellite is very straight-forward, but very powerful as well. The real pay-off comes when you start building longer forms needing more advanced functionality and validation, and multiple-screen forms (ie. chaining multiple forms together), because no matter the form size, your code remains short and readable, and your forms remain easy to maintain. Page 1: Sitellite features one of the mo... |
|
Copyright © 2008, SIMIAN systems Inc. All rights reserved. Privacy policy Some of the icons on this site were created by the Gnome Project. |