I have this HTML code
<form method="post" action="cashier.php" enctype="form-data/multipart">
<input required id="amount" type="number" min="0" class="form-control" name="txtamount" placeholder="Enter Payment Here..." />
<input required id="cash" type="number" min="document.getElementById('amount').value" class="form-control" name="txtcash" placeholder="Enter Cash Here..." />
<input type="submit" class="btn btn-primary pull-right" name="btnenroll" value="Done" />
</form>
If I type 1000 on id="amount", the id="cash" min will be 1000.
But it doesn't work.
minattribute in pure HTML. You'll need a JS (and possibly a library) for this.minandmaxattributes can fill only with a number or a date depending the type. Maybe you are interesting in HTML5 constraint validation w3.org/TR/2011/WD-html5-20110525/…