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?
- How to add field for new site-wide option on Network Settings screen?
- Modifying a JS file with data from plugin settings
- Correct way to serialize the data of options table?
- Where should I use get_option in a plugin
- Removing an admin page added by a 3rd party plugin. Gravity forms in this example
- How should I use register_setting, add_settings_section, & add_settings_field in my plugin’s options page?
- Custom plugin settings: clicking “save changes” does not display success message
- Duplicate settings of master blog to slave blogs in WP multi-site installation
- Environment Specific Options Token
- How do I extract the Alt Text from an image attachment upload via the WordPress Options Framework Plugin?
- How to fetch serialized data from wordpress options
- Validation Function for URL in plugin
- Master menu item for multiple plugins?
- Changing widget options via the functions.php when there are no hooks
- How to make a WP admin button/menu similar to Jetpack Notifications?
- wp_verify_nonce() why return false?
- Removing WordPress Plugin Menu Item for a specific user
- 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
- Remove obsolete plugins artifacts from database tables
- How do I remove the entire left nav bar in admin for certain level users?
- Creating a plugin that will add options. Where should the options menu pages go?
- Add get_option to jquery
- update_user_meta add value on the top on existing value
- Can’t get plugin settings page to save data
- Set the active Navigation Menu from a plugin
- how can I link to a PlugIn admin-sub-menu page after processing a formular
- problems with wordpress and php version 5.3.3-1
- Where does WordPress store plugin (enabled/disabled) status for multisite?
- Make menu page link inaccessible or disabled
- WordPress get_option and update_option returned entered on the textbox field
- Create mobile navigation header with settings integration
- Admin Theme customization
- changes to widget settings not showing up in individual pages pages until they’re updated [closed]
- Show admin notice on incorrect value on form field
- 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
- add tabs in rdp-plugin/includes/settings.php and get settings saved
- wp_editor content in plugin options page
- WP Plugins – Use includes to display page content
- Add ALT attribute to Pin It Button image to pass HTML5 validation
- Redirect to another page using contact form 7? [closed]
- How to use add_submenu_page() for editors?
- Update a core option from plugin settings page
- Move plugin-settings to ‘Settings’-menu in the admin
- update_option_{$option} not showing old value
- Can deactivating a plugin sometimes “reset” settings within that plugin?
- Plugin getting Cannot modify header information errors
- creating a plug in that would tap into save/update action of posts [closed]
- How to prevent plugins from sniffing/stealing other plugins’ options?
- Default plugin config to override wp_options?
- Why WP_Screeen doesn’t show all options with admin_body_class
- Plugin Admin Menu Boiler Plate
- Plugin – Admin menu page broken url
- Update WP option by plugin
- How (or where) do I get wordpress plugin update download link?
- Adding option values as an array using a multi selectable select box
- Store plugin page content in wp_options?
- Remove border attribute from Pin It Button image to pass HTML5 validation [closed]
- Custom page in plugin visible in menu
- Need to add/remove group of options and display them as rows
- How to get values from network settings panel?
- How to add a custom form to a plugin’s setting page
- update_option creates an option, which empties on a blog reload
- Using call_user_func() within add_settings_section() within a Class
- Save log for imports in WordPress database – options-table, custom post type or other place?
- how to show new field if option selected?
- Creating an array from form inputs before it is posted to the options database
- add menu page not showing Icon
- $_POST field value gets altered after “init”
- How to use third-party SendGrid Email Validation API in Gravity Forms?
- Custom Formdata matching with user table
- save short-code in my custom plugin settings problem missed something
- Plugin Options Page and Subpage
- save multi-select input using update_option for plugin
- Enable plugins that are “not supported”
- Admin Custom Login loses settings on Code and Data migration
- Protect WordPress option value
- Why is the WordPress update_option not working in this code?
- Options page textarea to populate custom post select field
- How to create a new database table whenever user changes options
- Conditional required fields for WordPress Contact Form 7
- get_option return incorrect values
- Create Array from data in the OPTIONS table
- Error when renaming option
- How can I pass value to function in add_menu_page?
- Plugin menu replaced by another plugin?
- ‘all’ hook and get_option issue
- How to find an option in the database?
- register_setting – validation callback weirdness
- How to programmatically detect how many posts are displayed per page?
- Plugin link does not appear in my toolbar
- selecting options from another form
- Need help saving input fields for Security Deposit plugin in WC Vendors page
- Multiple plugins settings of same developer into ONE settings page linked together