kriskyk
asked on
Passing SharePoint Query Paramters to a Form
I'm able to pass the query parameter successfully to the field however when the item is saved the record is not being saved to the list. What's interesting is that if I manually override the passed value by typing into the field on the form and then clicking save, the record is saved to the list .
We have a working example of this on the same site for a different list that we created about a year ago and does not have this issue.
Original Code Provided when a new form was created for the list in SPD:
<SharePoint:FormField runat="server" id="ff1{$Pos}" ControlMode="New" FieldName="AttachmentsID" __designer:bind="{ddwrt:Da taBind('i' ,concat('f f1',$Pos), 'Value','V alueChange d','ID',dd wrt:Escape Delims(str ing(@ID)), '@Attachme ntsID')}"/ >
<SharePoint:FieldDescripti on runat="server" id="ff1description{$Pos}" FieldName="AttachmentsID" ControlMode="New"/>
Removed the above code and replaced with the following:
<asp:TextBox runat="server" id="ff1{$Pos}" Name="FileName" Text="{$AttachmentsID}" Value="{@AttachmentsID}" __designer:bind="{ddwrt:Da taBind('i' ,concat('f f1',$Pos), 'Text','Te xtChanged' ,'ID',ddwr t:EscapeDe lims(strin g(@ID)),'@ Attachment sID')}" Width="100px" Height="20px" BorderWidth="0" />
We have a working example of this on the same site for a different list that we created about a year ago and does not have this issue.
Original Code Provided when a new form was created for the list in SPD:
<SharePoint:FormField runat="server" id="ff1{$Pos}" ControlMode="New" FieldName="AttachmentsID" __designer:bind="{ddwrt:Da
<SharePoint:FieldDescripti
Removed the above code and replaced with the following:
<asp:TextBox runat="server" id="ff1{$Pos}" Name="FileName" Text="{$AttachmentsID}" Value="{@AttachmentsID}" __designer:bind="{ddwrt:Da
Please follow the process as described in this article:
http://www.geekswithblogs.net/SoYouKnow/archive/2009/10/29/setting-sharepoint-form-fields-using-query-string-variables-without-using.aspx
http://www.geekswithblogs.net/SoYouKnow/archive/2009/10/29/setting-sharepoint-form-fields-using-query-string-variables-without-using.aspx
This question needs an answer!
Become an EE member today
7 DAY FREE TRIALMembers can start a 7-Day Free trial then enjoy unlimited access to the platform.
View membership options
or
Learn why we charge membership fees
We get it - no one likes a content blocker. Take one extra minute and find out why we block content.
Just want to make couple of things clear, have you followed the process as described in this article: http://www.geekswithblogs.
If yes, then let me know the SharePoint version you are using. I was also wondering that this technique is pretty old and maybe they have changed it so that only certain pre-configured/allowed querystrings canbe processed in this fashion.
Regards,
Chinmay.