Validating Interest Groups
-
I’m creating Custom Form Validation using the example code below.
When I replace ‘some-field’ with a TEXT field it works however attempting to use an INTEREST GROUP VALUE it gives an error regardless what value is posted in the Form.
I’ve tried several variations of $_POST[‘INTERESTS[d8cc6bc082]’] !== ‘3af0a91e25’)
What is the correct Syntax for INTEREST GROUPS?
/** * Performs additional form validation on Mailchimp for WP forms * * @return array An array of error codes. */
function myprefix_validate_mc4wp_form($errors) { // perform validation here if( $_POST[‘some-field’] !== ‘expected-value’ ) { $errors[] = ‘incorrect_value’; } return $errors; }
add_filter(‘mc4wp_form_errors’, ‘myprefix_validate_mc4wp_form’);
The page I need help with: [log in to see the link]
The topic ‘Validating Interest Groups’ is closed to new replies.