开发者

MOSS 2007; Added custom fields not showing up in NewForm, EditForm, DispForm

开发者 https://www.devze.com 2023-01-10 00:00 出处:网络
I have a menu action that is registered on every list. This action when enabled, creates 4 custom fields. Field creation works on every list.

I have a menu action that is registered on every list.

This action when enabled, creates 4 custom fields. Field creation works on every list.

The problem is, that on the lists, which are created via our own Site Template, these 4 fields are not displayed on any forms (DispForm, NewForm, EditForm). On every other list, the fields are normally displayed.

This is my code for adding field to the list (on field example):

 if (!list.Fields.ContainsField("RemindTo"))
        {
            list.Fields.Add("RemindTo", SPFieldType.Text, false);
            SPFieldText text = (SPFieldText)list.Fields["Re开发者_JS百科mindTo"];
            text.Description = "Remind to email address, leave empty for Default value. (Default. author email address)";
            text.ShowInDisplayForm = true;
            text.ShowInEditForm = true;
            text.ShowInNewForm = true;
            text.ShowInViewForms = true;
            text.Update();
        }

Any help is most welcome,

Regards, Tom

0

精彩评论

暂无评论...
验证码 换一张
取 消