Loading...
 
Features / Usability

Features / Usability


Is it possible to set default dropdown items?

posts: 56 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: 126744 United Kingdom

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

HTH

posts: 56 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: 56 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.

!! Country
{$f_75}
{JQ()}
$("select[name=ins_75]").val("United States")
{JQ}
posts: 2421 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.

!! Country
{$f_75}
{JQ()}
$("select[name=ins_75]").val("United States")
{JQ}
posts: 126744 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.