Shaun Summers
Posts: 0
Joined: Thu Jul 25, 2013 3:49 pm

Pre-select an item in drop-down list

Hello,

I have a form that users are to complete. It contains a dropdown list generated from the database on page load. I would like to pre-select one of the options. I've tried running this javascript on page load (after first populating the lists) but nothing happens:

code
Appery("people_lookup").val("Me").trigger("change");
/code

Shaun

Evgene Karachevtsev
Posts: 12
Joined: Mon Apr 28, 2014 1:12 pm

Pre-select an item in drop-down list

Shaun,

You should run this code not on load page but on the success of the service from which you map in select.
You may also try this code:
preAppery("people_lookup").val("Me").selectmenu( "refresh" );/pre

Return to “Issues”