Hi, I have the code (below) on my page, the default value for flour2 is zero. Is it possible (in wappler w/o using javascript) to automatically have form1.flour2.value reset back to zero when it is not shown?
<div class="form-group row" dmx-show="flourstomix.value >= 2">
<label for="flour2" class="col-sm-4 col-form-label">Second Flour %</label>
<div class="col-sm-3">
<input type="number" class="form-control" id="flour2" name="flour2" placeholder="Enter value" value="0" step="0.5" data-rule-min="0" data-rule-max="100" style="text-align: center;" dmx-on:change="form1.total.validate()" dmx-on:updated="form1.total.validate()">
</div>
<div class="col-sm-5">
<input type="text" class="form-control" id="flour2name" name="flour2name" placeholder="Flour Type Name" dmx-on:change="cookies1.set('secondflourname',value,{expires: 180})" dmx-bind:value="cookies1.data.secondflourname">
</div>
</div>
Community Page
Last updated:
Last updated: