Difference between revisions of "Sf attr boolean"

From ARK
Jump to: navigation, search
(Other Notes)
 
Line 6: Line 6:
  
 
===Other Notes===
 
===Other Notes===
This form will only work with ONE attribute per attribute type. Should you wish to use a series of these forms with attributes in the same attribute type, you should use sf_frame as a container.
+
This form will only work with ONE attribute per attribute type.
 +
 
 +
Should you wish to use a series of attributes of the same type int he same subform, you should set each on up in a subform and then wrap them all into sf_frame as a container.
 +
 
 +
Note that in order to handle the validation properly, you will need a valid vd setup for the boolean for example:
 +
 
 +
<pre>
 +
// bv - request and chkSet
 +
$attr_vd_bv =
 +
    array(
 +
        'rq_func' => 'reqMulti',
 +
        'vd_func' => 'chkSet',
 +
        'var_name' => 'bv',
 +
        'lv_name' => 'dyn_field_suffix',
 +
        'var_locn' => 'request'
 +
);
 +
</pre>
  
 
===Field Options===
 
===Field Options===

Latest revision as of 16:39, 16 October 2009

Description

The sf_attr_boolean is used for assigning a boolean (yes/no) attribute to an item.

Additional Fields

This subform does not require any additional fields.

Other Notes

This form will only work with ONE attribute per attribute type.

Should you wish to use a series of attributes of the same type int he same subform, you should set each on up in a subform and then wrap them all into sf_frame as a container.

Note that in order to handle the validation properly, you will need a valid vd setup for the boolean for example:

// bv - request and chkSet
$attr_vd_bv =
    array(
        'rq_func' => 'reqMulti',
        'vd_func' => 'chkSet',
        'var_name' => 'bv',
        'lv_name' => 'dyn_field_suffix',
        'var_locn' => 'request'
);

Field Options

Fields may use the following options

  • op_show_bv_aliases - shows a word in the selector as well as just an on/off image (set up for/against aliases)

Example Configuration

$conf_mcd_closed =
   array(
       'view_state' => 'max',
       'edit_state' => 'view',
       'sf_title' => 'recflags', //appears in the titlebar of the subform (mk nname)
       'sf_html_id' => 'recordmeta', //the form id tag (must be unique)
       'sf_nav_type' => 'full',
       'script' => 'php/subforms/sf_attr_boolean.php',
       'op_label' => 'space',
       'op_input' => 'save',
       'op_moddif' => 'no',
       'fields' => array(
           $conf_field_closed,
       ),
);