0
votes

Is there any step-attribute for the number-input in Joomla!-Forms? The doc-site for this input-type doesn´t contain any answer yet enter link description here

I need decimal numbers with step 0.01

1

1 Answers

0
votes

You should check the file /libraries/joomla/form/fields/number.php, you can see that there are some parameters to pass to the form field for that purpose:

/**
 * The form field type.
 *
 * @var    string
 * @since  3.2
 */
protected $type = 'Number';

/**
 * The allowable maximum value of the field.
 *
 * @var    float
 * @since  3.2
 */
protected $max = null;

/**
 * The allowable minimum value of the field.
 *
 * @var    float
 * @since  3.2
 */
protected $min = null;

/**
 * The step by which value of the field increased or decreased.
 *
 * @var    float
 * @since  3.2
 */
protected $step = 0;