The documentation is incomplete. The Vae Soli! team works hard to make it as exhaustive as possible with tons of useful examples and easy to understand explanations.
On top of that, we have decided to use our own tool to generate the documentation you read. This also takes time to fine-tune. Our goal is have better documentation, easier to read, easier to use, completely integrated with our site.
Even though NOT finalized, you can now link back to our documentation pages as we have decided once and for all about the structure of our documents and where they all reside on our server.
Thank you very much
The Vae Soli! team.
Generated by The Vae Soli! Documentor: Guide v. 1.3.0018 on 09-06-2014 09:09:29 (DD-MM-YYYY HH:mm:SS). This documentation is built with Vae Soli! functions and classes!
Assertions count: 0
Assertions successful: 0
Assertion failures: 0
LSForm.class.php
exceeds 51200 bytes. We suggest this file got broken down in smaller chunks!
LSForm.class.php
contains 1694 lines of code, which exceeds the suggested limit of 1024 lines. We suggest this file got broken down in smaller chunks!
LS_FORM_CLASS_PWH
: Define "LS" forms (Pat Was Here)
VAESOLI_PATH
: Define the path where Vae Soli! is installed
VAESOLI_PLUGINS
: Define the path where plugins are located
LSV.functions.php
: Vae Soli! Foundation functions
LSLabel.class.php
: <label> class
LSInput.class.php
: <input> class
LSDataEnvironment.class.php
: Data environment class
LSFieldset.class.php
: Data environment class
LSForm
extends LSContainer
Generic services to create HTML formsA special note about the genome:
The genome of a form makes it possible to activate and annihilate constituents of the form (say input zones, labels, divisions, and the likes). If the constituents do not have the proper genes, they are annihilated (not expressed).
For as smart as it sounds, the implementation of the genome in a form is actually technically straightforward. Genes are coded as cells in an array. Genome is a string. If a gene (a value stored in the array) is found in the genome (the string), the component is rendered. Period! Quite simple as a matter of fact!
Despite this inner simplicity, the genome can achieve great results such as having a form being expressed for PHONES or for TABLETS. A simple variation of the genome (a string) dictates how the form must be rendered. The variation itself can either be introduced manually or programmatically which brings enormous additional value to the mechanism.
Name | Visibility | Type | Description |
---|---|---|---|
$HasFile |
public | boolean | Indicates whether the form is supposed to handle files (can be set manually; otherwise, it is treated automatically by examining all controls) |
$NoECMA |
public | bool | Indicates whether we need to have the ECMA scripts
be generated.false by default
(= ECMA scripts generated) |
$NoValidate |
public | bool | Novalidate attribute of the form (HTML5) |
$PostRenderFnc |
public | string | Callback to play after rendering of the form |
$PreRenderFnc |
public | string | Callback to play before rendering of the form |
$WithPreviousValues |
public | bool | Indicates if previous control values must be saved in the form |
$WithTabIndex |
public | bool | Determines whether tabindex must be used or not.
true by default |
$aECMA |
public | array | Internal array of scripts to be generated by Vae Soli! for entry checks and form validation |
$aObjects |
public | array | Array of objects that are contained within the form |
$iTabIndex |
public | int | tabindex in the form (use the $iTabIndex
property of the current page (LSPage ) to hold
a precise count between forms) |
$oDataEnvironment |
public | LSDataEnvironment | A LSDataEnvironment object. Warning: not really
used at this stage (04-09-13 07:46) |
$oPage |
public | LSPage | The page in which this form must be rendered.
null by default |
$szAction |
public | string | Action fo the form (usually a URL or self to
submit the form to the current script) |
$szAfterword |
public | string | Text that must follow the rendering of the form |
$szAutocomplete |
public | string | Enumerated type (on, off). The off state indicates that by default, form controls in the form will have their resulting autocompletion state set to off; the on state indicates that by default, form controls in the form will have their resulting autocompletion state set to automatic. |
$szForeword |
public | string | Text that must precede the rendering of the form |
$szMethod |
public | string | HTTP method to be invoked when the form is to be submitted |
$szMode |
public | string | Mode the form is entered. Can be 'edit'
(modification of an existing record) or 'add'
(add a new record). 'add' by default |
$szTarget |
public | string | Enumerated type (_blank, _self, _parent, _top). Specifies where to display the response that is received after submitting the form |
$szType |
public | string | Container type. 'form' by default |
$szVersion |
public | string | Form version. 'Web form 1.0' by default.
Set to 'Web form 2.0' to benefit from
HTML5 controls |
LSContainer
)Name | Type |
---|---|
Databag |
boolean |
IsHTML5 |
boolean |
IsMandatory |
boolean |
IsReadonly |
boolean |
IsVisible |
boolean |
WithDataBag |
boolean |
aGenes |
NULL |
aHTML5Match |
array |
iHeight |
NULL |
iIndentLevel |
integer |
iIndentSpaces |
integer |
iInstance |
integer |
iInstances |
integer |
iLeft |
NULL |
iLevel |
integer |
iMaxLength |
NULL |
iSize |
NULL |
iTop |
NULL |
iWidth |
NULL |
oContainer |
NULL |
szBrowser |
string |
szClass |
NULL |
szComment |
NULL |
szDataBag |
string |
szDesc |
NULL |
szErrorMsg |
string |
szGUID |
NULL |
szGenome |
NULL |
szID |
NULL |
szInnerLeader |
NULL |
szInnerTrailer |
NULL |
szLang |
string |
szLeader |
NULL |
szName |
NULL |
szOnBlur |
NULL |
szOnChange |
NULL |
szOnClick |
NULL |
szOnFocus |
NULL |
szOnKeyDown |
NULL |
szOnKeyPress |
NULL |
szOnKeyUp |
NULL |
szOnLoad |
NULL |
szOnMouseOver |
NULL |
szOnSelect |
NULL |
szOnSubmit |
NULL |
szOnUnLoad |
NULL |
szPixels |
string |
szPlatform |
string |
szStyle |
NULL |
szText |
NULL |
szTitle |
NULL |
szTooltip |
NULL |
szTrailer |
NULL |
szType |
NULL |
szValue |
NULL |
'novalidate'
attribute of a form __construct()
: Class constructor.__construct( $szID,$szAction,$szClass,$szMethod,$szVersion )
Name | Type | Description |
---|---|---|
$szID |
string | ID of the form. Optional. |
$szAction |
string | Action of the form. Optional. |
$szClass |
string | CSS Class of the form. Optional. |
$szMethod |
string | Post or Get. Optional |
$szVersion |
string | Version of the form. Optional. $oPage (LSPage) The page in which this form must be rendered. Optional. |
__construct()
uses 5 parameters whereas the suggested limit is 3.
(void)
WARNING: No Unit Testing found. Please provide assertions with assertion constructs ({*assert ... *}
) or with GuideAssert()
function calls in exec constructs ({*exec LSUnitTesting::assert(...); *}
).
__get()
: Magic method. Called when trying to access a property which seems to be not accessible__get()
None
(mixed) property we look for (can also be an object).
null
is returned when $szName does not
correspond to any known control of the current
form
WARNING: No Unit Testing found. Please provide assertions with assertion constructs ({*assert ... *}
) or with GuideAssert()
function calls in exec constructs ({*exec LSUnitTesting::assert(...); *}
).
FindControlByName()
, FindControlById()
AddObject()
: Adds an object to the containerAddObject( $oObj )
Name | Type | Description |
---|---|---|
$oObj |
mixed | Can be a LSInput , LSLabel , LSFieldset ,
LSTag (supported LSTag types :'p','div',
'datalist' or 'hr' ) or LSCursor object.
In the case of a LSCursor object, it is actually
added to the $oDataEnvironment member of the
form (LSDataEnvironment ) |
(void)
WARNING: No Unit Testing found. Please provide assertions with assertion constructs ({*assert ... *}
) or with GuideAssert()
function calls in exec constructs ({*exec LSUnitTesting::assert(...); *}
).
BuildAutocomplete()
: Builds the autocomplete attribute of a formBuildAutocomplete()
None
(string) The autocomplete attribute of the form
WARNING: No Unit Testing found. Please provide assertions with assertion constructs ({*assert ... *}
) or with GuideAssert()
function calls in exec constructs ({*exec LSUnitTesting::assert(...); *}
).
BuildNoValidate()
: Builds the 'novalidate'
attribute of a formBuildNoValidate()
None
(string) The novalidate attribute of the form
WARNING: No Unit Testing found. Please provide assertions with assertion constructs ({*assert ... *}
) or with GuideAssert()
function calls in exec constructs ({*exec LSUnitTesting::assert(...); *}
).
BuildTarget()
: Builds the target attribute of a formBuildTarget()
None
(string) The target attribute of the form
WARNING: No Unit Testing found. Please provide assertions with assertion constructs ({*assert ... *}
) or with GuideAssert()
function calls in exec constructs ({*exec LSUnitTesting::assert(...); *}
).
GenerateECMA()
: Generates the ECMAScript of the formGenerateECMA( $aFuncs,$szType )
Name | Type | Description |
---|---|---|
$aFuncs |
array | An array of function signatures. Updated upon return. By reference. |
$szType |
string | Type of ECMAScript to generate: ltrim, rtrim or trim. |
(string) The ECMA script or empty (''
) if $szType
is
not supported.
WARNING: No Unit Testing found. Please provide assertions with assertion constructs ({*assert ... *}
) or with GuideAssert()
function calls in exec constructs ({*exec LSUnitTesting::assert(...); *}
).
Render()
: Generates the HTML code of the formModified: 05/09/2013 Genome taken into account
Render( $oContainer )
Name | Type | Description |
---|---|---|
$oContainer |
LSControl | The container of the current control.
Optional. null by default |
(void) No return is provided
WARNING: No Unit Testing found. Please provide assertions with assertion constructs ({*assert ... *}
) or with GuideAssert()
function calls in exec constructs ({*exec LSUnitTesting::assert(...); *}
).
RenderECMA()
: Generates all the ECMA scripts that are needed by the form. If the same validation code is needed by several LSInput controls, the code is rendered only once.RenderECMA()
None
(string) The ECMA script code that has been generated (javascript)
WARNING: No Unit Testing found. Please provide assertions with assertion constructs ({*assert ... *}
) or with GuideAssert()
function calls in exec constructs ({*exec LSUnitTesting::assert(...); *}
).