Tuesday, December 16, 2014

SharePoint 2010 Dropdown default for newform.aspx

Recently I ran into a problem in SharePoint 2010 for dropdown (lookup columns) that can be defaulted under Newform.aspx page. Interestingly, the dropdown behaves as if it has more than 20 items as well changes its id. So you have to search using the title or class name to get the control. Also, it uses a hidden field control (control id associated as an "opt" attribute in the input control). You need to go thru the choices and get the value you need and set this hidden field to make sure you populate this value, in order to reflect correctly.

No comments:

Post a Comment