Changes between Version 10 and Version 11 of TracFormsPlugin/Syntax


Ignore:
Timestamp:
Jun 26, 2008, 2:59:52 PM (7 years ago)
Author:
rharkins
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • TracFormsPlugin/Syntax

    v10 v11  
    4848== !TracForm Operations ==
    4949
    50 Within the TracForm, you can use the following commands with [tf.OP:arg...] blocks:
     50Within the TracForm, you can use the following commands with [tf.OP:arg...] blocks.
    5151
     52=== Form Field Operations ===
    5253|| '''Operation''' || '''Version''' || '''Argument(s)''' || '''Meaning''' ||
    5354|| '''tf.checkbox''' || 0.1 || name [value] || Put an HTML checkbox here.  Use value only if specified (simply "on" is default). ||
     
    5657|| '''tf.select''' || 0.2 || name value[//label]... || Put a SELECT dropdown list here.  The values are by default used as labels but can be added if //label is used (the // is removed) ||
    5758|| '''tf.textarea''' || 0.2 || name [content] [cols] [rows] || Add a textarea of the specified label.  If content is provided, it is used as a default.  cols and rows if specified indicate the size the textarea should occupy. ||
     59
     60Starting in 0.2, the form field operations all accept -class= or -id= to set the CSS class or ID for the field.
     61
     62=== Form Query Operations ===
     63|| '''Operation''' || '''Version''' || '''Argument(s)''' || '''Meaning''' ||
    5864|| '''tf.who''' || 0.1 || name || Show which user most recently affected the specified field.  This requires track_fields to be set in the commands section. ||
    5965|| '''tf.when''' || 0.1 || name [strftime format string] || Show when the most change was made on the specified field.  This requires track_fields to be set in the commands section. ||
     
    6167|| '''tf.form_updated_on''' || 0.1 || [strftime format string] || Show when the form was most recently updated. ||
    6268
    63 Starting in 0.2, the tf.checkbox, tf.radio, tf.input, and tf.select all accept -class= or -id= to set the CSS class or ID for the field.
     69=== Calculation Operations ===
     70|| '''Operation''' || '''Version''' || '''Argument(s)''' || '''Meaning''' ||
     71|| '''filter''' || 0.2 || criteria value... [-quote] || Apply criteria to each value and only emit those values that match, quoting results if -quote is provided. ||
     72|| '''count''' || 0.2 || value... || Return a count of the values provided ||
     73|| '''countif''' || 0.2 || criteria value... || Count only those that match the criteria ||
     74|| '''sum''' || 0.2 || value... || Perform a floating-point sum on the arguments ||
     75|| '''sumif''' || 0.2 || criteria value... || Perform a floating-point sum of the arguments that match the criteria ||
     76|| '''sumprod''' || 0.2 || value... [-stride=n] || Using stride, add each group of n factors together.  Thus [tf.sumprod: a b c d e f] = (ab) + (cd) + (ef) ||
     77|| '''value''' || 0.2 || source... || Return each source from the environment in the same manner as %...% below ||
     78|| '''quote''' || 0.2 || source... || Quote each source from the environment in the same manner as %...% below ||
     79|| '''zip''' || 0.2 || source... || Intermingle results from the specified environment variable names in the same manner as %...% below ||
     80
     81critiera can be a normal string, a wildcard in the UNIX form, or a regular expression if wrapped in /.../.
     82
     83=== Debugging Operations ===
     84|| '''Operation''' || '''Version''' || '''Argument(s)''' || '''Meaning''' ||
     85|| '''env_debug''' || 0.2 || [criteria] || Display all keys and values from the environment.  If criteria is provided, it is used as a filter on the keys ||
    6486
    6587== !TracForm Arguments ==
     
    79101|| '''%NOW%''' || 0.1 || The current date and time. ||
    80102
    81 All substitutions may be applied to any argument within #! command or [tf:] operation sections.
     103All substitutions may be applied to any argument within #! command or [tf:] operation sections.  Use [tf.value] or [tf.quote] to extract environment variables within general text.
    82104
     105All form variables appear in the environment in three ways: prefixed with the whole context (page:subcontext:), prefixed with the page (page:), and prefixed with the subcontext if defined (subcontext:). 
     106
     107Environment lookups (via %...%, value, quote, etc) can have wildcards in the UNIX manner.  Currently regular expressions are not supported for environment lookups.