Skip to content

Commit

Permalink
Use NumericField instead of TextFiled for BasePrice
Browse files Browse the repository at this point in the history
fixes #779
  • Loading branch information
wernerkrauss committed Dec 14, 2023
1 parent 97eb93d commit a445997
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/Page/Product.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
use SilverStripe\Forms\DropdownField;
use SilverStripe\Forms\FieldList;
use SilverStripe\Forms\ListboxField;
use SilverStripe\Forms\NumericField;
use SilverStripe\Forms\TextField;
use SilverStripe\ORM\DataList;
use SilverStripe\ORM\FieldType\DBBoolean;
Expand Down Expand Up @@ -169,7 +170,7 @@ function (FieldList $fields) use ($self) {
$fields->addFieldsToTab(
'Root.Pricing',
[
TextField::create('BasePrice', $this->fieldLabel('BasePrice'))
NumericField::create('BasePrice', $this->fieldLabel('BasePrice'))
->setDescription(_t(__CLASS__ . '.PriceDesc', 'Base price to sell this product at.'))
->setMaxLength(12),
]
Expand Down

0 comments on commit a445997

Please sign in to comment.