Closed (fixed)
Project:
Points
Component:
Code
Priority:
Normal
Category:
Feature request
Assigned:
Reporter:
Created:
5 Jun 2017 at 03:04 UTC
Updated:
23 Jun 2017 at 02:50 UTC
Jump to comment: Most recent, Most recent file
Currently, the number field is added via BaseFieldDefinition, which doesn't allow the field to be configurable. We need to use hook_entity_field_info() to make this field configurable, so site admin can put their basic validation or change the precision of the field. For more information, please see https://www.drupal.org/docs/8/api/entity-api/defining-and-using-content-...
| Comment | File | Size | Author |
|---|---|---|---|
| #9 | convert_the_number-2883735-8.patch | 4.35 KB | dravenk |
Comments
Comment #2
dravenkI've tried make points field configurable, but I can not finish it. I cant't change the precision of the field, but also can change the number of digits to the right of the points number.
Comment #3
dravenkMove the points fields from the point table to points.module file
Comment #4
dravenkComment #5
skyredwangThe points field added in this patch is still non-configurable on
/admin/structure/point_type/default/edit/fieldsComment #6
skyredwangAttached screenshot shows what we want to achieve here. We want the site builder to be able to edit he points field settings, but not to delete it.
Comment #7
skyredwangBelow is the conversion I had with @berdir, which offers a solution to #6:
Comment #8
dravenkDone it. thanks.
Comment #9
dravenkComment #10
skyredwangComment #11
skyredwangBelow is the same question I asked @bojanz, and his reply: