KoolForm Class [PHP]
Summary
Properties | Description | |
Controls | This is an associate array containing all controls that has been added to form. | |
Decoration | Turn on/off the decoration for particular form elements. | |
DecorationEnabled | Get or set whether the form will be decorated. | |
id | Get the id of KoolForm. | |
IsPostBack | Get whether the form has just been posted back. | |
RenderWithExistingMarkup | Set whether koolform will be used to enhance existing html mark-up. | |
scriptFolder | Get or set the path to folder which contains KoolForm script. | |
StatePersistent | Get or set whether the view state of each controls and the form will be persistent. | |
styleFolder | Get or set folder which contain css style for KoolForm | |
Validate | Get or set whether the form will be validated before submitted. |
Methods | Description | |
Init | Initiate koolform. | |
AddControl | Add a control to form. | |
Render | Render the KoolForm | |
RegisterScript | Return html to register js library for KoolForm. | |
RegisterCSS | Return html to register CSS for KoolForm | |
RenderForm | Return html content of KoolForm body | |
StartupScript | Return js code to inititate KoolForm |
Properties Detail
ControlsTop
array Controls
This is an associate array containing all controls that has been added to form. You can access to particular controls through its id.
Supported from version: 1.0.0.0
DecorationTop
object Decoration
Turn on/off the decoration for particular form elements. Please have a look at below example code.
Supported from version: 1.0.0.0
DecorationEnabledTop
bool DecorationEnabled
Get or set whether the form will be decorated.
Default value : true
Supported from version: 1.0.0.0
idTop
string id
Get the id of KoolForm. As the rule, the id of KoolForm will be the id of the form added with "_manager".
Supported from version: 1.0.0.0
IsPostBackTop
bool IsPostBack
Get whether the form has just been posted back.
Supported from version: 1.0.0.0
RenderWithExistingMarkupTop
bool RenderWithExistingMarkup
When this is set to true, you do not need to use Render() function to render content for each controls. Instead, KoolForm will based on existing html mark-ups to initiate.
Default value : false
Supported from version: 1.0.0.0
scriptFolderTop
string scriptFolder
Get or set the path to folder which contains KoolForm script.
Supported from version: 1.0.0.0
StatePersistentTop
bool StatePersistent
Get or set whether the view state of each controls and the form will be maintained. If the StatePersistent is set to false, the values of all controls will be reset after postback.
Default value : true
Supported from version: 1.0.0.0
styleFolderTop
string styleFolder
Get or set folder which contain css style for KoolForm
Supported from version: 1.0.0.0
ValidateTop
bool Validate
Get or set whether the form will be validated before submitted.
Default value : true
Supported from version: 1.0.0.0
Methods Detail
InitTop
void Init()
Initiate koolform. This function should be called before koolform Render() function.
Supported from version: 1.0.0.0
AddControlTop
object AddControl(object $control)
Add a control to form. The return of function is the created control.
Supported from version: 1.0.0.0
RegisterScriptTop
string RegisterScript()
Return html to register js library for KoolForm.
Supported from version: 1.0.0.0
RegisterCSSTop
string RegisterCSS()
Return html to register CSS for KoolForm
Supported from version: 1.0.0.0
RenderFormTop
string RenderForm()
Return html content of KoolForm body
Supported from version: 1.0.0.0
StartupScriptTop
string StartupScript()
Return js code to inititate KoolForm
Supported from version: 1.0.0.0