Skip to content

Latest commit

 

History

History
41 lines (19 loc) · 1.89 KB

number-input.md

File metadata and controls

41 lines (19 loc) · 1.89 KB

Contentment for Umbraco logo

Contentment for Umbraco

Number Input

Number Input is a property-editor that is used to enter a numeric value.

How to configure the editor?

In your new Data Type, selected the "[Contentment] Text Input" option. You will see the following configuration fields.

Configuration Editor for Number Input

The first field is Numeric size, this is used to determine how big the number will get for the input. The size ranges from small, to extra large.

The next field is Placeholder text, which is used to add initial instructional information for the number input, this is not a default value.

For technical users, from a HTML5 perspective, this is the <input>'s placeholder attribute.

How to use the editor?

Once you have added the configured Data Type to your Document Type, the Number Input editor will be displayed on the content page's property panel.

Number Input property-editor

How to get the value?

The value for the Text Input is an int (integer).

Programmatically, you would access the value exactly the same as Umbraco's Numeric editor, see Umbraco's documentation for code snippet examples.

Further reading