Fullscreen
[Show/Hide Right Column]

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.

Contributors to this page: lindon137 points  , xavi67984 points  , mlpvolt4388 points  , Marc Laporte9146 points  and sylvie7387 points  .
Page last modified on Saturday 21 January, 2012 17:40:26 UTC by lindon137 points .
The content on this page is licensed under the terms of the Creative Commons Attribution-ShareAlike License.

Site Language

Reference Guide

Keywords

These keywords serve as "hubs" for navigation within the Tiki documentation. They correspond to development keywords (bug reports and feature requests):



Tiki Newsletter

Delivered fresh to your email inbox!
Newsletter subscribe icon
Don't miss major announcements and other news!
Contribute to Tiki