Loading...
 
Create a form in a wiki page to populate a tracker (Cached)

Plugin Tracker

Use this wiki plugin to create a form for inputting an item into a tracker. You can specify what fields will be included in the form. In Tiki6, this plugin can also be used as a simple way to create custom forms which output the result as preformatted wiki pages instead of tracker items.

Parameters

Introduced in Tiki1. Required parameters are in bold.
Preferences required: feature_trackers, wikiplugin_tracker
Parameters Accepted Values Description Default Since
(body of plugin) Confirmation message after posting form
trackerId digits Numeric value representing the tracker ID 1
email To send an email once the tracker item has been created. Format: from|to|template For from and to, use an email address (separate multiple addresses with a comma) or a fieldId of a field containing an email address. When sending to several emails using different template, provide the template name for the message body for each email; I.e., the first template will be used for the first to, the second template if exists will be used for the second from (otherwise the last given template will be used). Each template needs two files, one for the subject one for the body. The subject will be named template_subject.tpl. All the templates must be in the templates/mail directory. Example: webmaster@my.com|a@my.com,b@my.com|templatea.tpl,templateb.tpl (templates/mail/tracker_changed_notification.tpl is the default from which you can get inspiration). Please note that you need to have an email address in the normal "Copy activity to email" property in the Tracker notifications panel as well 2.0
emailformat Choose between values text or html, depending on the syntax in the template file that will be used text 6.1
fieldsfilldefaults Colon-separated list of default values for Multiple Fill Fields. 9.0
fieldsfillseparator Choose separator between fields in each line of the Multiple Fill text area. Default is pipe (|). | 9.0
preview To add a preview button with the label set by this parameter. Default: Preview. Useful to preview the computed fields of an item. Preview 2.0
reset Label for the reset button, to return all fields to their default values. reset 4.2
status Status of the item used in combination with: view="user" 6.0
tpl Name of the template used to display the tracker items. In the template, the smarty variable {$f_id} will be replaced with the appropriate input tag, with id representing the field ID. The form tag and the submit button are generated by Tiki outside the template 2.0
values Colon-separated list of default values corresponding to the fields parameter. First value corresponds to first field, second value to second field, etc. Default values can be set by using autosavefields and autosavevalues as URL parameters. 2.0
action
separator: :
Colon-separated labels for form submit buttons. Default is Save. When set to NONE, the save button will not appear and values will be saved dynamically. Save 1
action_style
separator: :
Sets button style classes for action buttons. If multiple buttons have been set in the action parameter, the same number of colon-separated styles must be set here. Example:btn btn-primary:btn btn-success:btn btn-default pull-right btn btn-primary 14.1
outputwikinamespace pagename Name of namespace that is used for the wiki page that is created when outputting to a wiki page. 13.0
chosenGroup text The user enters this group via the registration (only a single group name is supported) Registered 15.0
transactionStep digits Transaction step number specifying the order of the transaction steps. The first step must be 0. 0 15.0
transactionName alpha The transaction identifier. This identifier connects the various trackers into a single transaction. Must be unique per transaction. The multiple steps in a single transaction must share the same transaction name. 15.0
target (blank)
_blank
_parent
_self
_top
Set the target parameter for the url (determines whether target will open in a new page, etc.) 4.0
colwidth ## or ##% Specify the width in pixels or percentage of the first column (the labels) in the tracker form. 3.0
autosavevalues text
separator: :
Colon-separated values corresponding to autosavefields. Special syntax cases:
categories(x) - selects the first child category under a category with ID x for use in a category field
preference(x) - inserts the value of the preference with x being the preference name.
5.0
discarditem (blank)
y
n
Used with outputtowiki - whether to discard the tracker item itself once the wiki page is created, so that, in effect, the tracker is just a vehicle to create form fields to facilitate creating wiki pages. 6.0
formtag (blank)
y
n
If set to Yes (y), the tracker is contained in a
tag and has action buttons
y 6.4
embedded (blank)
y
n
Embedded n 1
fields
separator: :
Colon-separated list of field IDs to be displayed in the form as input fields. If empty, all fields will be shown. Example: 2:4:5 1
transactionFinalStep (blank)
y
n
Indicate whether this is the final transaction step y 15.0
ignoreRequestItemId (blank)
y
n
Do not filter on the parameter itemId if in the url (default is to filter) n 6.0
itemId digits ItemId identifying the item to be edited. 3.0
showmandatory (blank)
y
n
Indicate mandatory fields with an asterisk (shown by default). y 1
fieldsfill
separator: :
Colon-separated list of field IDs to be filled with multiple values, to create multiple items in one save. If empty, only one item will be created. Only for item creation. Example: 2:4:5 9.0
newstatus (blank)
o
p
c
Default status applied to newly created or saved items. 2.0
outputtowiki digits Output result to a new wiki page with the name taken from the input for the specified fieldId 6.0
overwrite (blank)
y
n
Overwrite current field values of the item with the input values. Does not overwrite wiki pages and does not work when the discarditem parameter is set to Yes (y). n 6.0
registration (blank)
y
n
Add registration fields such as Username and Password for use in registration trackers n 6.0
showdesc (blank)
y
n
Show the tracker's description (not shown by default) n 1
showfieldsdesc (blank)
y
n
Show the tracker's field descriptions (shown by default) y 12.1
showstatus (blank)
y
n
Show the status of the items (not shown by default) n 5.0
showtitle (blank)
y
n
Display the title of the tracker at the top of the form (not shown by default) n 1
sort (blank)
y
n
Display columns in the order listed in the fields parameter instead of by field ID (field ID order is used by default) n 2.0
outputwikirelation (blank)
y
n
Store tiki.wiki.linkeditem and tiki.wiki.linkedfield relation from the created wiki page when outputting to a wiki page. Optionally, (separate feature to be turned on in admin panel) these relations are used to sync page renames with the field specified in outputtowiki, and also optionally to redirect page viewing to the tracker item instead (where you can then include the page if needed). n 13.0
outputwiki pagename Name of the wiki page containing the template to format the output to wiki page. Must be set for outputtowiki to work. The template can contain variables to represent fields, for example {$f_6} would result in the value of fieldId 6. 6.0
url url
separator: :
URL the user is sent to after the form is submitted. The string itemId will be replaced with itemId=xx where xx is the new (or current) itemId 1
validateusers (blank)
y
n
Here one can overrule the default validate users by e-mail preference. 15.0
view (blank)
group
page
user
Determine which items will be affected byt the form. If set to user and trackerId is not set, then the user tracker associated with the default group will be affected. If trackerId is set, then the item associated with the user in that tracker will be affected. If set to page, the item associated with that page will be affected (trackerId must be set in this case). 1
wiki pagename Name of the wiki page containing the template to display the tracker items. This page must have the permission tiki_p_use_as_template assigned to the Anonymous group to be used as a template. 2.0
autosavefields digits
separator: :
Colon-separated list of field IDs to be automatically filled with values upon save. 5.0
levelupfields digits
separator: :
Used with the autosavefields and autosavevalues parameters. Colon-separated list of field IDs being auto-saved where the specified auto-save value will not take effect if it is less than or equal to the current value of the field 8.0


 Note

