Difference between revisions of "Subforms Overview"

From ARK
Jump to: navigation, search
(Subform Reference)
Line 1: Line 1:
==Overview==
+
===Overview===
 
Subforms are a key building block of the ARK interface. Subforms are short php scripts that may have been written by either the core ARK team or as plugins. Please take care to read the inline documentation for each form.
 
Subforms are a key building block of the ARK interface. Subforms are short php scripts that may have been written by either the core ARK team or as plugins. Please take care to read the inline documentation for each form.
  
Line 6: Line 6:
 
Subforms may contain one or many fields and may contain mixed field types. Some subforms are more generic than others. sf_txt for instance is a very generic and multiuse subform whilst other subforms have a single very specific purpose and may require their own configuration options.
 
Subforms may contain one or many fields and may contain mixed field types. Some subforms are more generic than others. sf_txt for instance is a very generic and multiuse subform whilst other subforms have a single very specific purpose and may require their own configuration options.
  
==Required Settings==
 
 
*'''view_state'''
 
This controls the initial view state of the subform
 
'''Options:''' max, min
 
 
*'''edit_state'''
 
This controls the initial edit state of the subform
 
'''Options:''' view, edit
 
 
*'''sf_nav_type'''
 
This sets the type of navigation bar to put in at the top of the subform. 'full' gives you the full bar with navigational tools. 'name' give just the name and 'none' gives none at all.
 
'''Options:''' full, name, none
 
 
*'''sf_title'''
 
This sets the title of the form. This value should be the nickname of a piece of [[markup]].
 
'''Options:''' markup nickname
 
 
*'''sf_html_id'''
 
This sets the id attribute of the form tag and must be unique.
 
'''Options:''' string all lowercase
 
 
*'''script'''
 
This defines the script to be used.
 
'''Options:''' path/to/file.php
 
 
*'''Example
 
<pre>
 
'view_state' => 'max',
 
'edit_state' => 'edit',
 
'sf_nav_type' => 'none',
 
'sf_title' => 'projection', //appears in the titlebar of the subform (mk nname)
 
'sf_html_id' => 'fst_cd_projection', //the form id tag (must be unique)
 
'script' => 'php/mod_fst/subforms/monument.php',
 
</pre>
 
  
 
==Optional Settings==
 
==Optional Settings==

Revision as of 12:50, 13 November 2008

Overview

Subforms are a key building block of the ARK interface. Subforms are short php scripts that may have been written by either the core ARK team or as plugins. Please take care to read the inline documentation for each form.

Subforms are configured on a 'use by use' basis by means of php arrays which are normally held in the mod_settings files. Each subform contains information about how it should display itself under default circumstances. It is highly likely that the same subform script may be used many times over within a given configuration but with different set up. Therefore each use of the subform requires a new config array.

Subforms may contain one or many fields and may contain mixed field types. Some subforms are more generic than others. sf_txt for instance is a very generic and multiuse subform whilst other subforms have a single very specific purpose and may require their own configuration options.


Optional Settings

optional settings should all be defined using the 'op_' prefix, however some are not. The optional settings described here are generic to all subforms. Other script specific settings should be documented IN THAT SCRIPT.

Subform Reference

sf_assemblage - a subform to display and edit bulk assemblages

sf_spat - a subform to display spatial data about an item

sf_finds - subform to attach attribs of a given type (findtypes) and to set a boolean for each one