0

We are creating custom forms in Sharepoint designer by replacing the listview webpart by customized xslt markup inside a dataformwebpart. The xslt contains html comments which we need to be rendered in the browser similar to what is rendered using the standard listviewwebpart. How can we get the comments included in the rendered output ?

an expample section of the xslt is ....

        <tr>
          <td valign="top" class="ms-formlabel" colspan="2" style="white-space: normal;"><H3 class="ms-standardheader" style="white-space: normal;">title</H3></td>
          <td valign="top" class="ms-formbody" colspan="18">
      <!-- FieldName="title"
        FieldInternalName="_x0073_itle"
        FieldType="SPFieldText"
      -->
            <SharePoint:FormField runat="server" id="ff2{$Pos}" ControlMode="New" FieldName="_x0073_itle" __designer:bind="{ddwrt:DataBind('i',concat('ff2',$Pos),'Value','ValueChanged','ID',ddwrt:EscapeDelims(string(@ID)),'@_x0073_itle')}"/>
            <SharePoint:FieldDescription runat="server" id="ff2description{$Pos}" FieldName="_x0073_itle" ControlMode="New"/>
          </td>
        </tr>

Thanks in advance :-)

1

Turned out to be easy !! just use an block as in .....

    <tr>
      <td valign="top" class="ms-formlabel" colspan="2" style="white-space: normal;"><H3 class="ms-standardheader" style="white-space: normal;">title</H3></td>
      <td valign="top" class="ms-formbody" colspan="18">
  <xsl:comment> FieldName="title"
    FieldInternalName="_x0073_itle"
    FieldType="SPFieldText"
  </xsl:comment>
        <SharePoint:FormField runat="server" id="ff2{$Pos}" ControlMode="New" FieldName="_x0073_itle" __designer:bind="{ddwrt:DataBind('i',concat('ff2',$Pos),'Value','ValueChanged','ID',ddwrt:EscapeDelims(string(@ID)),'@_x0073_itle')}"/>
        <SharePoint:FieldDescription runat="server" id="ff2description{$Pos}" FieldName="_x0073_itle" ControlMode="New"/>
      </td>
    </tr>

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.