Step-attribute JForm字段类型编号

时间:2015-05-25 20:38:29

标签: numbers joomla3.0 jform

Joomla!-Forms中的数字输入是否有任何step-attribute? 此输入类型的doc-site尚未包含任何答案 enter link description here

我需要步数为0.01的十进制数

1 个答案:

答案 0 :(得分:0)

您应该检查文件/libraries/joomla/form/fields/number.php,您可以看到有一些参数要传递给表单字段用于此目的:

/**
 * 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;