See also: Tracker Field Rules
Introduced in Tiki7
This wiki plugin utilizes jQuery to toggle the visibility of an HTML element (like a div) depending on the value of a field. This plugin can be used in Pretty trackers (but it is not meant to be used with pluginLIST ). This plugin permits Display logic.
bold
.Parameters | Accepted Values | Description | Default | Since |
---|---|---|---|---|
id |
text | HTML id of the element that is toggled | 7.0 | |
value |
text | Value to compare against. | 7.0 | |
fieldId |
digits | Numeric value representing the field ID tested. | 7.0 | |
visible |
(blank) y n |
Set whether visible when the field has the value. | n | 7.0 |
itemId |
digits | Use the field of specific item. The URL param itemId is used if this parameter is not set. | 0 | 7.0 |
{$f_180}
) only the first one on the page will be functional
This code will show the div success only if the field 206 has the value "Show". When the field is not set yet, the div is not displayed.
{DIV(id="success")}Congratulations! The "success" div now shows.{DIV} {trackertoggle fieldId="206" value="Show" visible="y" id="success"} {$f_206}
Result:
You do not have permission to insert an item
This code will show the div 'checkbox' only if the checkbox is checked. When the box is not checked, the div is not shown
{DIV(id="checkbox")}The checkbox div{DIV} {trackertoggle fieldId="180" value="y" visible="y" id="checkbox"} Checkbox: {$f_180}
Will show the div until the checkbox is checked.
{DIV(id="checkbox")}The checkbox div{DIV} {trackertoggle fieldId="180" value="y" visible="n" id="checkbox"} Checkbox: {$f_180}