我正在尝试使用SPServices UpdateList操作,我需要我想要从默认只读设置更改的列的字段ID。如何确定字段标记设置?
//Make the author field editable
var author = "<Fields><Method ID='1'><Field /*What stuff goes here?*/ ReadOnly='FALSE' /></Method></Fields>";
$().SPServices({
operation: "UpdateList",
listName: "Requests",
listProperties:"",
updateFields: author,
newFields: "",
deleteFields: "",
listVersion: "",
async: false,
completefunc: function (xData, Status){
}
});
答案 0 :(得分:4)
我通过这样做找到了要放在字段标记中的内容:
对于上述问题,标签是:
<Field ID="{1lc5j379-ec7e-42a8-901d-j85a3881c0b8}" ColName="tp_Author" RowOrdinal="0" ReadOnly="FALSE" Type="User" List="UserInfo" Name="Author" DisplayName="Created By" SourceID="http://schemas.microsoft.com/sharepoint/v3" StaticName="Author" FromBaseType="TRUE" Version="7" />