Properties

$dependencies

$dependencies : 

Type

$shortcuts

$shortcuts : 

Type

$singleton

$singleton : 

Type

$class_hash

$class_hash : 

Type

$form_id

$form_id : 

the form_id is the identifier of the form, it should be unique and has otherwise no specific use

Type

$use_tabs

$use_tabs : 

Type

$use_fieldsets

$use_fieldsets : 

Type

$use_dependency

$use_dependency : 

Type

$validate

$validate : 

Type

$assign2tpl

$assign2tpl : 

Type

$ajax_url

$ajax_url : 

Type

$lang_prefix

$lang_prefix : 

the language variables are build as follows: - for tabs: $this->lang_prefix.'tab_'.$tabname - for fieldsets: - $lang = $this->lang_prefix.'fs_'.$fieldsetname; - $info = $this->lang_prefix.'fs_info_'.$fieldsetname; - for fields: - $lang = $this->lang_prefix.'f_'.$name; - $help = $this->lang_prefix.'f_help_'.$name;

Type

$_shorts

$_shorts : 

Type

$_shorts_loaded

$_shorts_loaded : 

Type

$_class_index

$_class_index : 

Type

$field_array

$field_array : 

structure: tab => array(fieldset => array(field => array(options)), field => array(options), field => array(options))

the options of each field is an array containing the following elements

  • type: the type of the field to use (e.g. 'dropdown')
    • any additional options for the chosen fieldtype
    • optionally the following entries can be included
  • 'text' => 'text to put in front of the field'
  • 'text2' => 'text to put behind the field'
  • 'encrypt' => whether to encrypt the data of the field (encrypt on read, decrypt on output)
  • 'lang' => if a custom language variable shall be used for the field
  • 'dir_lang' => if a custom (direct) string shall be used instead of a language variable
  • 'help' => if a custom help-language variable shall be used
  • 'dir_help' => if a custom (direct) string shall be used instead of a language variable

Type

$hidden

$hidden : 

Type

$jq_dropdown

$jq_dropdown : 

Type

$jq_checkbox

$jq_checkbox : 

Type

$jq_radio

$jq_radio : 

Type

$jq_equalto

$jq_equalto : 

Type

$error

$error : 

Type

Methods

__get()

__get(  $name) 

Parameters

$name

__isset()

__isset(  $name) 

Parameters

$name

__dependencies()

__dependencies() 

__shortcuts()

__shortcuts() 

__destruct()

__destruct() 

field()

field(  $name,   $options) : \object/string

shortcut to create a field

Parameters

$name
$options

Returns

\object/string —

returns the html-field as object, which can automatically transform into the appropriate html

value()

value(  $name,   $options,   $lang_prefix = false) : mixed

shortcut for the return value of a field

Parameters

$name
$options
$lang_prefix

Returns

mixed —

returns the input-value of the field

__construct()

__construct(  $form_id = 'myform') 

Parameters

$form_id

reset_fields()

reset_fields() 

add_tab()

add_tab(  $tab,   $fieldsets = array(),   $fields = array()) 

add a tab and put existing fieldsets and fields into it

Parameters

$tab
$fieldsets
$fields

add_tabs()

add_tabs(  $fieldarray) 

add multiple tabs at once

Parameters

$fieldarray

add_fieldset()

add_fieldset(  $fieldset,   $fields = array(),   $tab = '') 

group existing fields in a fieldset

Parameters

$fieldset
$fields
$tab

add_fieldsets()

add_fieldsets(  $fieldarray,   $tab = '') 

add one or more fieldsets including its fields in array format

Parameters

$fieldarray
$tab

add_field()

add_field(  $name,   $options,   $fieldset = '',   $tab = '') 

add a single field to the form

Parameters

$name
$options
$fieldset
$tab

add_fields()

add_fields(  $fieldarray,   $fieldset = '',   $tab = '') 

Parameters

$fieldarray
$fieldset
$tab

output()

output(  $values = array()) 

Parameters

$values

return_values()

return_values() 

tab2tpl()

tab2tpl(  $tabname,   $data) 

Parameters

$tabname
$data

fs2tpl()

fs2tpl(  $fieldsetname,   $data,   $key) 

Parameters

$fieldsetname
$data
$key

f2tpl()

f2tpl(  $name,   $options,   $key,   $value) 

Parameters

$name
$options
$key
$value

jq_dep_init()

jq_dep_init(  $type) 

Parameters

$type

lang()

lang(  $lang,   $no_empty = true) 

Parameters

$lang
$no_empty