Your code just outputs empty checkboxes. You have to check each box’s value and then set checked="checked"
if it’s true.
<td><input type="checkbox" placeholder="Meta Key" name="map_option_3"
<?php // check whether map_option_3 was saved
if(isset(get_option('map_option_3'))) { ?>checked="checked"<?php } ?>
/>Name<br>
<input type="checkbox" id="cb_name" name="map_option_4"
<?php // check whether map_option_4 was saved
if(isset(get_option('map_option_4'))) { ?>checked="checked"<?php } ?>
/>Price<br><input type="text" name="metakey" id="metakey" placeholder="Meta Key"></td>
You should also make name and price into actual form labels, not just plain text beside the boxes. 🙂
Related Posts:
- How to find out if option exists but is empty?
- Custom plugin settings: clicking “save changes” does not display success message
- How to fetch serialized data from wordpress options
- Get all options saved by another plugin
- add action wp_head not working
- Why is the Settings API is not saving my array of options
- Default Plugin Settings Not Writing to Database
- Update Option Error: Notice: Undefined index
- Serialize data for wp options
- How can I add an options page for my class based plugin?
- Get plugin option in another PHP file
- How to get specific setting by settings_fields()?
- Add Plugin options as subpage to Theme options page
- php page not found for plugin options menu
- add tabs in rdp-plugin/includes/settings.php and get settings saved
- Redirect to another page using contact form 7? [closed]
- WordPress error: Options page Setting_ not found in the allowed options list
- Can I use register_settings and unregister_setting once the settings page has loaded?
- update_option_{$option} not showing old value
- How to prevent plugins from sniffing/stealing other plugins’ options?
- get_option / wp_localize_script Not Working in OOP Plug In
- Need to add/remove group of options and display them as rows
- How to get values from network settings panel?
- How to make sure settings are not lost when plugin is updated?
- wp_options not returning value for logged out users?
- How to save Setting pages data to the database?
- Problem with MEMCACHE and Redis with wp_options
- Plugin Options Page and Subpage
- How to save the option’s new values plus old value without overwrite old one
- Echo custom admin field into a is_single()
- Protect WordPress option value
- WordPress Boilerplate Plugin doesn’t see callback functions for add_settings_field and add_settings_section
- How do I add a textarea (multirow) option to my WordPress plugin?
- Why is the WordPress update_option not working in this code?
- How to create a new database table whenever user changes options
- Create Array from data in the OPTIONS table
- Validating values using Settings API?
- Saving an array to get_options
- Building a simple “settings” plugin to change textstrings on the home page
- My first plugin doesn’t save the data in options
- How to access values from your own settings page in javascript?
- move setting data from wordpress api to codestar freamwork
- Update plugin from personal API
- Symlinked plugin directory doesn’t appear in Admin
- How can I limit functionality in one version of a plugin?
- How can I include a setting that has a variable number of values in a settings page using register_setting?
- Custom data-id wp_enqueue_script
- Settings API – input always updates over validation
- How use %like% in sql statement wordpress
- Can I use a form in a dashboard widget?
- Is there a way to alter the order in which the plugins appear in the page?
- How to ‘clone’ a wp plugin to make small changes
- Why slash is removed after domain?
- MITM risk of not sanitizing?
- Get IDs of Images from Gallery Block in InnerBlocks of a Custom Gutenberg Block
- Change plugin main file name (that is currently in the repo)
- Edit Yoast SEO breadcrumbs output [closed]
- Enqueue WordPress plugin scripts below all other JS
- Is there any kind of theme on WordPress to sell my own movies?
- Suggestions on Approach to New Plugin I’m Stuck On
- How to redirect users to their profile after they successfully edit their profile
- Insert Array in Plugin Database
- What is wordpress way to access a plugin’s classes/models to load custom post type data?
- plugin wraps the entire content
- Shortcode Attributes to Return different $_POST
- How does translation (gettext) work for translating config file of plugin?
- How programatically cause uploads folder to be created?
- using wp_footer hook in a plugin
- Want to create custom design of progress indicator in wpforms
- Using Class loader in WordPress boilerplate
- How to prepare (compress/zip) a plugin to enable updating instead of adding new instance?
- WC Fix Attributes – ‘Add New’ Not Searchable/Delayed
- How to dynamically add template in Innerblock?
- Add style to body based on url
- $wpdb->insert not working inside save_post tag
- How to check for already existing plugin versions on activation? and prevent errors
- update_post_meta is not working for me when I use e.preventDefault for update button
- How to create a plugin with automatic update?
- How to call a function from inside class to outside class
- Plugin management with my custom plugin
- WP Plugin CSS not being applied to page
- Overwriting Plugin’s Ajax callback function from theme
- How can I get the Post ID and Post Type within a Must Use Plugin?
- Unable to sync woocommerce variations
- Can’t find variable is_single in my jQuery plugin
- WordPress Cron function is not working
- get_option returning old value for non-admin users
- Adding custom cron_schedule prior to wp_schedule_event
- homepage olderposts link showing page not found
- Get page type to display content
- Widget redirecting to home page
- Capturing POST data
- Is an Office a custom post type [closed]
- How to add image for custom taxonomy
- I am using multi image metabox plugin but I did get how to display the images in templete?
- How to open author url linked to a new tab in settings page in the WordPress plugin list
- How can I properly sanitize the update_option in WordPress?
- Why is my menu page not being displayed?
- Function not being called on form submit, only blank admin-post.php page
- How to give specific class name to category in wordpress with code snippets