Wizards Toolkit Documentation

Form.php

This contains Wizards Toolkit functions for building HTML form fields.

These are universal functions required for saving of data, priming fields, hidden fields, etc.

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

Tags
author
Programming Labs
license
All rights reserved
version
2.0

Table of Contents

wzPageReadOnlyCheck()  : true
This function can be called at top of page to determine if page should be read-only.
wzFormHidden()  : HTML
Create hidden form field
wzFormPrepUpdField()  : mixed
wzFormWriteUpdField()  : mixed
wzFormPrimeField()  : hidden
Prime Field

Functions

wzPageReadOnlyCheck()

This function can be called at top of page to determine if page should be read-only.

wzPageReadOnlyCheck( string  $fncPage , string  $fncId) : true

If page is being converted to PDF (aka printed) then it will always be considered Read-Only. If the page is currently being edited by someone else, then this will return that it should be readonly and it will set the global variable $gloFormMsg with the information of who is currently editing the page including their phone number. This is based on the wzLoginLog table and only triggers if the person is currently on the page and it has not been more than 3 hours since they opened the page.

Parameters
$fncPage : string

name of page

$fncId : string

id of data being looked up on page

Tags
global

boolean $gloPrinting if printing to PDF then this will be true and result is read-only

global

string $gloEnableLockout checks to see if 'Y' and should make read-only if others on same page

global

string $gloFormMsg will have message and user info added if someone already editing page

Return values
true

if page should be read-only; otherwise returns false

wzFormHidden()

Create hidden form field

wzFormHidden( string  $fncName , string  $fncValue) : HTML
Parameters
$fncName : string

used to create name and id of input field

$fncValue : string

value of field

Return values
HTML

for hidden form field

wzFormPrepUpdField()

wzFormPrepUpdField ( mixed  $fncTable , mixed  $fncField , mixed  $fncFormType ) : mixed
Parameters
$fncTable : mixed
$fncField : mixed
$fncFormType : mixed
Return values
mixed

wzFormWriteUpdField()

wzFormWriteUpdField () : mixed
Return values
mixed

wzFormPrimeField()

Prime Field

wzFormPrimeField( string  $fncTable , string  $fncField , string  $fncValue) : hidden

If (and only if) page is in ADD mode then this function will create a hidden form field on the page with the value you passed. Upon leaving the page that value will be primed in the insert for this table.

Parameters
$fncTable : string

SQL data table name

$fncField : string

aka column name

$fncValue : string

to be saved

Tags
global

string $gloWTKmode checked to see if = 'ADD'

uses
function

wzFormPrepUpdField

uses
function

wzFormHidden

Return values
hidden

form field

Search results