You want to set the input’s type
to number for numeric validation.
And use the input’s value
to set a default value.
<input type="number" id="title" name="my_option_namePlugin option for input box validation" value=123 />
If you just want a hint displayed to the user inside the input, use placeholder
.
<input type="number" id="title" name="my_option_namePlugin option for input box validation" placeholder="Phone Number" />
Related Posts:
- add function to saving change on Options Pages
- How do you add a settings page to another menu?
- Upgrade 4.5.2 to 4.5.3 deleting row in wp_options table
- ‘Global’ settings page for multisite plugin
- How to add field for new site-wide option on Network Settings screen?
- Contact form 7 select box different value-text than content-text in option [closed]
- How to Add a Third Level Sub Menu to the WordPress Admin Menu
- Modifying a JS file with data from plugin settings
- Validation error: Extending Gutenberg gallery block
- Correct way to serialize the data of options table?
- Admin menu as submenu from another plugin
- Creating a WordPress admin page without a menu for a plugin
- Where should I use get_option in a plugin
- Inherit plugin settings to new site in Multisite
- Removing an admin page added by a 3rd party plugin. Gravity forms in this example
- How to tell if plugin has been network activated
- Is there a hook attached to general settings save?
- How to find out if option exists but is empty?
- Delete option doesn’t appear for plugins
- How do I sanitize a javascript text?
- How should I use register_setting, add_settings_section, & add_settings_field in my plugin’s options page?
- Adding an admin page – OOP approach not working
- Custom plugin settings: clicking “save changes” does not display success message
- Generate Advanced Custom Fields box in custom admin menu page
- Duplicate settings of master blog to slave blogs in WP multi-site installation
- Environment Specific Options Token
- Plugin development: how to create a form and get custom data?
- How do I extract the Alt Text from an image attachment upload via the WordPress Options Framework Plugin?
- Network-Wide Plugin Settings Management
- WordPress widget / plugin….fields not appearing in my widget
- How to create a Page alias in WordPress
- How to fetch serialized data from wordpress options
- Add custom meta box on Post page
- Validation Function for URL in plugin
- Master menu item for multiple plugins?
- Some Plugin Settings Are Kept After Removal and Reinstall of the Plugin
- Changing widget options via the functions.php when there are no hooks
- While Using Static Pages, How Can I Get /blog into the URL of Each Post?
- How to make a WP admin button/menu similar to Jetpack Notifications?
- wp_verify_nonce() why return false?
- Detecting when a custom taxonomy has been changed and display alert?
- Get all options saved by another plugin
- Sub menu with a URL parameter and access the page
- Removing WordPress Plugin Menu Item for a specific user
- Is it ok to call get_option without hooks?
- Stop the form of beign submitted on “Save changes” custom option page
- Enable/Disable WP options programmatically
- Custom options page checkbox will not save, despite working with text
- Settings API – input always updates over validation
- WooCommerce “Save Changes” button appears inside custom settings
- clean wp_options table unused rows
- How to set CORS header?
- Prepare plugin options for multi-lingual support
- Change the $parent_file of a plugin page
- Server side validation for Contact Form 7 [closed]
- Is there a reliable way to keep track of how long a WordPress theme has been active?
- Remove obsolete plugins artifacts from database tables
- reorder plugin menu position
- How do I remove the entire left nav bar in admin for certain level users?
- Restore a Plugin’s Default Settings
- add action wp_head not working
- Hide Theme options and Customize Admin menu
- How to debug register_setting callback function
- Why is the Settings API is not saving my array of options
- Creating a plugin that will add options. Where should the options menu pages go?
- Add get_option to jquery
- Assignments must be the first block of code on a line Validation Error on Travis
- update_user_meta add value on the top on existing value
- Can’t get plugin settings page to save data
- Default Plugin Settings Not Writing to Database
- Update Option Error: Notice: Undefined index
- Calling JavaScript file with Custom Plugin
- How to send little data between admin pages of my plugin?
- How do i save plugin-specific info?
- Set the active Navigation Menu from a plugin
- how can I link to a PlugIn admin-sub-menu page after processing a formular
- Serialize data for wp options
- How can I add an options page for my class based plugin?
- problems with wordpress and php version 5.3.3-1
- Why slash is removed after domain?
- Where does WordPress store plugin (enabled/disabled) status for multisite?
- How to add a default value to get_option if it’s used as a variable?
- White page on custom plugin option submit
- Make menu page link inaccessible or disabled
- WordPress get_option and update_option returned entered on the textbox field
- Get plugin option in another PHP file
- Create mobile navigation header with settings integration
- Image upload and other options in the same plugin settings form?
- New custom theme option (text input) giving index error
- Admin Theme customization
- How to get specific setting by settings_fields()?
- Can I use custom CSS and js plugin to put JavaScript in to validate my forms
- Add Plugin options as subpage to Theme options page
- changes to widget settings not showing up in individual pages pages until they’re updated [closed]
- Shrink down register_settings on Settings API
- Show admin notice on incorrect value on form field
- How to remove traces from widget during uninstallation
- Show existing POST categories as items in the sidebar menu [closed]
- Polylang : Interverting languages after development [closed]
- php page not found for plugin options menu