I am using SharePoint 2013 online and I have created a form for my list using Infopath 2013. It has a combination of text fields and dropdowns.

I am able to set the default value of text field using like


but not the dropdown like


What am I missing?

enter image description here

  • What is this originalid="V1_I1_D16" – Akshay Randive Jun 10 '15 at 16:00
  • It is one of the attributes – Keerthi Jun 10 '15 at 16:42

Check this.Make sure Jquery is referenced


Check this fiddler link also which I created. https://jsfiddle.net/tL5k6w22/

| improve this answer | |
  • 1
    Please update your first answer instead of posting multiple very similar answers! – Robert Lindgren Jun 10 '15 at 18:50
  • I knows its working in the jsfiddle. But it does not work with form build in Infopath. – Keerthi Jun 10 '15 at 19:30

make sure to call focus before setting value,


| improve this answer | |

The complete jquery code is :

DropDownList.SetValueOfControl($('#ctl00_ctl45_g_aa5a291c_b931_4c0f_b477_f57a9cf522f2_FormControl0_V1_I1_D2')[0],lookupVal );

| improve this answer | |
  • I have a strong belief there is a possibility that this code won't compile :) – Paul Strupeikis Apr 19 '16 at 8:57

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.