Certain form components that have a visibility condition retain their values once selected. How to reset those?

Hi,

I have a sales visit form with multiple required choice components related to the details of the visit done by a user. One component is called “visit type”. Visit type has multiple choices viz. sale successful, order denied & follow up scheduled but you can select only one of these and depending on what choice you select from visit type certain hidden form components become visible.
To Elaborate :-
If sale successful is selected then two components become visible - “Sale Value”(Number entry field) and “Invoice image”(image picker).
If follow up is selected then a “next follow up date”(date entry) becomes visible
If Order denied is selected then “a remark” column becomes visible.

The problem : Because we used visibility as a basis(which we now see was an oversight) for taking conditional inputs, what’s happening is that if we select sale successful choice then fill its related visible components but then change the choice to order denied, the already filled components related to sale successful still hold their values(obviously they would) but are no more visible(obviously again) and so when the user submits the form, a royal mix of data is visible for that submission showing order denied as visit type as well as the details of components related to sale successful(since they were never reset).
Also these values are being set via a workflow having set column values.

How do i basically reset those unwanted components values or how do i achieve the conditional component value inputs based on other components without the visibility filter ?

Please guide @Darren_Murphy @NoCodeAndy

Ideas:

  • Maybe you could hide components with visibility conditions based on the type (what you’ve already done) and if the field is empty. If the field isn’t empty, then it would remain visible.
  • You could hide the submit button until all data is valid. You are think of resetting fields, I’m thinking of preventing the user from submitting the form in the first place until the user has made the correct selections. You could add warning messages with one of the text components tening the user what to correct.
1 Like