首页 > 解决方案 > 在 DNN XSLT 中获取电子邮件类型字段的值

问题描述

我正在尝试使用 DNN 表单和列表模块以及我为询问者设置的字段之一设置一个联系表单,作为下拉列表并选择了电子邮件类型,并根据哪个查询将表单提交到不同的电子邮件在下拉列表中选择。为此,我将值列表输入为“Captain|x@gmail.com ..;” 在电子邮件设置中。

我的问题是当我收到带有表单结果的电子邮件时,结果中的这个特定字段显示的是电子邮件而不是标题。我正在尝试更改 XSLT 中的文本,但它总是以其他方式出现。如果我将字段类型更改为文本,则以下工作。我不能与电子邮件类型进行比较吗?

<xsl:choose>
        <xsl:when test="udt:I_x0020_am_x0020_a='x@gmail.com'">display some note in email</xsl:when>
        <xsl:when test="udt:I_x0020_am_x0020_a='y@gmail.com'">display some note in email 2</xsl:when>
        <xsl:otherwise>It will always hit here</xsl:otherwise>
      </xsl:choose>

这给了我下拉列表的值

 <xsl:value-of select="udt:I_x0020_am_x0020_a" disable-output-escaping="yes" />

标签: xsltdotnetnuke

解决方案


找到了解决方案。使用字幕作品。

<xsl:choose>
        <xsl:when test="udt:I_x0020_am_x0020_a_UDT_Caption='x@gmail.com'">1</xsl:when>
        <xsl:otherwise>2</xsl:otherwise>
      </xsl:choose>

推荐阅读