Skip to main content

Input Number

get_input_number

PHP Developer Guide: get_input_number Function

This guide explains how to use the get_input_number function from your PHP framework. This function generates a styled HTML <input type="number">

It supports:

  • Readonly rendering
  • Custom classes, placeholders, and attributes

Manual Example with get_input_number

{
"element": [{
"input_number": {
"title": "Age",
"name": "age",
"placeholder": "Your age here"
}
}]
}

Input number

Behavior

  • Readonly: Passed as an optional flag to generate a readonly field.
  • Custom attributes: Support for placeholder, title, class, id, and attr arrays.

Usage Notes

  • Use title to define label text (falls back to $this->app->language($name)).
  • Define extra classes with add_input_class.
  • Use attr['readonly'] to disable editing.
  • Ideal for editing forms.