[Show/Hide Right Column]

Create a form in a wiki page (to populate a tracker)
Print

Plugin Tracker

This is a Wiki Plugin for the tracker feature that allows you to display in a wiki page a tracker creation form. 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.

See also:

PluginTrackerlist - which displays a given tracker items.

Use

{TRACKER(trackerId, fields, action, showtitle, showdesc, showmandatory, embedded, email, view, url)}user-defined text{TRACKER}

Parameters

Parameters Accepted Values Effect Version
trackerId numeric is the numeric ID of the tracker to be used
fields numerics separated by : is the list of the numeric field IDs separated by :. The fields beginning by - are optional. If fields param is omitted, all the possible fields are added. The fields param can be empty to allow the plugin to work only on status for instance
sort y or n Displays the fields in the order of the fields param and not the order of tracker (default n) 2.0
action string is a user-defined name of the button to validate the form (default: Save)
showtitle y or n shows the tracker title at the top of the form
showdesc y or n shows the tracker description
showmandatory y or n shows the mandatory fields with a *
showstatus y or n show the input status select (default: n) 5.0
embedded y or n page?????
email from|to|template to send an email when the tracker item is created. The fields are separated with a bar. *from is an email or the fieldId containing the email, to is an email or a list of emails separated with comas or the fieldId containing the email, template is a list of comas separated templates. Each template will contain the message body. 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. The subject will be the template_subject.tpl. Both templates must be in the templates/mail directory. Example: "webmaster@my.com|a@my.com,b@my.com|ta.tpl,tb.tpl"
url url url the user will be sent after the item creation. Notice that if you have problem with the parse, you can put double quotes around the url (ex: url="http:/tikiwiki.org"). In tw>=4, if the url contains the string itemId, the string itemId will be replaced with itemId=xx where xx is the new (or current) itemId 1.9.8
If the url comtains itemId, the link will be completed with the value of the itemId(ex: url="mypage&itemId") 4.0
values value separated by : the list of default values for the fields. The first value corresponds to the first fielId, the second to the second fieldId. Default values can be set from the URL see below. 2.0
overwrite y or n values overwrite the current value of the item 6.0
Each value can be delimited with double quotes to allow them to contain : and the values is only assigned to new items, 3.0
preview text will add a button with the label = the value of preview (or Preview by default). This is useful to see the computed fields of an item 2.0
user-defined text text the user-defined text will be displayed when the tracker item will be recorded ( For example, it can be "Thank you")
view user(the string user) or page(the string page if =user: will modify the item associated to the user. If trackerId is specified it will be the item of this tracker associated to the current user (2.0). If no trackerId is specify, it will be the user tracker (the tracker associated with the default group)(tw>=1.9.7 1.9.7
if =page: will modify the item associated to the page, trackerId must be specify 3.0
tpl file.tpl the name of the templates to display the form with this template. In the template, the smarty variable {$f_id} will be replaced with the appropriate <input> tag. The <form> tag and the submit button are generated by tikiwiki outside the template 2.0
wiki pageName the name of a wiki page that will be the template (like .tpl). This page must have the permission tiki_p_use_as_template assigned to the Anonymous group to be used as a template 2.0
newstatus c or p or o will change the status of the item to this value (c for close, p for pending and o for open when the item is saved 2.0
colwidth numeric Specify the width (or percentage) of the first column, the label, in the form 3.x
target _blank_, _self_... targets the window for the resulting address 2.0
itemId ID to edit an item
ignoreRequestItemId y or n to ignore the itemId of the URL (default n) 6.0
autosavefields numerics separated by : fields that will be automatically filled with a value at save time 5.0
autosavevalues values separated with : values associated to autosavefields (note that categories(x) is a special syntax to select the first child category under category x for a category field, in the original use-case the admin would periodically create/move a new category as a subcategory of category x and while that was the case new items would be created with that category) 5.0
outputtowiki numerics Specifies a fieldId. If specified, result of the form will be posted to a new wiki page with the name of this new page taken from the input for this specified fieldId. 6.0
outputwiki valid pagename For outputtowiki to work, this must be set to the name of a wiki page that is the template for new pages being created. The template can contain {$f_6} for example as placeholders for the inputted value for field 6 6.0
discarditem y or n This is used in conjunction with outputtowiki. The default is n. If set to y, the tracker item that is created is discarded once the wiki page is created. In effect, the tracker is just a vehicle to create form fields to facilitate creating wiki pages. 6.0
registration y or n Registration tracker, special capabilities for use in register - this is used in tiki-register.php in tiki 6 6.0

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
  • 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.

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

Example

{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#How_to_display_url_param_in_a_page_or_the_page_name_or_the_user_name?
tiki-index.php?page=SubmitOrder&autosavefields=2:3&autosavevalues={{itemId}}:PluginTracker
See also PluginTrackerList to see how to use the parameter url to transfer an itemId to an URL

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 go from TRACKELIST to TRACKER on this item

{TRACKERLIST(trackerId=1, fields=1:2:3:4:5:6, url="Page1&itemId", showlinks=y) /}

Advanced integration of tracker and wiki

Plugin Tracker Advanced


Contributors to this page: luciash d' being1589 points  , xavi36278 points  , system , sylvie4333 points  , simonf161 points  , Rick7121 points  , E.W. Peter Jalajas310 points  , moooping13 points  , mlpvolt1895 points  , Marc Laporte5511 points  , lindon2331 points  , Nelson393 points  , Jürgen Heckes471 points  and campbe13391 points  .
Page last modified on Friday 27 August, 2010 15:36:24 UTC by luciash d' being1589 points .

Find by Page Name

Exact match

Keywords

The following is a list of keywords that should serve as hubs for navigation within the Tiki documentation and should correspond to development keywords (bug reports and feature requests):