Hi, I’m updating some code and it is working but I’m having a problem with my inputted values jumping around as I type them in. I’m sure it is because I’m trying to compute 3 different variable values that are all dependent on each other. I did not even think I could get this to work but it does - is there a way (maybe with some type of validation) to keep the values from updating before I finish the input for a variable?
Or is this approach a really bad way to handle the problem?
This is the code but I’m not sure if this the best way to get it into the post
<input type="number" class="form-control form-control-sm" id="stf1" name="stf1" placeholder="Enter Value" dmx-bind:value="((stf3.value) / (3.14159265359 * ((pizzasize.value * .5).pow(2)))).round(4)" step="0.0001" value="0">
</div>
<div class="col-sm-3">
<input type="number" class="form-control form-control-sm" id="stf2" name="stf2" placeholder="Enter some text" dmx-bind:value="(((3.14159265359 * ((pizzasize.value / 2).pow(2))) * stf1.value) / 0.035274).round(2)" step="0.1" value="0">
</div>
<div class="col-sm-3">
<input type="number" class="form-control form-control-sm" id="stf3" name="stf3" placeholder="Enter some text" dmx-bind:value="(.035274 * stf2.value).round(2)" step="0.1" value="0">
</div>
Community Page
Last updated:
Last updated: