Plugin TrackerToggle
This plugin allows to toggle the visibility of an HTML element like a div depending on the value of a field. They can be used in Pretty trackers since Tiki7.
This plugin uses jQuery.
Limitations
- only one plugin TRACKER of the same trackerId may appear on the page
- only fields with a text value or checkbox (y/n) are functional now (no numbers)
{DIV(id=value)}The value div{DIV}
{TRACKERTOGGLE(fieldId=183, value='tiki', visible=y, id=value) /}
Value: {$f_183}This code will show the div 'value' only if the field 183 has the value tiki. When the field is not set yet, the div is not displayed
{DIV(id=checkbox)}The checkbox div{DIV}
{TRACKERTOGGLE(fieldId=180, value='y', visible=y, id=checkbox) /}
Checkbox: {$f_180}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=n, id=checkbox) /}
Checkbox: {$f_180}Will show the div until the checkbox is checked.
Parameters
| fieldId | ID | Field Id of the field the value is tested |
| value | value that switches the display of the HTML element | |
| visible | y or n | if y, the element is visible if the field has the value, if n the element is hidden is the field has the value |
| id | HTML id | HTML id of the element to be toggled |
This permits Display logic.
