This project has moved and is read-only. For the latest updates, please go here.

NewForm: Save data retrieved with SPDisplayRelatedInfo

Nov 19, 2010 at 5:47 PM


I am working on NewForm.aspx and I am facing the following challenge:

There is a dropdown lookup field refering to a Name field from my Catalog list. When I select a name in the dropdown, I want to set the ID of the selected Catalog Item in the new item of the current list, to be able to refer to the catalog item in the future. I was able to retrieve the Catalog Item's ID with SPDisplayRelatedInfo (and works really well and easily by the way), but I don't know if it is possible to assign the retrieved value to an input field of my NewForm.

Is it possible to do so with the SPService library or should I consider another way to achieve my goal?

thank you,


Nov 19, 2010 at 6:04 PM


SPDisplayRelatedInfo gets you part of the way there; it puts the data on the page. Then you can add code in the completefunc to do something with it.  You'll notice that I give the returned values nice ids in their wrapping containers so that they are easy to select.