0

I have a list called "Stage", which has an Task list with a filter in the Displayform:

enter image description here

If the user wants to add a new task to this specific item the newform for the Task appears. To be sure, the task is mapped to the right stage, we want to save the stage ID or Title as well. The question is now, how can I pass value from the detail view (i.e. Id and Title) via the URL by clicking on "Add new item" in the task list. Is this possible without programming in VS?

Thanks in advance

Jürgen

1 Answer 1

1

Well either you have to drop the NewForm on the "Stage" item display page.. Or you should create your own custom "Add new item" button.. which takes Stage Item Id from Query String [ID] and send it to the popup/page of New Item form!

Once you have the Stage Id in Query String you can use jQuery to get the control and set its value:

$("select[title='ParentLookupField']")

You should simply follow:

Setting SharePoint Form Fields Using Query String Variables Without Using JavaScript
OR
Get or Set value for SharePoint field in NewForm, EditForm and DispForm (Get only in DispForm)

PS: Above example is using SharePoint 2007, but logic should be same!

2
  • Ah, a custom button... Why didn't I think of that? Good idea Arsalan :) Commented Oct 1, 2013 at 13:29
  • Coz I have done it before ;) Commented Oct 1, 2013 at 13:34

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.