日期未显示在自定义表单上 [英] Date not displaying on custom form
问题描述
我有一个自定义的显示和编辑表单,上面有日期.我的日期显示在编辑表单上,但是当我转到同一记录并使用显示表单时,它们将显示为空白.有什么建议吗?
I have a custom display and edit form that have dates on them. My dates appear on the edit form, but when I go to the same record and use the display form, they appear blank. Any suggestions?
编辑表单(效果很好)
< tr>
< td width =< 190px> valign ="top" class ="ms-formlabel">
<< H3 class =" ms-standardheader">
< nobr>初始响应日期</nobr>
</H3>
</td>
< td width =" 400px" valign ="top" class ="ms-formbody">
< SharePoint:FormField runat ="server" id ="ff10 {$ Pos}" ControlMode =编辑". FieldName ="Initiative_x0020_Leader_x0020_Ap"; __designer:bind =" {ddwrt:DataBind('u',concat('ff10',$ Pos),'Value','ValueChanged','ID',ddwrt:EscapeDelims(string(@ID)),'@ Initiative_x0020_Leader_x0020_Ap')}''//>
< SharePoint:FieldDescription runat ="server" id ="ff10description {$ Pos}" FieldName ="Initiative_x0020_Leader_x0020_Ap"; ControlMode =编辑"/>
</td>
</tr>
<tr>
<td width="190px" valign="top" class="ms-formlabel">
<H3 class="ms-standardheader">
<nobr>Initiative Response Date</nobr>
</H3>
</td>
<td width="400px" valign="top" class="ms-formbody">
<SharePoint:FormField runat="server" id="ff10{$Pos}" ControlMode="Edit" FieldName="Initiative_x0020_Leader_x0020_Ap" __designer:bind="{ddwrt:DataBind('u',concat('ff10',$Pos),'Value','ValueChanged','ID',ddwrt:EscapeDelims(string(@ID)),'@Initiative_x0020_Leader_x0020_Ap')}"/>
<SharePoint:FieldDescription runat="server" id="ff10description{$Pos}" FieldName="Initiative_x0020_Leader_x0020_Ap" ControlMode="Edit"/>
</td>
</tr>
显示表单(不显示日期)
Display form (Doesn't display date)
< tr>
< td width =< 190px> valign ="top" class ="ms-formlabel">
<< H3 class =" ms-standardheader">
< nobr>初始响应日期</nobr>
</H3>
</td>
< td width =" 400px" valign ="top" class ="ms-formbody">
< xsl:value-of select ="@ Initiative_x0020_Leader_x0020_Ap"/>
</td>
</tr>
<tr>
<td width="190px" valign="top" class="ms-formlabel">
<H3 class="ms-standardheader">
<nobr>Initiative Response Date</nobr>
</H3>
</td>
<td width="400px" valign="top" class="ms-formbody">
<xsl:value-of select="@Initiative_x0020_Leader_x0020_Ap"/>
</td>
</tr>
推荐答案
请尝试以显示形式使用以下代码:
Please try to use code below in display form:
<xsl:value-of select="ddwrt:FormatDateTime(@Initiative_x0020_Leader_x0020_Ap, 1033, 'MM/dd/yyyy')" />
或者尝试使用SharePoint Designer创建新的显示表单,然后检查它是否有效.
Or try to create a new display form using SharePoint designer, then check if it works.
最好的问候,
丹尼斯
这篇关于日期未显示在自定义表单上的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!