This function handles checkbox selection
mixed
checkbox_selection
(mixed $title, [array $name_options = array()], [string $value = array()], [string $full = ''])
-
mixed
$title: title of the form field
-
array
$name_options: array containing checkbox values and titles
-
string
$value: intial checked values
-
string
$full: fill with * to make it a requrired form field
function adds a deleting form field
mixed
deleteform
([string $name = 'delete'])
-
string
$name: name of the form field
handles editing file upload, paritcularly attachments
mixed
edit_upload
( $input_name, $post_id, $location, [ $replace = 'replace[]'], [ $delete = 'delete[]'], [ $new = 'attachment[]'], string $field_name, string $attachment_name)
-
string
$field_name: name of the input
-
string
$attachment_name: name of attachment to be edited
-
$input_name
-
$post_id
-
$location
-
$replace
-
$delete
-
$new
handles file upload field
string
files_upload
(string $title, string $name, [int $fields_no = 4], [int $size = '50'], [string $full = ''])
-
string
$title: title of the input
-
string
$name: name of the input
-
string
$full: fill with * to make it a required input
-
int
$size: size of the input box
-
int
$fields_no: no of maximum fields to display
Display the form table with all the form elements
string
form_table
([array $form = array()])
-
array
$form: accepts an array containg action, method, name, submit button and title
This function handles group permissions field in the form (used for moderators when adding a category)
mixed
group_permission
(string $msg, [array $name = array()], [string $value = ''])
-
string
$msg: title of the form field
-
array
$name: name of the form field
-
string
$value: intial value of the form field
adds a hidden form
string
hiddenform
(string $name, [string $value = ''])
-
string
$name: name of the input
-
string
$value: value of the input
This function displays html editor when selected in the textarea
string
html_area
()
handles input form and dispalys it
string
inputform
([string $title = ''], string $type, string $name, [string $full = ''], [mixed $value = ''], [int $size = '35'])
-
string
$title: title of the input
-
string
$type: type of the input (file or text)
-
string
$name: name of the input
-
string
$full: fill with * to make it a required input
-
mixed
$value: intial value of the input
-
int
$size: size of the input box
This function handles multiple radio selection. The defualt value is yes and no.
This function accepts arrays only as options. If $options is left empty a simple Yes and No values will be loaded
mixed
radio_selection
(mixed $title, mixed $name, [array $options = array()], [string $value = '0'], [string $full = ''])
-
mixed
$title: title of the form field
-
mixed
$name: name of the form field
-
array
$options: array of options to be poulated
-
string
$value: value of the form field
-
string
$full: fill with * to make it a requrired field
This function handles multiple selection (accept arrays only)
mixed
selectform
(string $title, string $name, [array $options = array()], [string $value = ''], [string $full = ''])
-
string
$title: title of the select form field
-
string
$name: name of the select form field
-
array
$options: array of options to populate in the selection form field
-
string
$value: intial selected value
-
string
$full: fill with * to make it a required input
This function displays smiles next the box of posting a message
mixed
smiles
()
This function handles textarea field
mixed
textarea
([string $title = 'Text'], [string $name = 'post'], [string $value = ''], [array $info = array()])
-
string
$title: textarea title
-
string
$name: textarea name
-
string
$value: textarea intial value
-
array
$info: textarea info array containg cols, row, count, editor type, smiles status (on or off) and required,