Public Member Functions | Data Fields

Form Class Reference

Public Member Functions

 __construct ($name, $submitLabel, $tableName, $type, $formheading)
 addRow ($row)
 setReturnURLSuccess ($returnURL)
 setReturnURLFailure ($returnURL)
 setDebug ($debug)
 setKey ($keyField, $keyValue)
 run ()

Data Fields

 $formheading
 $row = array()
 $name
 $submitLabell
 $tableName
 $type
 $returnURLSuccess
 $returnURLFailure
 $keyField
 $keyValue
 $debug = false

Detailed Description

SiT! Form class

Definition at line 8 of file sitform.inc.php.


Constructor & Destructor Documentation

__construct ( name,
submitLabel,
tableName,
type,
formheading 
)

Definition at line 22 of file sitform.inc.php.

References $_SERVER, $formheading, $name, $tableName, $type, name, and type.

    {
        $this->name = $name;
        $this->submitLabel = $submitLabel;
        $this->tableName = $tableName;
        $this->type = $type;
        $this->formheading = $formheading;

        $this->returnURLSuccess = $_SERVER['PHP_SELF'];
        $this->returnURLFailure = $_SERVER['PHP_SELF'];
    }


Member Function Documentation

addRow ( row  ) 

Definition at line 35 of file sitform.inc.php.

References $row.

    {
        $this->row[] = $row;
    }

run (  ) 

Definition at line 153 of file sitform.inc.php.

References $submit, and cleanvar().

    {
        $submit = cleanvar($_REQUEST['submit']);

        if (empty($submit))
        {
            echo $this->generateHTML();
        }
        else
        {
            echo $this->processForm();
        }
    }

setDebug ( debug  ) 

Definition at line 53 of file sitform.inc.php.

References $debug, and debug.

    {
        $this->debug = $debug;
    }

setKey ( keyField,
keyValue 
)

Definition at line 59 of file sitform.inc.php.

References $keyField, and $keyValue.

    {
        $this->keyField = $keyField;
        $this->keyValue = $keyValue;
    }

setReturnURLFailure ( returnURL  ) 

Definition at line 47 of file sitform.inc.php.

    {
        $this->returnURLFailure = $returnURL;
    }

setReturnURLSuccess ( returnURL  ) 

Definition at line 41 of file sitform.inc.php.

    {
        $this->returnURLSuccess = $returnURL;
    }


Field Documentation

$debug = false

Definition at line 20 of file sitform.inc.php.

Referenced by setDebug().

$formheading

Definition at line 10 of file sitform.inc.php.

Referenced by __construct().

$keyField

Definition at line 18 of file sitform.inc.php.

Referenced by setKey().

$keyValue

Definition at line 19 of file sitform.inc.php.

Referenced by setKey().

$name

Definition at line 12 of file sitform.inc.php.

Referenced by __construct().

$returnURLFailure

Definition at line 17 of file sitform.inc.php.

$returnURLSuccess

Definition at line 16 of file sitform.inc.php.

$row = array()

Definition at line 11 of file sitform.inc.php.

Referenced by addRow().

$submitLabell

Definition at line 13 of file sitform.inc.php.

$tableName

Definition at line 14 of file sitform.inc.php.

Referenced by __construct().

$type

Definition at line 15 of file sitform.inc.php.

Referenced by __construct().


The documentation for this class was generated from the following file:

For more help developing with SiT! see http://sitracker.org/wiki/DevelopmentHowTo

© 2008-2011 Support Incident Tracker

Tsohost Logo