Sf txt

From ARK
Revision as of 16:33, 21 September 2010 by Jessogden (talk | contribs) (Additional Fields)

Jump to: navigation, search

Description

The sf_txt is for handling basic text fields. All text fields will need to be setup in field_settings.php and will need to be entered in cor_lut_txttype. An alias will also need to be entered in cor_tbl_alias that corresponds to the cor_lut_txttype entry.

Additional Fields

The following is an optional display field to allow the administrator to control the way in which subform headings are displayed within the micro view for sf_txt. The default is to not display subform headings when the fields are not populated.

'op_emptyfielddisplay' => 'FALSE' - Does not display the field (as the Default).

'op_emptyfielddisplay' => 'TRUE' - Displays the heading, but leaves the field blank.

'op_emptyfielddisplay' => 'notxt' - nname in cor_tbl_markup which is displays message in the case that the record is unpopulated.

Example Configuration

An example of sf_txt configuration using multiple modtypes:

$conf_mcd_description =
    array(
        'view_state' => 'max',
        'edit_state' => 'view',
        'sf_nav_type' => 'full',
        'sf_title' => 'desc', 
        'sf_html_id' => 'cxt_su_description', // Must be unique
        'script' => 'php/subforms/sf_txt.php',
        'op_label' => 'space',
        'op_input' => 'save',
	'op_modtype' => TRUE, //for different fields for each modtype (see below)
        'type1_fields' => array(
             $conf_field_shape,
             $conf_field_corners,
             $conf_field_dims,
             $conf_field_bostop,
             $conf_field_sides,
             $conf_field_bosbase,
             $conf_field_base,
             $conf_field_orient,
             $conf_field_inclination,
             $conf_field_truncation,
             $conf_field_observ
        ),
        'type2_fields' => array(      
             $conf_field_compac,             
             $conf_field_colour, 
             $conf_field_compo, 
             $conf_field_inclusions,   
             $conf_field_dims,         
             $conf_field_observ,
             $conf_field_excavtech               
        ),
        'type3_fields' => array(
             $conf_field_material,             
             $conf_field_sizemat,              
             $conf_field_finish,             
             $conf_field_bond, 
             $conf_field_form,             
             $conf_field_dirface,              
             $conf_field_bondmat,             
             $conf_field_dims, 
             $conf_field_observ 
        ),
	    'type4_fields' => array(
		$conf_field_abody,
		$conf_field_ahead,
		$conf_field_ararm,
		$conf_field_alarm,
		$conf_field_arleg,
		$conf_field_alleg,
		$conf_field_afeet,
		$conf_field_degen,
		$conf_field_state,
		$conf_field_observ
	    ),
	    'type5_fields' => array(
		$conf_field_orient,
		$conf_field_dims,
		$conf_field_observ,
		$conf_field_excavtech
	    )
	);

An example of sf_txt using a single modtype

$conf_mcd_short_desc =
    array(
        'view_state' => 'max',
        'edit_state' => 'view',
        'sf_nav_type' => 'full',
        'sf_title' => 'shortdesc', 
        'sf_html_id' => 'cxt_short_description', // Must be unique
        'script' => 'php/subforms/sf_txt.php',
        'op_label' => 'space',
        'op_input' => 'save',
	'op_modtype' => FALSE, //if each modtype uses same fields (see below)
        'fields' => array(
             $conf_field_short_desc
	     )
	);