In here I'm going to explain how to customize the SharePoint Item From to take parameters from Query String and set them as default values using SharePoint designer. Using this you can open a new Item From by providing parameters as query string. For an example you can customize one item Display form and taking query String Parameter from that and view New Item view for another list by providing default values using the Query String.
Steps
Open the SharePoint designer and go to list and libraries and open the list that you want.
Click the New and create a New Insert View by providing the name of the view.
Then created one will come to the list. then click and open the view.
Then default New Item Screen will be loaded as follows.
Then Delete the default list view and make that empty. You can delete the controls by selecting the area in the design view, If it fully cleared you can view the following message from the designer.
Then go to SharePoint Controls and add the a Custom List as you want.
Then select the New Item Form and click ok to add the view.
In My Example I want to set the comments by using Query String Parameter. there for first i change the comments field’s controller to textbox.
Then Add parameter field to get the comments form the Query String.
I'm passing my comments using query string ID com and it is storing in to the variable param.
Then select the comments text box and switch the view to code or split designer mode,
In here go and change the text property to {$param} This will set the query string parameter to the text box.
Then you done.
Comments
Thanks for the helpful post. In this case the query string value will always be a static value, ie."asdasdasd". How would you pass the current value from the ViewData Form into the NewItem Form? It would be something like this "...aspx?com=@Comment". Is something like this possible?
Thanks for your help.
Yeh it is possible. Query string will work with dynamic values as well
Thanks Saravanan
I have a ViewData Form where only 1 item is shown at a time, and each item has a ProductID. I want to pass that ProductID into the NewItem Form using this "....AddNewProductForm.aspx?ParamID={$ProductID}" ParamID is able to pass through a value to the NewProductForm if I manually assign a value to ProductID, but it will be blank on the pass through if I don't, ie. it does not pass through the current ProductID that is being displayed.
Any help would be appreciated, and thanks in advance.
Thanks
http://ardaniderege.blogspot.co.il/