Number field
A numeric input with min/max bounds, step increments, optional thousands separators, and percentage formatting.
The Number field captures integer or decimal values with proper numeric semantics: the on-screen keyboard is numeric on mobile, paste only accepts numerics, and arrow keys step the value.
It binds to SharePoint's Number column type.
Common properties
| Property | Description |
|---|---|
labelstring | Visible label. |
descriptionstring | Helper text. |
placeholderstring | Greyed example text. |
requiredboolean default: false | Marks the field required. |
readOnlyboolean default: false | Disables editing. |
Type-specific properties
| Property | Description |
|---|---|
minnumber | Smallest allowed value. Inclusive. |
maxnumber | Largest allowed value. Inclusive. |
stepnumber default: 1 | Increment used by arrow keys and the up/down spinner. |
decimalsnumber default: 2 | Decimal places used when displaying the value. |
percentageboolean default: false | Format as a percentage: user types 15, stored as 0.15. |
thousandsSeparatorboolean default: true | Group thousands using the current locale separator. |
allowNegativeboolean default: true | Reject negative values when false. |
JavaScript recipes
Read & coerce the value
const qty = Number(f365.field('Quantity').value ?? 0);
Compute a derived total
f365.events.onChange('Quantity', () => updateTotal());
f365.events.onChange('UnitPrice', () => updateTotal());
function updateTotal() {
const qty = Number(f365.field('Quantity').value ?? 0);
const price = Number(f365.field('UnitPrice').value ?? 0);
f365.field('LineTotal').value = qty * price;
}
Range validation message
f365.field('DiscountPct').on('validate', (v) => {
if (v == null) return;
if (v < 0 || v > 30) return 'Discount must be between 0 and 30%.';
});
Related
Related articles
- Currency field
A money input with currency-symbol prefix, thousands separators, two-decimal rounding, and per-locale formatting.