Skip to content

Commit

Permalink
🔨 improvement in field type
Browse files Browse the repository at this point in the history
  • Loading branch information
bjverde committed Mar 18, 2018
1 parent 64f98cf commit 36da9f7
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions classes/TCreateForm.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -164,8 +164,10 @@ private function addFieldType($key,$FieldName) {
break;
case 'TINYINT':
case 'INT':
$this->addLine('$frm->addNumberField(\''.$FieldName.'\', \''.$FieldName.'\',4,true,0);');
break;
case 'INTEGER':
case 'NUMERIC':
$this->addLine('$frm->addNumberField(\''.$FieldName.'\', \''.$FieldName.'\',4,'.$required.',0);');
break;
default:
$this->addLine('$frm->addTextField(\''.$FieldName.'\', \''.$FieldName.'\',50,'.$required.');');
}
Expand Down

0 comments on commit 36da9f7

Please sign in to comment.