Skip to content

Commit

Permalink
Number steps (#2246)
Browse files Browse the repository at this point in the history
* Update SingleListing.php

* fix: float steps for custom number
  • Loading branch information
HeyMehedi authored Feb 24, 2025
1 parent 1e56e36 commit 332b8e7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion templates/listing-form/custom-fields/number.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
if ( ! defined( 'ABSPATH' ) ) exit;
$data_min = $data['min_value'] ?? '';
$data_max = $data['max_value'] ?? '';
$data_step = absint( $data['step'] ?? 1 );
$data_step = max( 0, floatval( $data['step'] ?? 1 ) );;
?>

<div class="directorist-form-group directorist-custom-field-number">
Expand Down

0 comments on commit 332b8e7

Please sign in to comment.