Adding hidden group
-
I’ve tried adapting the functions.php code below per the discussion on the website, but can’t seem to get it right.
// add hidden field to top bar
add_action( ‘mctb_before_submit_button’, function() {
echo ‘<input type=”hidden” name=”INTERESTS[3794ae7c19][]” value=”807ce58ff6″ />’;});
add_filter( ‘mctb_data’, function( $vars ) {
$vars[‘INTERESTS[3794ae7c19][]’] = ( isset( $_POST[‘INTERESTS[3794ae7c19][]’] ) ) ? sanitize_text_field( $_POST[‘INTERESTS[3794ae7c19][]’] ) : ”;
return $vars;
});
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
- The topic ‘Adding hidden group’ is closed to new replies.