If I have a radio button with three options A, B, C and I have an input field that the relevancy depends on if the radio button has the value A. Then: If I select the value A in the radio button, the input field is visible and I can add a value. BUT when I change the radio button to B, the Input field is hidden but the value is still there (if I select A again, I can see the value)
Is it possible to remove the value by an event?
The simplest is to reset the value with a
calculate
, which you can place in the samexf:bind
you use to hide the input when the value B is select, as done in the example below. For forms created with Form Builder, there is an RFE for this behavior to be implemented out-of-the-box, but reseting the value only on save/submit, so if you switch back and forth between A and B, the value in the input wouldn't be lost, but it is cleared when the form is saved/submitted.