|
You are here: Home / Documentation / MailForm: The Sitellite Form API |
MailForm: The Sitellite Form API
A basic MailForm file begins with a class definition, which looks like the following:
<?php
class WebappContactForm extends MailForm {
function WebappContactForm () {
parent::MailForm ();
// create form widgets here
}
function onSubmit ($vals) {
// handle form action here
}
}
?>
This file would be saved as
inc/app/webapp/forms/contact/index.php. If we add an access.php
file to the same folder with the following contents, we will then be
able to refer to our form straight from the URL:; <?php /* sitellite_status = approved sitellite_access = public sitellite_action = on ; */ ?>A hint for next time: If you are creating multiple forms or boxes with the same access settings, you can use one access.php file the parent folder instead of duplicating the same access.php settings many times over. Now we can refer to our form in the following URL: http://www.yourWebSite.com/index/contact-form Please note that because "webapp" is the default app, its name can be omitted from the URL. Otherwise, the URL would be: http://www.yourWebSite.com/index/webapp-contact-form Next: Settings File 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. |