{"id":78,"date":"2025-11-04T20:51:24","date_gmt":"2025-11-04T20:51:24","guid":{"rendered":"https:\/\/jaedpro.com\/wp-react-panel\/?post_type=docs&#038;p=78"},"modified":"2025-11-04T21:02:07","modified_gmt":"2025-11-04T21:02:07","password":"","slug":"field-type-number","status":"publish","type":"docs","link":"https:\/\/jaedpro.com\/wp-react-panel\/docs\/field-type-number\/","title":{"rendered":"Field Type: Number"},"content":{"rendered":"\n<p>A numeric input field with browser validation for entering integers or decimal numbers.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Example Usage<\/h3>\n\n\n\n<div class=\"betterdocs-code-snippet-wrapper theme-light betterdocs-code-snippet-787cc0eb\"\n     id=\"betterdocs-code-snippet-787cc0eb\"\n     data-language=\"php\"\n     data-copy-button=\"true\">\n\n            <div class=\"betterdocs-code-snippet-header betterdocs-file-preview-header\">\n        <div class=\"betterdocs-file-preview-left\">\n                            <div class=\"betterdocs-traffic-lights\">\n                    <span class=\"traffic-light traffic-light-red\"><\/span>\n                    <span class=\"traffic-light traffic-light-yellow\"><\/span>\n                    <span class=\"traffic-light traffic-light-green\"><\/span>\n                <\/div>\n            \n            <div class=\"betterdocs-file-info\">\n                \n                                    <div class=\"betterdocs-file-name\">\n                        <span class=\"file-name-text\">sample-plugin.php<\/span>\n                    <\/div>\n                            <\/div>\n        <\/div>\n\n        <div class=\"betterdocs-file-preview-right\">\n                            <div class=\"betterdocs-code-snippet-copy-container\">\n                    <button class=\"betterdocs-code-snippet-copy-button\"\n                            type=\"button\"\n                            data-clipboard-target=\"#betterdocs-code-snippet-787cc0eb .betterdocs-code-snippet-code code\"\n                            aria-label=\"Copy code to clipboard\">\n                        <svg width=\"16\" height=\"16\" viewBox=\"0 0 24 24\" fill=\"none\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\">\n                            <path d=\"M16 1H4C2.9 1 2 1.9 2 3V17H4V3H16V1ZM19 5H8C6.9 5 6 5.9 6 7V21C6 22.1 6.9 23 8 23H19C20.1 23 21 22.1 21 21V7C21 5.9 20.1 5 19 5ZM19 21H8V7H19V21Z\" fill=\"currentColor\"\/>\n                        <\/svg>\n                    <\/button>\n                                    <\/div>\n                    <\/div>\n        <\/div>\n    \n    <div class=\"betterdocs-code-snippet-content\">\n        \n        <pre class=\"betterdocs-code-snippet-code language-php\"><code>array(\n\t&#039;id&#039;          =&gt; &#039;max_users&#039;,\n\t&#039;title&#039;       =&gt; &#039;Maximum Users&#039;,\n\t&#039;desc&#039;        =&gt; &#039;Set the maximum number of concurrent users allowed&#039;,\n\t&#039;type&#039;        =&gt; &#039;number&#039;,\n\t&#039;placeholder&#039; =&gt; 100,\n\t&#039;default&#039;     =&gt; 50,\n\t&#039;value&#039;       =&gt; get_option( &#039;max_users&#039; ),\n),<\/code><\/pre>\n    <\/div>\n<\/div>\n\n<script type=\"text\/javascript\">\ndocument.addEventListener('DOMContentLoaded', function() {\n    \/\/ Initialize copy functionality for this specific snippet\n    const snippet = document.getElementById('betterdocs-code-snippet-787cc0eb');\n    if (snippet && window.BetterDocsCodeSnippet) {\n        window.BetterDocsCodeSnippet.initCopyButton(snippet);\n    }\n});\n<\/script>\n\n\n\n<h3 class=\"wp-block-heading\">Properties<\/h3>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>id<\/strong> (required) &#8211; Unique identifier for the field<\/li>\n\n\n\n<li><strong>title<\/strong> (required) &#8211; Label displayed above the field<\/li>\n\n\n\n<li><strong>desc<\/strong> (optional) &#8211; Help text shown below the field<\/li>\n\n\n\n<li><strong>type<\/strong> (required) &#8211; Must be <code>'number'<\/code><\/li>\n\n\n\n<li><strong>placeholder<\/strong> (optional) &#8211; Placeholder number shown when field is empty<\/li>\n\n\n\n<li><strong>default<\/strong> (optional) &#8211; Default numeric value<\/li>\n\n\n\n<li><strong>value<\/strong> (optional) &#8211; Current saved value<\/li>\n<\/ul>\n\n\n\n<h3 class=\"wp-block-heading\">Notes<\/h3>\n\n\n\n<p>Browser validation automatically prevents non-numeric input. Mobile devices will display a numeric keyboard for easier input.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>A numeric input field with browser validation for entering integers or decimal numbers. Example Usage Properties Notes Browser validation automatically prevents non-numeric input. Mobile devices will display a numeric keyboard for easier input.<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"closed","template":"","meta":{"footnotes":""},"doc_category":[4],"doc_tag":[],"class_list":["post-78","docs","type-docs","status-publish","hentry","doc_category-field-types"],"blocksy_meta":[],"year_month":"2026-05","word_count":86,"total_views":0,"reactions":{"happy":0,"normal":0,"sad":0},"author_info":{"name":"Jaed Mosharraf","author_nicename":"jaedm97","author_url":"https:\/\/jaedpro.com\/wp-react-panel\/author\/jaedm97\/"},"doc_category_info":[{"term_name":"Field Types","term_url":"https:\/\/jaedpro.com\/wp-react-panel\/docs-category\/field-types\/"}],"doc_tag_info":[],"_links":{"self":[{"href":"https:\/\/jaedpro.com\/wp-react-panel\/wp-json\/wp\/v2\/docs\/78","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/jaedpro.com\/wp-react-panel\/wp-json\/wp\/v2\/docs"}],"about":[{"href":"https:\/\/jaedpro.com\/wp-react-panel\/wp-json\/wp\/v2\/types\/docs"}],"author":[{"embeddable":true,"href":"https:\/\/jaedpro.com\/wp-react-panel\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/jaedpro.com\/wp-react-panel\/wp-json\/wp\/v2\/comments?post=78"}],"version-history":[{"count":4,"href":"https:\/\/jaedpro.com\/wp-react-panel\/wp-json\/wp\/v2\/docs\/78\/revisions"}],"predecessor-version":[{"id":100,"href":"https:\/\/jaedpro.com\/wp-react-panel\/wp-json\/wp\/v2\/docs\/78\/revisions\/100"}],"wp:attachment":[{"href":"https:\/\/jaedpro.com\/wp-react-panel\/wp-json\/wp\/v2\/media?parent=78"}],"wp:term":[{"taxonomy":"doc_category","embeddable":true,"href":"https:\/\/jaedpro.com\/wp-react-panel\/wp-json\/wp\/v2\/doc_category?post=78"},{"taxonomy":"doc_tag","embeddable":true,"href":"https:\/\/jaedpro.com\/wp-react-panel\/wp-json\/wp\/v2\/doc_tag?post=78"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}