Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add optional name field. #38

Open
dannyvankooten opened this issue Sep 3, 2015 · 2 comments
Open

Add optional name field. #38

dannyvankooten opened this issue Sep 3, 2015 · 2 comments

Comments

@dannyvankooten
Copy link
Member

No description provided.

@dannyvankooten
Copy link
Member Author

09c2bb9 adds a few filters that make it possible to add more fields to the bar programmatically.

Example

add_action( 'mctb_before_submit_button', function() {
    echo '<input type="text" name="NAME" placeholder="Your name" />';
});

add_filter( 'mctb_merge_vars', function( $vars ) {
    $vars['NAME'] = ( isset( $_POST['name'] ) ) ? $_POST['name'] : '';
    return $vars;
});

@dannyvankooten
Copy link
Member Author

Duplicate of #13

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant