Tell me more ×
Stack Overflow is a question and answer site for professional and enthusiast programmers. It's 100% free, no registration required.

I currently try to display the column name in a custom form in SharePoint Designer. I use Sharepoint 2013 so the design view doesnt exists anymore :(. The form is used to create a new element in a custom list. I cant put the name directly in the tempate because i would like use this template in different forms so i have to recover the name of my columns dynamically. The problem is that I only found the internal name. I saw in the datafileds tag there are couples where the internal name is relied to the display name but I didnt find how recover the display name with that too.

Is it only possible ? Someone has an idea to help me?

I put some code if u want to look at my code. This part looks for an attribute where the name contains "question" and calls the template "title_line" when it finds one. The function name() gives me the internal name, that is the pb...

<xsl:template match="Row">

 <xsl:for-each select="@*">
    <xsl:choose>                
        <xsl:when test="contains(name(),'Question')">
            <xsl:call-template name="title_line" >
                <xsl:with-param name="title" select="name()"/>
                <xsl:with-param name="class" select="'class_title'"/>
            </xsl:call-template>
        </xsl:when>

        <xsl:otherwise>
        </xsl:otherwise>    

   </xsl:choose>
 </xsl:for-each>

</xsl:template>

This part is to display the title:

<xsl:template name="title_line" >
        <xsl:param name="title" select="'no title'" />
        <xsl:param name="class" select="'no_class'" />
        <tr>
            <td colspan ="2" class="{$class}" style="font-weight:bold;font-size:medium">
                <xsl:value-of select="$title" />
            </td>
        </tr>
</xsl:template>
share|improve this question

Know someone who can answer? Share a link to this question via email, Google+, Twitter, or Facebook.

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.