I would like to clear hidden fields on the maestro form on a button click event? Form submit button does that prior submitting the form but I need to do this as part of data capture itself. We have several options available to clear field immediately when hidden etc. but I don't want to rely on developers to configure that on every field. Basically we need to make an API call to send the captured information by sending clean data. If user has entered information in the field that becomes hidden for any reason, that hidden data will also be sent over. I want to simulate how Submit button clears the hidden form data prior final submit. Do we have any method available to do so?
Perhaps inside click logic you can check the visibility of the fields you want to clear, and set them to blank if visibility is false.
Another way, maybe better, you can add the clear policy by component in your templates. Then everytime some adds a new field/component it will have the policy alreday set.