About Sitellite       Screenshots       Downloads       Forge      Documentation       Community       Support

You are here: Home / 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...
Page 2: A basic MailForm file begins wit...
Page 3: In MailForm, you can define form...
Page 4: Lets say we want to verify that ...
Page 5: All we have left to do now is to...

Members

Note: You can use your SitelliteForge.com account here and vice versa.

Username

Password

Forgot your password?

Not a member? Click here to register

Sitellite 5 Beta


Copyright © 2008, SIMIAN systems Inc.
All rights reserved. Privacy policy
Some of the icons on this site were created by the Gnome Project.