xslt - 在 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" />
解决方案
找到了解决方案。使用字幕作品。
<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>
推荐阅读
- highcharts - 如何在高角图表包装器中使用添加系列和更新方法?
- python - 我如何访问kivy中的全局变量
- chart.js - Chartjs条形图试图从数据集中获取标签
- javascript - 在Javascript引擎(v8)中,优化阶段的“隐式调用”到底是什么意思?
- jquery - c3条形图标签颜色
- reactjs - React Fusion Charts - 注释标签样式不起作用
- html - 在仪表板标题中间对齐具有可变长度的文本
- openebs - 从集群中删除一个工作节点后,OpenEBS 目标 pod 无法与其副本通信
- docker - 我如何使用 Dockerfile 开始使用 docker 容器
- react-native - 如何在 React Native 中的屏幕中心创建自定义选项卡