Loading...
 
Features / Usability

Features / Usability


Is it possible to set default dropdown items?

posts: 74 United States

I have a Dropdown Selector field in my tracker with the following items...

"Yes"
"No"
"Unknown"

I'd like the Dropdown Selector to default to "Unknown" when creating a new item.

Similarly, I'd like to default the Country Selector to United States :-)

Can this be done? I want to make data entry as easy as possible for the users.

posts: 126886 United Kingdom

Just put the default option in the list twice, more info here

HTH

posts: 74 United States
Jonny Bradley wrote:

Just put the default option in the list twice, more info here

HTH

Thanks! That worked for the dropdown selector.


Any way to do this with the Country Selector?

posts: 74 United States
Rick Sapir / Tiki for Smarties wrote:

There's no "default" setting for the Country selector, but you can probably do with with JQ. See "Prefill tracker fields" in the docs for details.

HTH,

- Rick | My Tiki Blog | My Tiki UserPage

Why be a dummy? Get smarty! TikiForSmarties.com
Tiki for Smarties, your source for the best (and only) Tiki books, guides, and tutorials.
Haven't had any luck yet. I can live without it. This is what I tried using.

Copy to clipboard
!! Country {$f_75} {JQ()} $("select[name=ins_75]").val("United States") {JQ}
posts: 2428 Czech Republic

Hi Jeff,

iirc, the value should be United_States. But maybe you will need to add HTML attribute selected="selected" too.

luci

Jeffrey Frady wrote:

Haven't had any luck yet. I can live without it. This is what I tried using.

Copy to clipboard
!! Country {$f_75} {JQ()} $("select[name=ins_75]").val("United States") {JQ}
posts: 126886 United Kingdom
luciash d' being 🧙 wrote:
iirc, the value should be United_States. But maybe you will need to add HTML attribute selected="selected" too.


And if you're using Chosen Selects jquery_ui_chosen then you'll need to add .trigger("chosen:updated") on the end to make the value show.


Upcoming Events

1)  18 Apr 2024 14:00 GMT-0000
Tiki Roundtable Meeting
2)  16 May 2024 14:00 GMT-0000
Tiki Roundtable Meeting
3)  20 Jun 2024 14:00 GMT-0000
Tiki Roundtable Meeting
4)  18 Jul 2024 14:00 GMT-0000
Tiki Roundtable Meeting
5)  15 Aug 2024 14:00 GMT-0000
Tiki Roundtable Meeting
6)  19 Sep 2024 14:00 GMT-0000
Tiki Roundtable Meeting
7) 
Tiki birthday
8)  17 Oct 2024 14:00 GMT-0000
Tiki Roundtable Meeting
9)  21 Nov 2024 14:00 GMT-0000
Tiki Roundtable Meeting
10)  19 Dec 2024 14:00 GMT-0000
Tiki Roundtable Meeting