- Issue created by @kopeboy
- @kopeboy opened merge request.
Following my suggestion in 📌 Support decimals with new field type, widget and formatter Active , I noticed that it may be useful to store fractions for a more precise accounting of ownership shares, so I'm going to add another field type and corresponding autocomplete and select list widgets and label formatter that I hope can be included in the module (or sub-module).
The new "Entity reference w/fraction" field will have a fraction component instead of quantity, which is actually two parts, numerator and denominator, both tiny int unsigned, with additional field settings to set a maximum per field item and/or for the sum of items, as well as a checkbox to set equal values to all items automatically (if left empty but with a target_id). The formatter has a "Fraction separator" option which defaults to "/" to render num/den, on top of the usual position and template settings.
Active
2.0
Code