Using $_POST
is too low level. Simply give it the same name as your other options. When you options are displayed they should have the names of the form: my_settings[a_particular_option]
. For instance:
<input name="my_settings[some_input_option]"/>
Then for your hidden input and submit button:
<input type="hiddden" name="my_settings[foo]" value="bar"/>
<input name="my_settings[SubmitButton]" type="submit" class="button-primary" value="<?php _e('Save Changes'); ?>"/>
In your validation array
my_validation($input) {
$foo = $input['foo'];
$submit = $input['SubmitButton'];
}
Related Posts:
- Validating input using java.util.Scanner
- What is the actual minimum length of an email address as defined by the IETF?
- How should one implement add_settings_error on custom menu pages?
- Server side validation
- Validate an option array
- Does wp_insert_post validate the input?
- WordPress oEmbed W3C Validation
- How to Remove novalidate attribute from comment form
- What is wp_check_invalid_utf8?
- Data Validation
- Stop the form of beign submitted on “Save changes” custom option page
- Persist fields with Setting API
- How to validate register settings array
- Data Validation: Always escape late / escape HTML Code
- Multiple register settings, with same option name – issue
- Inconsistent server code response using HTTP API
- wordpress site validation errors
- Data validation
- Settings API – sanitize_callback is not called and it leads to an incorrect behavior
- Best Practice for Validating and Sanitizing Data
- Does balanceTags() provide any escaping / protection?
- w3c validation problem – Twitter share button pulling content
- How to prevent options.php deleting valid existing data from the database
- Data sanitization for user registration and user login
- wp_remote_post – handling responses
- Prevent invalid or empty values from being saved to the database and retain the form field values upon error
- Show the submitted values in the form when validation fails
- What data sanitzation function should be used to store entire source code of webpage?
- protect user submitted posts
- Settings API validation callback
- Why the WP Core team does not allow filter_* functions? [closed]
- Flush rewrite rules on option update with Settings API
- confused about sanitize_email after is_email [duplicate]
- Require user to input code from an array of allowed codes with Gravity Forms [closed]
- Output Sanitation
- register_setting & add_settings_error validation issues with multiple fields
- How do I sanitize the str_replace function in javascript variables
- WordPress live, custom text box validation, how to?
- How to do more than one verify_nonce in one function?
- Verify Submitted Form Values and Show Warning Messages with Setting API
- W3C validation errors (trailing slashes)
- How to save Checkbox-Options in Plugin Options Page
- Jquery Validation Engine with Conatct Form 7
- Gravity Forms validate arrival and departure
- Why is my script’s regex having its backslash removed?
- Validation Always Tells There Is an Open DIV
- Settings api sanatize callback not being triggered
- How long does plugin review usually take?
- WP calendar summary attribute validation error
- Do I need to validate the nonce when using the settings api?
- Simple way to alert error messages in Javascript
- How can I validate an email address using a regular expression?
- Good input validation loop using cin – C++
- How can I validate an email address using a regular expression?
- Reactjs – Form input validation
- How to validate an email address in JavaScript
- XAML Binding Groups
- “Stray start tag footer” in html validator?
- A potentially dangerous Request.Form value was detected from the client
- WebForms UnobtrusiveValidationMode requires a ScriptResourceMapping for jquery
- Email validation using jQuery
- How to test valid UUID/GUID?
- what is a parse error and how do I fix it
- Server-side schema validation with JAX-WS
- How to validate date with format “mm/dd/yyyy” in JavaScript?
- Validating IPv4 addresses with regexp
- An invalid form control with name=” is not focusable
- Validate date in dd/mm/yyyy format using JQuery Validate
- How can I check if a string is a valid number?
- HTML5 Validation Error: body start tag seen but an element of the same type was already open
- How can I check if a single character appears in a string?
- What is jQuery Unobtrusive Validation?
- jQuery Form Validation before Ajax submit
- Contact Form 7 – Custom Validation
- How does the SQL injection from the “Bobby Tables” XKCD comic work?
- Hapi/Joi Validation: How to process text to a specific format
- What is the best Java email address validation method?
- Check if inputs are empty using jQuery
- ZIP Code (US Postal Code) validation
- A non well formed numeric value encountered
- validate textfield contents in wordpress simple job board plugin
- Settings API with arrays example
- Add multiple custom fields to the general settings page
- Settings API vs Theme Customizer
- “Error: Options Page Not Found” on Settings Page Submission for an OOP Plugin
- How to pass arguments from add_settings_field() to the callback function?
- Remove type attribute from script and style tags added by WordPress
- In Which Contexts are Plugins Responsible for Data Validation/Sanitization?
- Is get_option function cached?
- How to pass variable to add_settings_section() callback?
- don’t publish custom post type post if a meta data field isn’t valid
- What are the advantages to the Settings API?
- How to check if a string is a valid URL
- Custom Post Type Settings page, choose page to display archive
- Run function AFTER theme options are saved?
- Where to store plugin settings fields
- Trigger custom action when setting button pressed
- How can I save a multiple select array with the settings API for a plug-in options page?
- Sanitize and data validation with apply_filters() function
- Settings API in Multisite – Missing update message