Difference between revisions of "Sf txt"

From ARK
Jump to: navigation, search
 
(3 intermediate revisions by 2 users not shown)
Line 3: Line 3:
  
 
===Additional Fields===
 
===Additional Fields===
The sf_txt does not require any 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_emptyfielddisp' => FALSE - Does not display the field (as the Default).
 +
 
 +
'op_emptyfielddisp' => TRUE - Displays the heading, but leaves the field blank.
 +
 
 +
'op_emptyfielddisp' => 'notxt' - nname in cor_tbl_markup which is displays message in the case that the record is unpopulated.
  
 
===Example Configuration===
 
===Example Configuration===
Line 92: Line 98:
 
);
 
);
 
</pre>
 
</pre>
 +
 +
[[category:Administrator]]

Latest revision as of 11:11, 17 January 2012

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_emptyfielddisp' => FALSE - Does not display the field (as the Default).

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

'op_emptyfielddisp' => '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
	     )
	);