I need to pre-populate a list form (the add new item form for a list) with some details (the logged in users name and email address)
我需要预先填充一个列表表单(为列表添加新项表单),其中包含一些详细信息(登录用户名和电子邮件地址)
how can i do it?
我该怎么做?
2 个解决方案
#1
2 options:
-
create your own custom form with controls.
使用控件创建自己的自定义表单。
-
create a tiny weppart that does nothing else but render user info in javascript. then use jquery to get that info in the fields in the form.
创建一个微小的weppart,除了在javascript中呈现用户信息之外别无其他功能。然后使用jquery在表单的字段中获取该信息。
#2
I'm doing the same thing, trying to populate a people picker field.
我正在做同样的事情,试图填充人员选择器字段。
I'm not done yet, but I was able to implement a CEWP (Custom Editor Web Part) in the form, adding:
我还没有完成,但我能够在表单中实现CEWP(自定义编辑器Web部件),添加:
?PageView=Shared&ToolPaneView=2
at the end of the URL of the new form. Example:
在新表单的URL的末尾。例:
NewForm.aspx?RootFolder=.....default.aspx**&PageView=Shared&ToolPaneView=2**
After that,I put JQuery in the Web Part content, until now I trying to implement SPFF, but is kinda hard because there are not too many examples... by the time I'm done I would be pleased to help you
之后,我把JQuery放在Web部件的内容中,直到现在我试图实现SPFF,但是有点难,因为没有太多的例子......当我完成时,我很乐意帮助你
#1
2 options:
-
create your own custom form with controls.
使用控件创建自己的自定义表单。
-
create a tiny weppart that does nothing else but render user info in javascript. then use jquery to get that info in the fields in the form.
创建一个微小的weppart,除了在javascript中呈现用户信息之外别无其他功能。然后使用jquery在表单的字段中获取该信息。
#2
I'm doing the same thing, trying to populate a people picker field.
我正在做同样的事情,试图填充人员选择器字段。
I'm not done yet, but I was able to implement a CEWP (Custom Editor Web Part) in the form, adding:
我还没有完成,但我能够在表单中实现CEWP(自定义编辑器Web部件),添加:
?PageView=Shared&ToolPaneView=2
at the end of the URL of the new form. Example:
在新表单的URL的末尾。例:
NewForm.aspx?RootFolder=.....default.aspx**&PageView=Shared&ToolPaneView=2**
After that,I put JQuery in the Web Part content, until now I trying to implement SPFF, but is kinda hard because there are not too many examples... by the time I'm done I would be pleased to help you
之后,我把JQuery放在Web部件的内容中,直到现在我试图实现SPFF,但是有点难,因为没有太多的例子......当我完成时,我很乐意帮助你