I'm generating this form using Settings API:
<form action="options.php" method="post">
<?php settings_fields('XX_theme_settings'); do_settings_sections('my_settings'); ?>
<input type="hidden" name="foo" value="bar" />
<input name="SubmitButton" type="submit" class="button-primary" value="<?php _e('Save Changes'); ?>" />
</form>
Validation callbacks $input array returns only 'my_settings' input fields.
How do I access foo
(bar
) input's value and submit button's name SubmitButton
?
This doesn't work for the hidden input:
my_validation($input) {
$foo = $input['foo'];
}
And when it comes to the submit button I don't even know where to start.