我们如何从博客中添加评论中删除必填的标题字段 [英] how can we remove the required title field from add comment in blog

查看:48
本文介绍了我们如何从博客中添加评论中删除必填的标题字段的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

标题*




身体*






我们如何删除标题字段并将正文重命名为post comment

Title *




Body *






how can we remove the title field and rename the body as post comment

推荐答案

您可以更改名称或在schema.xml中隐藏自定义列表的列.
You can change the name or hide a column in the schema.xml for the custom list.
<Field Name="Title" ID="{fa564e0f-0c70-4ab9-b863-0177e6ddd247}" DisplayName="Title" Type="Text" Group="_hidden" Sealed="TRUE"/>



或者您可以使用代码.



Or you can use code.

SPList list = web.Lists.TryGetList("my list");
if(list != null)
{
   SPField field = list.Fields["field name"];
   field.Title = "new title";
   field.Update();
}


在注释列表设置中转到标题列并将其隐藏,如果要重命名正文,也可以在注释列表设置中完成
in the comments list settings go to title column and make it hidden and if you want to rename body that can also be done in the comments list settings


这篇关于我们如何从博客中添加评论中删除必填的标题字段的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