I’m not sure to understand your question? What’s the link between your conditional requires and the reset? Those are 2 differents features.
Apparently, you already figure out how to do the conditional require but what the relation between reset the value of a field and the optional required?
To do a reset feature store all of your value when you load the data then restore them on reset. Here an oversimplified example
let input1Default;
let input2Default;
let input3Default;
$w.onReady(async () => {
data = await fetchData();
input1Default = data.field1;
input2Default = data.field2;
input3Default = data.field3;
$w("#resetButton").onClick(onReset);
onReset(); //initialize value
})
function onReset(event) {
$w("#input1").value = input1Default;
$w("#input2").value = input2Default;
$w("#input1").value = input3Default;
}
Is this what you are looking for or is there something I did not understand?