Changes between Version 10 and Version 11 of TracFormsPlugin/Syntax
- Timestamp:
- Jun 26, 2008, 12:59:52 PM (16 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
TracFormsPlugin/Syntax
v10 v11 48 48 == !TracForm Operations == 49 49 50 Within the TracForm, you can use the following commands with [tf.OP:arg...] blocks :50 Within the TracForm, you can use the following commands with [tf.OP:arg...] blocks. 51 51 52 === Form Field Operations === 52 53 || '''Operation''' || '''Version''' || '''Argument(s)''' || '''Meaning''' || 53 54 || '''tf.checkbox''' || 0.1 || name [value] || Put an HTML checkbox here. Use value only if specified (simply "on" is default). || … … 56 57 || '''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) || 57 58 || '''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 60 Starting 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''' || 58 64 || '''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. || 59 65 || '''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. || … … 61 67 || '''tf.form_updated_on''' || 0.1 || [strftime format string] || Show when the form was most recently updated. || 62 68 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 81 critiera 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 || 64 86 65 87 == !TracForm Arguments == … … 79 101 || '''%NOW%''' || 0.1 || The current date and time. || 80 102 81 All substitutions may be applied to any argument within #! command or [tf:] operation sections. 103 All 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. 82 104 105 All 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 107 Environment lookups (via %...%, value, quote, etc) can have wildcards in the UNIX manner. Currently regular expressions are not supported for environment lookups.