Loading...
 
Features / Usability

Features / Usability


Setting a per user default for a tracker dropdown or radio button field

posts: 22

Hi,

Tiki 15.2, MySQL, InnoDB

With both tracker dropdown and radio button fields, repeating an option sets it as the default in the list for plugin Tracker

e.g. one,one,two,three

Would show a dropdown/radio button "one" pre-selected and "two" and "three" as the other options available for selection.

What I would like to do is make the default option vary from user to user.

I have two trackers, one with a user field and an additional field where they choose their preferred value.
In the second tracker I have a field where all options are listed, with no default option specified (no item is repeated).

If I use Plugin TrackerPrefill, I can pass text to the field in the second tracker which contains the dropdown and this works, the text passed causes an item to be duplicated and become the default.

For example

url="tiki-index.php?page=InputDetails&prefills=330&values[]=one"


Where "InputDetails" is the wiki page containing a TrackerPlugin and "330" is the field id of the dropdown field where I want to set the default option, and "one" is the value I want to set as the default.

The question I have is:
Is it possible to pass something other than text as the prefill value? Can I retrieve info from the tracker containing the user's choice and pass it as a prefill to the other tracker.

For example the result of a plugintrackerlist which retrieves the user's default preference from the first tracker.

url="tiki-index.php?page=InputDetails&prefills=330&values[]={trackerlist trackerId="68" fields="357" filterfield="354" filtervalue="#user" list_mode="csv" showfieldname="n"}"


Where field 357 in Tracker 68 contains the user's default choice and field 354 in this tracker is a user selector.

Does anybody know how I can do this?

Thank you.

posts: 2695 United States

Would anything from this page help?
https://doc.tiki.org/PluginJQ

Wish I could be more help, but I'm just now learning trackers and advanced trackers...

If you solve this, be sure to share so others can learn. Thanks.
WizarDave


Why Register?

Register at tiki.org and you'll be able to use the account at any *.tiki.org site, thanks to the InterTiki feature. A valid email address is required to receive site notifications and occasional newsletters. You can opt out of these items at any time.