Explorar o código

Added step attribute to number fields.

Alan Lam %!s(int64=8) %!d(string=hai) anos
pai
achega
cfebe9d296
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      engine/form.php

+ 1 - 1
engine/form.php

@@ -130,7 +130,7 @@ class Form {
 		<div class="row mb-1">
 			<label class="col-sm-4 col-form-label" for="<?=$id?>"><?=htmlspecialchars($options->label)?></label>
 			<div class="col-sm">
-				<input class="form-control" type="number" name="<?=$options->name?>" id="<?=$id?>" placeholder="<?=htmlspecialchars($placeholder)?>" value="<?=htmlspecialchars($value)?>" <?=$required?> <?=$min?> <?=$max?> <?=$max_length?> />
+				<input class="form-control" type="number" name="<?=$options->name?>" id="<?=$id?>" placeholder="<?=htmlspecialchars($placeholder)?>" value="<?=htmlspecialchars($value)?>" step="0.01" <?=$required?> <?=$min?> <?=$max?> <?=$max_length?> />
 				<?php
 				if($help_text) {
 					?>