Class Form

Form

public class Form

A Class that creates an Html Form and spits out the results in a formatted/non-formatted fashion. Formated form will be inside a table.


Constructor Summary
Form(var $formName)
          Constructor of the class Form.
 
Method Summary
 void AddFormElement(var $object)
          Method to add a ControlGroup's Object into this Form.
 void AddFormElementToNewLine(var $object)
          Method to add a ControlGroup's Object to a new line or a new Table Row into this Form.
 string GetAction()
          Method to get the Form's URL.
 string GetErrorMessage()
          Method to get the Form's error message.
 string GetForm()
          Method to Get the Html format of the form in a non-formatted way.
 string GetFormInTable()
          Method to Get the Html format of the form in a formatted way, which is a table.
 string GetFormName()
          Method to get the Form's name.
 string GetMethod()
          Method to get the Form's post method, ie(get,post).
 void GetNumberOfColumns()
          Method to get the number of columns to be displayed.
 void SetAction(var $action)
          Method to set the Form's URL.
 void SetAlign(var $allignment)
          Method to set the horizontal allignment.
 void SetBorder(var $size)
          Method to set the border size.
 void SetCellPadding(var $cellPadding)
          Method to set the cellpadding.
 void SetCellSpacing(var $cellSpace)
          Method to set the cellspacing.
 void SetCSS(var $css)
          Method to set the class for CSS.
 void SetEmptyCells(var $trueFalse)
          Method to set the class (CSS) of the table cells.
 void SetErrorMessage(var $message)
          Method to set the error messages if needed to be used in the form.
 void SetExtraFormTags(var $stringValue)
          Method to set any extra form tags that would be required.
 void SetFormHeader(var $header)
          Method to set the header for the form.
 void SetFormTagRequired(var $answer)
          Method to set if the form tag is required or not.
 void SetMethod(var $method)
          Method to set the Form's post method, ie(get,post).
 void SetNumberOfColumns(var $columnNumber)
          Method to set the number of columns to be displayed.
 void SetTableHeight(var $height)
          Method to set the table height.
 void SetTableWidth(var $width)
          Method to set the table width.
 void SetTRMouseOverColor(var $overcolor, var $outcolor, var $startingRow)
          Method to set the TR mouseover color.
 void SetValign(var $allignment)
          Method to set the vertical allignment.
 

Constructor Detail

Form

public Form(var $formName)
Constructor of the class Form.
Parameters:
$formName - Default Value: "myform"
Method Detail

SetAction

public void SetAction(var $action)
Method to set the Form's URL.

SetMethod

public void SetMethod(var $method)
Method to set the Form's post method, ie(get,post).

SetNumberOfColumns

public void SetNumberOfColumns(var $columnNumber)
Method to set the number of columns to be displayed.

GetNumberOfColumns

public void GetNumberOfColumns()
Method to get the number of columns to be displayed.

SetCellSpacing

public void SetCellSpacing(var $cellSpace)
Method to set the cellspacing.

SetCellPadding

public void SetCellPadding(var $cellPadding)
Method to set the cellpadding.

SetBorder

public void SetBorder(var $size)
Method to set the border size.

SetAlign

public void SetAlign(var $allignment)
Method to set the horizontal allignment.

SetValign

public void SetValign(var $allignment)
Method to set the vertical allignment.

SetTableWidth

public void SetTableWidth(var $width)
Method to set the table width.

SetTableHeight

public void SetTableHeight(var $height)
Method to set the table height.

SetCSS

public void SetCSS(var $css)
Method to set the class for CSS.

SetErrorMessage

public void SetErrorMessage(var $message)
Method to set the error messages if needed to be used in the form.

SetFormTagRequired

public void SetFormTagRequired(var $answer)
Method to set if the form tag is required or not. Set it to FALSE if you don't want any form tags to be displayed.
Parameters:
$answer - Default Value: TRUE

SetExtraFormTags

public void SetExtraFormTags(var $stringValue)
Method to set any extra form tags that would be required.

GetAction

public string GetAction()
Method to get the Form's URL.

GetMethod

public string GetMethod()
Method to get the Form's post method, ie(get,post).

GetFormName

public string GetFormName()
Method to get the Form's name.

GetErrorMessage

public string GetErrorMessage()
Method to get the Form's error message.

SetEmptyCells

public void SetEmptyCells(var $trueFalse)
Method to set the class (CSS) of the table cells.

SetTRMouseOverColor

public void SetTRMouseOverColor(var $overcolor,
                                var $outcolor,
                                var $startingRow)
Method to set the TR mouseover color.

SetFormHeader

public void SetFormHeader(var $header)
Method to set the header for the form.

AddFormElement

public void AddFormElement(var $object)
Method to add a ControlGroup's Object into this Form. Like a TextField or a SubmitButton

AddFormElementToNewLine

public void AddFormElementToNewLine(var $object)
Method to add a ControlGroup's Object to a new line or a new Table Row into this Form. Like a * TextField or a SubmitButton

GetFormInTable

public string GetFormInTable()
Method to Get the Html format of the form in a formatted way, which is a table.

GetForm

public string GetForm()
Method to Get the Html format of the form in a non-formatted way.