This subform is used to attach actions to items. Although actions look a bit like XMIs in that they link actors to items, they have a key difference which is that the relationship is qualified by an actiontype. The field will need to be setup in field_settings.php and acctiontypes need to be entered in cor_lut_actiontype. An alias will also need to be entered in cor_tbl_alias that corresponds to the cor_lut_actiontype entry.
sf_event.php still exists as a parallel subform for handling events. The code from both could potentially be merged, but at this stage, they two can be used independently to do slightly different things with actions/events.
The new form makes use of some new styles and modifications to the main stylesheet. These changes also affect sf_xmi.php which shares some code with this form.
The form can be used to always act on a specified actiontype named in the field eg 'checkedby'. In this mode, only that action will be displayed in the actors list and that action will always be added by the add form.
The form can also be used in a dynamic mode by specifying 'dyn' as the actiontype for the field. In this mode, all actions associated with the item will display and a drop down menu will be offered to the user when selecting which action to associate with the actor and item.
In dynamic mode, an optional list of actiontypes to exclude may also be used. This 'op_exclude_actions' takes a comma separated (no spaces) list of action type numbers (may work with nicknames - not tested). This list of actions is then excluded from the form.
'displaytxt' - There is a new obligatory settings var for all event fields passed to this form 'displaytxt' which sets the nickname of the txt element of the actor to display eg. 'name' or 'initials' or indeed any other txttype attached to your abk entries.
'op_displaytxt2' - Used to set an optional second part of the name which appears after the name separated by a hyphen: "name - option".
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 ) );