API Tracker | |
Tiki supports URL arguments and they can be used to interact with the Trackers and the plugins displaying or creating items. For example you can define a default value for a field in a customSearch or force the insertion of a value when creating an item. |
Examples | |
|
Allow creation, edition and deletion of tracker items in a modal pop-up | |
Copy to clipboard Copy to clipboard Copy to clipboard
|
Create/Update some fields of an item using editable | |
Copy to clipboard
(same principle for item creation) |
Hide some fields of an item on the creation/edition using noteditable | |
Copy to clipboard
(same principle for item creation) |
Pre-fill field values using fields | |
Note: once you use fields, only the fields which you specifically mention will be available for edition. Copy to clipboard
Copy to clipboard
This will prefill the "education" field and it will display fields name and surname as empty fields. It is probably perfect for creating a new item but not what you would expect for editing an existing item (loss of previous values). A better solution which does not lose previously entered content: Copy to clipboard
|
To set a link that will create a new item and force-insert and hide a value for a field | |
Here we use it to create an item with a specific category Id.
Copy to clipboard
All fields can be edited except the one which is forced which will not be shown. This can be used with a variable like a field from a plugin list. Here we prefill the (user)name and hide it.The smarty replace modifier is required to remove extra space(s) added to the value(s) Copy to clipboard
|
To set a link that will open the update modal for an existing item and insert a value for a field | |
Here we use it to create an item with a specific category Id.
Copy to clipboard
|
Status control with tiki-tracker-insert_item and tiki-tracker-update_item | ||||||||||||||||||
Copy to clipboard
|
Updating a tracker field using POST | |