Features / Usability

Features / Usability

Plugin Tracker autosave functionality not working for me

posts: 22


Tiki 15.2, MySQL, InnoDB

I am trying to get the autosave functionality to work within PluginTracker. The idea was to overwrite the values of some of the item fields in the tracker on Save.

Where fields 1-4 are text fields in tracker ID 10:

Attempt 1 - replace user entered valued on fields 1 and 2

{TRACKER(trackerId="10" fields="1:2:3:4" action="Send"  autosavefields="1:2" autosavevalues="value1:value2")}Thank you for your contribution.{TRACKER}

Result 1
The user entered values for fields 1 and 2 are saved and the autosave values of value1 and value2 are ignored.

Attempt 2 - enter values for fields 1 and 2 which have not been amended by user

{TRACKER(trackerId="10" fields="3:4" action="Send"  autosavefields="1:2" autosavevalues="value1:value2")}Thank you for your contribution.{TRACKER}

Result 2
If fields 1 and 2 are obligatory, on save I am told that the mandatory fields 1 and 2 have not been filled. If I change fields 1 and 2 to not be obligatory, there is no error message on save, but looking at the item in the tracker, fields 1 and 2 are empty and do not contain the autosavevalues.

Does anyone know what I am doing wrong?

posts: 22


Thank you for your response.

I have tried with both "value" and "prefill" params but unfortunately they don´t solve my problem.

"Prefill" works for new items, but not if the item already exists in the tracker. I think this is the correct behaviour not a problem.

However, I have a user selector field in my tracker and have set view="user" and overwrite="y" to try and store some "user preferences". The idea was that the user entered some information into the tracker which is then emailed onwards. When they revisit the tracker they should see their existing item but with 2 of the text fields empty and the other tracker fields displaying their choices from their last visit. For this reason using autosave to overwrite just the two text fileds appeared the perfect solution.

"Value" works on new and existing items in the tracker - great, but... it only appears to work on some types of tracker fields.
One of the fields in the tracker is a radio button field and I also have a date and time picker and a numeric field.
I have tried to set the values for just the two text fields leaving the other fields unchanged. The radio button field is not displayed when I use the parameter "value" on an existing item and the numeric field does not display the previous value.

Fields 1 and 2 - text fields
Field 3 - radio button
Field 4 - numeric
Field 5 - date and time picker

{TRACKER(trackerId="10" fields="1:2:3:4:5" values="first:second:::"  action="Send" overwrite="y" email="user1@myorg.net|user2@myorg.net|wiki:MAIL_TPL tpl" emailformat="text" sort="y" view="user")}{TRACKER}

Fields 1 and 2 are text fields and correctly display "first" and "second" as their values.
Field 3 is a radio button field and no radio button options are displayed - I have tried using a value of "1" for the radio button but still nothing is displayed.
Field 4 is numeric and the existing value is not displayed.
Field 5 is a date and time picker and appears to display correctly

Not setting "values" parameter - radio buttons visible, numeric field value displayed

Setting "values" parameter - radio buttons not visible, numeric field does not show value

Is there a way of using "value" parameter when some of the fields are radio buttons? I have tried with both numbers e.g.1 and setting the value to be one of the labels of the radio buttons. What I would like is it to show existing value for radio button for the existing item.

Upcoming Events

No records to display