The overwrite parameter is only to overwrite tracker items (not wiki pages) - not useful when discarditem="y"

 Note 2

When using outputwiki as template you cannot use Smarty syntax programmatically because the resulting output is static wiki page (not computed against an existing Tracker Item like with Pretty Trackers and TrackerLists) - you can use only {$f_XX} to indicate the fields values or Argument variables.

Administration

  • You can limit the tracker fields that can be used in this plugin in the field admin panel of the tracker:
    "Field is public? for use with trackerlist plugin option
    For Tiki 9.x, the User Selector field (the "userId" field in your tracker, perhaps), edit the field, Permissions, Visibility, Visible by All (even though that's counter-intuitive (you want those items private to that use).
  • If you have a tracker that has only one item per user/IP or if you use the plugin with the param view=user, the plugin will automatically the item if already exists.

 Warning

This plugin can not be used on a cached wiki page.

Examples

{TRACKER(trackerId="1" fields="1:3:4" action="Send")} Thank for your contribution! {TRACKER}


How to prefill some fields

In some situation you want to go in a TRACKER page (for our example named SubmitOrder ) where fields are automatically prefills. In this case you can use an URL like this:
tiki-index.php?page=SubmitOrder&autosavefields=1&autosavevalues=tikiwiki

When in the page SubmitOrder, you click on save the field 1 will be filled with the value tikiwiki. If the field 1 is multivaluated field(ex: category), the value will be added to the potentially additional value the user has selected whatever the user do.
Tip:
The construction of such url can use the feature 'Wiki argument variables'
(see Advanced Wiki Syntax usage examples)
tiki-index.php?page=SubmitOrder&autosavefields=2:3&autosavevalues=:PluginTracker

See also PluginTrackerList to see how to use the parameter url to transfer an itemId to an URL or PluginJQ if you want to use jQuery.

How to fill an item in more than one step

If you want to fill some fields of an item in a page and to fill some other ones in another page, you need to use the param url with the itemId option.
Example (uses SEFUrl enabled links):
Page1
{tracker trackerId="1" fields="1:2:3" url="Page2?itemId"}

Page2
{tracker trackerId="1" fields="4:5:6" url="Page3?itemId"}

Page3 - the final one that will display the currently submitted itemId:
{trackerlist trackerId="1" fields="1:2:3:4:5:6"}


How to put multiple tracker plugins into a single transaction?

New in Tiki15
Plugin tracker's transaction feature enables a sequence of trackers to be chained into a single transaction, which is submitted only after the user submits the last tracker form. Otherwise the transaction is cancelled.
The easiest way to use the feature is to create a wiki page for each of the steps.
Here is an example.
  1. wiki page: Register+Step+1
    {tracker trackerId="1" fields="2" action="Next" ignoreRequestItemId="y" registration="y" chosenGroup="Registered" transactionName="RegistrationTransaction" transactionStep="0" transactionFinalStep="n" url="Register+Step+2"}
  2. wiki page: Register+Step+2
    {tracker trackerId="2" fields="4" action="Finish" ignoreRequestItemId="y" transactionName="RegistrationTransaction" transactionStep="1" transactionFinalStep="y"}
The registration and the tracker records of trackerId 1 and 2 will only get saved after the user presses Finish on Register+Step+2.


How to write a template

As mentioned, in a template, use the {$f_id} syntax to insert the value of fieldId=id.
It is also possible to insert the ItemId itself, which is useful to create new wiki pages with tracker plugins inside. To do this you'll have to add an Auto-Increment Field to your tracker, with the appropriate options to auto-fill it with the itemId. This new field content (itemId value) can then be inserted in the template with the syntax seen above.

Since Tiki 15.1, wiki page templates can be used for email notifications using the "wiki:page name tpl" format instead of template_name.tpl files in the templates/mail dir. Tiki will use a page "page name subject tpl" if found.

How to go from TRACKERLIST to TRACKER on this item

{trackerlist trackerId="1" fields="1:2:3:4:5:6" url="Page1?itemId"}


How send email to a recipient when new tracker item is created

You can use the parameter email to send an email once the tracker item has been created.
To do this it is now (Tiki15) required to have a template placed in your tiki files in the templates/mail directory, or specified as a wiki page as "wiki:page name tpl".

The format for the parameters is : from|to|template.
  • from is the sender email that will be used for the notification. Multiple address can be set (separate multiple addresses with a comma)
  • to is the recipient(s). Multiple address can be set (separate multiple addresses with a comma)
  • template is the template(s) to be used for email subject and body. (separate template can be used)
    Using several emails and several templates it is possible to send different email (different subject & body) to different people. (see exemple below)

Since Tiki 15 .1, tracker plugin allow Items List fields to be used as the to or from fields in the email parameter. They wil be shown in the form as read only labels. This might be useful in cases such as:
  • One tracker defines business shops, with it's members to be notified of changes related to that shop. And...
  • A second tracker handles data of products from shops, and they have:
    • one field as Item link to relate the product with their corresponding shop where they sell it.
    • another field from the second tracker is an items list, to indicate the person to be notified, as user defined in the first tracker for that shop.
  • You use the email parameter in a plugin tracker call to tracker 2, using the field corresponding to the person (as field id in tracker 2) as the recipient or sender of the email.


Basic plugin usage (single recipient, single template)

{TRACKER(trackerId="1" fields="1:2:3" action="Send" email="sender@domain.com|recipient@domain.com|templatename.tpl")}{TRACKER}


Advanced plugin usage 1 (multiple recipients, single template)

{TRACKER(trackerId="1" fields="1:2:3" action="Send" email="sender@domain.com|recipient_1@domain.com,recipient_2@domain.com,recipient_3@domain.com|templatename.tpl")}{TRACKER}


In this case it will be sent the same notification to recipient_1, recipient_2 and recipient_3.

Advanced plugin usage 2 (multiple recipients, multiple templates)

{TRACKER(trackerId="1" fields="1:2:3" action="Send" email="sender@domain.com|recipient_1@domain.com,recipient_2@domain.com,recipient_3@domain.com|templatename_a.tpl,templatename_b.tpl,templatename_c.tpl")}{TRACKER}


In this case each recipient will receive a different notification. recipient_1 will receive email using template_a, recipient_2 will receive email using template_b and recipient_3 will receive email using template_3.

Templates

Each template needs two files, one for the subject one for the body. The subject will be named template_subject.tpl. All the templates must be in the templates/mail directory, or (since Tiki15.1) in wiki pages and specified as "wiki:page name tpl".

Subject template (template_subject.tpl)

Hello, the {tr}item{/tr} "{$f_name}" {tr}was modified at{/tr} {$server_name} in {$mail_trackerName}


Where {$f_name} will the content of the field name, {$server_name} is the domain name and {$mail_trackerName} is the tracker name.

Body template (template.tpl)

{tr}Hello,{/tr}

{tr}Title:{/tr} {$f_name}
{tr}Description:{/tr} {$f_description}

{tr}View the tracker item at:{/tr}
	{$mail_machine_raw}/tiki-view_tracker_item.php?itemId={$mail_itemId}


Template - variable list

Not all wiki variables works (pretty tracker syntax won’t work).
$mail_date
The current timestamp

$mail_user
User login

$mail_itemId
The tracker itemId

$mail_item_desc
The item "title"

$mail_trackerId
Tracker id

$mail_trackerName
Tracker name

$mail_machine
URL of the request

$mail_machine_raw
URL of the site root (??)

$status
The item's new status (e.g. Open, Pending or Closed, translated)

$f_123 or $f_permanentName
Values of the fields



doc.tiki.org


Bootstrap

AdminGuide

UserGuide

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 (7.x)
Articles and Submissions
Backlinks
Banners
Batch (6.x)
BigBlueButton audio/video/chat/screensharing (5.x)
Blog
Bookmark
Browser Compatibility
Link Cache
Calendar
Category
Chat
Clean URLs
Comments
Communication Center
Compression (gzip)
Contacts (Address Book)
Contact us
Content Templates
Contribution (2.x)
Cookie
Copyright
Credit (6.x)
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 8.x
Draw 7.x
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, Babelfish)
Image Gallery
Import-Export
Install
Integrator
Interoperability
Inter-User Messages
InterTiki
Kaltura video management (4.x)
Karma
Live Support
Login
Logs (system & action)
Look and Feel
Lost edit protection
Mail-in
Map with Mapserver
Menu
Meta Tags
Mobile Tiki and Voice Tiki
Mods
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 (3.x)
Shadowbox
Shadow Layers
Share
Shopping cart
Shoutbox
Slideshow
Smiley
Social Networks
Spam protection (Anti-bot CATPCHA)
Spellcheck
Spreadsheet
Stats
Surveys
Tags (2.x)
Task
Tell a Friend, alert + Social Bookmarking
TikiTests (2.x)
Theme CSS & Smarty
Trackers
Transitions (5.x)
TRIM
User Administration including registration and banning
User Files
User Menu
Watch
WebHelp
WebDAV (5.x)
Webmail
Web Services
Wiki 3D
Wiki History, page rename, etc
Wiki Page Staging and Approval (2.x)
Wiki Plugin extends basic syntax
Wiki Syntax
Wiki structure (book and table of content)
Workspace
WSOD
WYSIWYCA
WYSIWYG (2.x)
XMLRPC


Tiki Newsletter

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