Loading...
 

Tracker Field Rules

New in Tiki 21.0 - this provides an easy way to make fields in a tracker form show or hide (or be required or not) depending on the settings of other fields in the form.

Some brief instructions:

  • Go to the Features Control Panel and enable "Enable Vue.js" and "Tracker Field Rules" in the Interface tab
  • Go to the field admin page for a tracker
    Screenshot 2020 03 07 At 11.20.16
  • Click on a field (try a checkbox for instance)
  • Go to the "Rules" accordion section
  • Pick true or false for the "is checked" condition
  • Choose a field from the actions menu, and then an action (e.g. show)
  • Choose a field from the else menu, and then an action (e.g. hide)
    Screenshot 2020 03 07 At 11.20.57
    Screenshot 2020 03 07 At 11.21.11
  • Save the field
  • Then go to edit an item in that tracker and check and uncheck the checkbox
    create a new item to try this out

Notes on Field Types

  • Category Fields
    • These have the options is empty, contains and doesn't contain like other "collection" fields, but for categories you need to enter the category Id's, not the names.
  • ShowTikiOrg and Ratings Fields
    • Currently (v 21.1) not working as they aren't really normal input fields - possibly will be fixed in future versions.


Note, this is an extremely new feature and should be considered rather fragile as of 21.0 (early 2020). Future changes in the code may mean you need to remake your rules after an upgrade.

Using Field Rules in a Wiki Page (with Plugin Tracker)

In PluginTracker there are two new parameters, rules and rulesparent, rules is a y/n switch so set that to y, but rulesparent is a little trickier on a customised tracker plugin form (leave it empty if you are not using a Pretty Tracker form in your page.

Assuming you are, you need to tell the rules which element is the parent container element for the field you are acting on (say, to show or hide it).

  • First do "inspect element" (this is in Firefox but more browsers do this)
    Parent Selector 1
  • Move the rightmost panels out of the way so you can see the document structure
    Parent Selector 2
  • Hover over the element you've just inspected and it will light up in the page (here in purple and blue)
    Parent Selector 3
  • Then move up the document structure until you find the whole row you would want to show or hide
    Parent Selector 4


This form is a simple wiki table, so the container element is the tr (table row) which contains the input and the label, so your selector will be simply tr, but to make sure it doesn't get confused if the table's inside another one use tr:first, so your markup should be:

Copy to clipboard
{tracker trackerId="42" wiki="tracker test tpl" rules="y" rulesparent="tr:first"}




Related:



Alias names for this page:
Tracker Rules | TrackerRules | TrackerFieldRules | Tracker Rule | TrackerRule | TrackerFieldRule | Rule | Rules

doc.tiki.org

Get Started

Admin Guide User Guide

Keywords

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

Accessibility (WAI and 508)
Accounting
Articles and Submissions
Backlinks
Banners
Batch
BigBlueButton audio/video/chat/screensharing
Blog
Bookmark
Browser Compatibility
Link Cache
Calendar
Category
Chat
Clean URLs
Comments
Communication Center
Compression (gzip)
Contacts (Address Book)
Contact us
Content Templates
Contribution
Cookie
Copyright
Credit
Custom Home and Group Home Page
Date and Time
Debugger Console
Directory of hyperlinks
Documentation link from Tiki to doc.tiki.org (Help System)
Docs
Draw
Dynamic Content
Dynamic Variable
External Authentication
FAQ
Featured links
File Gallery
Forum
Friendship Network (Community)
Gmap Google maps
Groups
Hotword
HTML Page
i18n (Multilingual, l10n)
Image Gallery
Import-Export
Install
Integrator
Interoperability
Inter-User Messages
InterTiki
Kaltura video management
Karma
Live Support
Login
Logs (system & action)
Look and Feel
Mail-in
Map with Mapserver
Menu
Meta Elements
Mobile Tiki and Voice Tiki
Module
MultiTiki
MyTiki
Newsletter
Notepad
Payment
Performance Speed / Load
Permissions
Platform independence (Linux-Apache, Windows/IIS, Mac, BSD)
Polls
Profiles
Profile Manager
Report
Toolbar
Quiz
Rating
Feeds
Score
Search engine optimization
Search
Search and Replace
Security
Semantic links
Shadowbox
Shadow Layers
Share
Shopping cart
Shoutbox
Slideshow
Smiley
Social Networks
Spam protection (Anti-bot CATPCHA)
Spellcheck
Spreadsheet
Stats
Surveys
Tags
Task
Tell a Friend, alert + Social Bookmarking
TikiTests
Theme CSS & Smarty
Tiki Manager
Trackers
Transitions
User Administration including registration and banning
User Files
User Menu
Watch
WebDAV
Webmail
Web Services
Wiki History, page rename, etc
Wiki Syntax
Wiki structure (book and table of content)
Workspace
WSOD
WYSIWYCA
WYSIWYG
XMLRPC

Tiki Newsletter

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