我有3个单选按钮选择选项,如果用户选择“转发”选项,则会有一个输入字段供他们输入电子邮件地址。如果选择转发单选按钮,如何才能使输入字段成为必需?我似乎无法在XSLT必需字段中找到任何有用的信息。代码如下:
<table cellpadding="0" id="allCategoryCheckboxes" >
<tr id="categoryRows">
<xsl:for-each select="form/categories/all/category">
<xsl:sort data-type="number" order="ascending"
select="((value='Available') * 1) +
((value='Unavailable') * 2) +
((value='Forward') * 3)"/>
<td>
<input type="radio" name="catUid">
<xsl:attribute name="value"><xsl:value-of select="uid"/></xsl:attribute>
<xsl:if test="uid = ../../current//category/uid"><xsl:attribute name="checked">checked</xsl:attribute></xsl:if>
</input>
<xsl:value-of select="value"/>
<xsl:if test="value = 'Forward'">
<xsl:text> to: </xsl:text>
<xsl:variable name="someEmailAddress">
<xsl:if test="/bedework/formElements/form/xproperties/node()[name()='X-FORWARDING-ADDRESS']">
<xsl:value-of select="/bedework/formElements/form/xproperties/node()[name()='X-FORWARDING-ADDRESS']/values/text"/>
</xsl:if>
</xsl:variable>
<input type="text" name="someEmailForwardingAddress" value="{$someEmailAddress}" id="someEmailForwardingAddress"/>
</xsl:if>
</td>
</xsl:for-each>
</tr>
</table>