Field settings.php

From ARK
Revision as of 14:52, 13 November 2008 by Andydufton (talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

This is the documentation for the field settings file. It contains a technical description of the elements that must be and may optionally be present in fields.

Common/Obligatory Attributes


The two top settings are essential for the good working of the field:

  • dataclass = This tells the system what Data Class the field is.
  • classtype = This tells the system what Classtype the field is.

Alias Settings

The alias for the field requires 3 attributes:

  • alias_tbl = the table for the getAlias call
  • alias_col = the col for the getAlias call
  • alias_src_key = the alias_src_key for the getAlias call
  • alias_type = the alias_type for the getAlias call

Other Obligatory Settings

  • editable = set TRUE to process this field in forms set FALSE for display only
  • hidden = set true to make the field <input type="hidden" />
  • add_validation = validation rules for this field when on an add routine
  • edt_validation = validation rules for this field when on an edt routine

Class specific settings

Each class has some specific settings some of which may be optional or required.

Class: action

An example of an action class field.

$conf_field_issuedto = 
        'dataclass' => 'action',
        'classtype' => 'issuedto',
        'alias_tbl' => 'cor_lut_actiontype',
        'alias_col' => 'actiontype',
        'alias_src_key' => 'issuedto',
        'actors_mod' => 'abk',
        'actors_type' => 'people',
        'actors_element' => 'name',
        'actors_style' => 'single',
        'actors_elementclass' => 'txt',
        'actors_grp' => FALSE,
        'alias_type' => '1',
        'editable' => TRUE,
        'hidden' => FALSE,
        'add_validation' => $action_add_validation,
        'edt_validation' => $action_edt_validation
  • actors_mod = The module holding the actors (normally abk)
  • actors_type = The mod type as listed in mod_lut_modtype
  • actors_element = The text type to display within the dropdown
  • actors_style = whether actor information is displayed in a list style ('list') or as a single actor/date pairing ('single')
  • actors_elementclass = Class of data to be displayed for a given actor (ie. txt, number, etc)
  • actors_grp = Group functionality will allow the selection of a group of actors (in development)

Event Fields

Event fields are effectively wrappers for action/date fields. All fields must be set up above. One can also use actions and dates without having the event wrapper, but this allows one to group multiple events into a single subform.

See below for an example of a configured event field:

$conf_event_compiled = 
        'type' => 'compiled',
        'date' => $conf_field_compiledon,
        'action' => $conf_field_compiledby