I've been set the task of building a form that should be accessible as an edit form associated with a list, but should edit fields across several lists. The data model is:
List with Item info (MAIN) -------> List with multiple files stored per item (DOWNLOADS)
E.g.
(1) Name: Bob
Comments: Hello
ID: 1
FirstCheck: A.xlsx -----> ID: Arbitrary; Title: 1_FirstCheck; File: A.xlsx
FollowUp: B.xlsx -----> ID: Arbitrary; Title: 1_FirstCheck; File: B.xlsx
The form I need to build needs to be an edit form for an item in Downloads
but allow for editing the Comments
field in Main
.
Currently, I've cloned and messed with the Edit Form for Downloads
, deleting unneeded fields etc. I've also identified that fields in general are specified by an XML tag along these lines in Sharepoint Designer:
<SharePoint:FormField
runat="server"
id="ff4{$Pos}"
ControlMode="Display"
FieldName="SemanticID"
__designer:bind="{ddwrt:DataBind('u',concat('ff4',$Pos),'Value','ValueChanged','ID',ddwrt:EscapeDelims(string(@ID)),'@SemanticID')}"
/>
I've tried creating a new line elsewhere along the lines of:
<SharePoint:FormField
runat="server"
ListId="{1D7B7810-688A-4552-9EB1-48DEF6F7B620}"
id="ff40{$Pos}"
ControlMode="Display"
FieldName="Title"
__designer:bind="{ddwrt:DataBind('u',concat('ff40',$Pos),'Value','ValueChanged','ID',ddwrt:EscapeDelims(string(@ID)),'@Title')}"
ItemId="1"
/>
As a starting point to display the contents of Item 1 for Main
(list ID {1D7B7810-688A-4552-9EB1-48DEF6F7B620}
), but I just get an uninformative error when displaying the page.
Can anyone suggest what I need to do to firstly just get/edit the contents of a specific ID using a Sharepoint:FormField
control, and secondly, how I might be able to assign an ItemID to edit in Main
based on the Title
field in `Downloads?
I'd also be interested in knowing how to include JavaScript in a form, if it's possible.
I should point out that my Dev environment is Sharepoint Designer; for whatever reason (possibly because we're using a hosted version of Sharepoint?) I can't open the site in Visual Studio.