ePages 6.11.0 - DE_EPAGES/Presentation/API/Table/FormField.pm

Package DE_EPAGES::Presentation::API::Table::FormField

interface for table FormField

@EXPORT_OK
InsertFormField
UpdateFormField
DeleteFormField
GetAllPKeyFormFields
GetAllInfoFormFields
GetInfoFormField
ExistsFormField
GetPKeyFormFieldByFormID
GetInfoFormFieldByFormID
ExistsFormFieldByFormID
GetPKeyFormFieldsByFormID
GetInfoFormFieldsByFormID
GetPKeyFormFieldsByLoopID
GetInfoFormFieldsByLoopID

Functions

DeleteFormField
ExistsFormField
ExistsFormFieldByFormID
GetAllInfoFormFields
GetAllPKeyFormFields
GetInfoFormField
GetInfoFormFieldByFormID
GetInfoFormFieldsByFormID
GetInfoFormFieldsByLoopID
GetPKeyFormFieldByFormID
GetPKeyFormFieldsByFormID
GetPKeyFormFieldsByLoopID
InsertFormField
UpdateFormField

DeleteFormField

Deletes a(n) FormField.

Syntax
DeleteFormField($FieldID);
DeleteFormField($hFormField); # if $hFormField includes FieldID
Input
$FieldID (int)
form field id (primary key)

ExistsFormField

Returns true if the FormField exists.

Syntax
$exists = ExistsFormField($FieldID);
Input
$FieldID (int)
form field id
Return
$exists (boolean)
1/0 the FormField exists (yes/no)

ExistsFormFieldByFormID

Returns true if a FormField by alternate keys FormID and Name exists.

Syntax
$FieldID = ExistsFormFieldByFormID($FormID, $Name);
Input
$FormID (int)
form id
$Name (varchar(255))
form input name
Return
$exists (boolean)
1/0 the u_form_field_form exists (yes/no)

GetAllInfoFormFields

Returns all objects of FormField.

Syntax
$ahFormFields = GetAllInfoFormFields();
Return
$ahFormFields (reference to array of hashes)
with following keys:
  • FieldID - form field id (primary key)- int
  • FormID - form id - int
  • LoopID - form loop identifier (optional)- int
  • Name - form input name - varchar(255)
  • Type - data type - varchar(30)
  • Mandatory - mandatory=1, optional=0 - tinyint
  • MinValue - minimum value (optional)- int
  • MaxValue - maximum value (optional)- int

GetAllPKeyFormFields

Returns all FormField identifiers.

Syntax
$aFormFieldIDs = GetAllPKeyFormFields();
Return
$aFormFieldIDs (reference to array of int)
form field id

GetInfoFormField

Returns the FormField by identifier.

Syntax
$hFormField = GetInfoFormField($FieldID);
Input
$FieldID (int)
form field id (primary key)
Return
$hFormField (reference to hash)
with following keys:
  • FieldID - form field id (primary key)- int
  • FormID - form id - int
  • LoopID - form loop identifier (optional)- int
  • Name - form input name - varchar(255)
  • Type - data type - varchar(30)
  • Mandatory - mandatory=1, optional=0 - tinyint
  • MinValue - minimum value (optional)- int
  • MaxValue - maximum value (optional)- int

GetInfoFormFieldByFormID

Returns the object of FormField by alternate keys FormID and Name.

Syntax
$hFormField = GetInfoFormFieldByFormID($FormID, $Name);
Input
$FormID (int)
form id
$Name (varchar(255))
form input name
Return
$hFormField (reference to hash)
with following keys:
  • FieldID - form field id (primary key)- int
  • FormID - form id - int
  • LoopID - form loop identifier (optional)- int
  • Name - form input name - varchar(255)
  • Type - data type - varchar(30)
  • Mandatory - mandatory=1, optional=0 - tinyint
  • MinValue - minimum value (optional)- int
  • MaxValue - maximum value (optional)- int

GetInfoFormFieldsByFormID

Returns objects of FormField by alternate keys FormID and Name.

Syntax
$ahFormFields = GetInfoFormFieldsByFormID($FormID, $Name);
Input
$FormID (int)
form id
$Name (varchar(255))
form input name (optional)
Return
$ahFormFields (reference to array of hashes)
with following keys:
  • FieldID - form field id (primary key)- int
  • FormID - form id - int
  • LoopID - form loop identifier (optional)- int
  • Name - form input name - varchar(255)
  • Type - data type - varchar(30)
  • Mandatory - mandatory=1, optional=0 - tinyint
  • MinValue - minimum value (optional)- int
  • MaxValue - maximum value (optional)- int

GetInfoFormFieldsByLoopID

Returns objects of FormField by alternate key LoopID.

Syntax
$ahFormFields = GetInfoFormFieldsByLoopID($LoopID);
Input
$LoopID (int)
form loop identifier
Return
$ahFormFields (reference to array of hashes)
with following keys:
  • FieldID - form field id (primary key)- int
  • FormID - form id - int
  • LoopID - form loop identifier (optional)- int
  • Name - form input name - varchar(255)
  • Type - data type - varchar(30)
  • Mandatory - mandatory=1, optional=0 - tinyint
  • MinValue - minimum value (optional)- int
  • MaxValue - maximum value (optional)- int

GetPKeyFormFieldByFormID

Returns primary key of FormField by alternate keys FormID and Name.

Syntax
$FieldID = GetPKeyFormFieldByFormID($FormID, $Name);
Input
$FormID (int)
form id
$Name (varchar(255))
form input name
Return
$FieldID (int)
form field id (primary key)

GetPKeyFormFieldsByFormID

Returns primary keys of FormField by alternate keys FormID and Name.

Syntax
$aKeys = GetPKeyFormFieldsByFormID($FormID, $Name);
Input
$FormID (int)
form id
$Name (varchar(255))
form input name (optional)
Return
$aKeys (reference to array of int)
form field id (primary key)

GetPKeyFormFieldsByLoopID

Returns primary keys of FormField by alternate key LoopID.

Syntax
$aKeys = GetPKeyFormFieldsByLoopID($LoopID);
Input
$LoopID (int)
form loop identifier
Return
$aKeys (reference to array of int)
form field id (primary key)

InsertFormField

Creates an entry of FormField.

Syntax
$FieldID = InsertFormField($hFormField);
Input
$hFormField (reference to hash)
with following keys:
  • FieldID - form field id (primary key)(optional)- int
  • FormID - form id - int
  • LoopID - form loop identifier (optional)- int
  • Name - form input name - varchar(255)
  • Type - data type - varchar(30)
  • Mandatory - mandatory=1, optional=0 - tinyint
  • MinValue - minimum value (optional)- int
  • MaxValue - maximum value (optional)- int
Return
$FieldID (int)
form field id (primary key)

UpdateFormField

Updates a(n) FormField if any element was changed.

Syntax
UpdateFormField($FieldID, $hFormField);
UpdateFormField($hFormField); # if $hFormField includes FieldID
Input
$FieldID (int)
form field id (primary key)
$hFormField (reference to hash)
with following keys:
  • FormID - form id - int
  • LoopID - form loop identifier (optional)- int
  • Name - form input name - varchar(255)
  • Type - data type - varchar(30)
  • Mandatory - mandatory=1, optional=0 - tinyint
  • MinValue - minimum value (optional)- int
  • MaxValue - maximum value (optional)- int
Return
1 (integer)
1