ฟอร์มข้อมูล
Code
<?php
require_once('public/generate-form-dev.php');
$form=new Form();

// ตัวอย่างการสร้างช่องจำนวนเต็ม ป้อนข้อมูลได้ 10 - 98
$field['f1']=[
    'label'=>'เลขจำนวนเต็ม',
    'type'=>'number',
    'min' => 10,
    'max' => 100,
];

// ตัวอย่างการสร้างช่องตัวเลขทศนิยม 2 หลัก ตั้งแต่ 0-4
$field['f2']=[
    'label'=>'เลขทศนิยม',
    'type'=>'number',
    'min' => 0,
    'max' => 4,
    'step'=>0.01,
];

/*
ตัวอย่างการสร้างช่องตัวเลข ตามประเภทข้อมูล tinyint, smallint, mediumint, int, bigint
            | Bytes    Range (signed)                               Range (unsigned)
--------------------------------------------------------------------------------------------
tinyint     | 1 byte   -128 to 127                                  0 to 255
smallint    | 2 bytes  -32768 to 32767                              0 to 65535
mediumint   | 3 bytes  -8388608 to 8388607                          0 to 16777215
int         | 4 bytes  -2147483648 to 2147483647                    0 to 4294967295
bigint      | 8 bytes  -9223372036854775808 to 9223372036854775807  0 to 18446744073709551615
*/
$field['f3']=[
    'label'=>'เลขจำนวนเต็ม (int)',// -2147483648 to 2147483647
    'datatype'=>'int',
];

$field['f4']=[
    'label'=>'เลขจำนวนเต็ม (tinyint unsigned)',// 0 to 255
    'datatype'=>'tinyint unsigned',
];

$form->addField($field);
$form->addObject(['type'=>'submit','value'=>'เพิ่มข้อมูล'],['type'=>'back']);
echo $form->create(); 
ผลลัพธ์