One option is to have an action
that will set the value for Payment1
to an empty string.
In the example model below, if the element bar
does not equal "checked" (the value of the select), then the element foo
is set to an empty string.
<xf:model>
<xf:instance id="main">
<data>
<foo></foo>
<bar></bar>
</data>
</xf:instance>
<xf:bind nodeset="instance('main')/foo" relevant="following-sibling::bar='checked'"/>
<xf:action ev:event="xforms-refresh">
<xf:action if="instance('main')/bar[not(.='checked')]">
<xf:setvalue ref="instance('main')/foo" value="''"/>
</xf:action>
</xf:action>
</xf:model>
Here's an example of the select (bar
) and the input (foo
):
<table>
<row>
<td></td>
<td>
<xf:select ref="bar" selection="closed" appearance="full" incremental="true">
<xf:item>
<xf:label>Click Me</xf:label>
<xf:value>checked</xf:value>
</xf:item>
</xf:select>
</td>
</row>
</table>
<table>
<tr>
<td>Input Foo: </td>
<td>
<xf:input incremental="true" ref="foo"/>
</td>
</tr>
</table>