Page 1 of 1

Pre-select an item in drop-down list

Posted: Fri Jul 18, 2014 12:43 pm
by Shaun Summers

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


Pre-select an item in drop-down list

Posted: Fri Jul 18, 2014 1:21 pm
by Evgene Karachevtsev

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