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 option to show additional field #13

Closed
dannyvankooten opened this issue Jan 29, 2015 · 1 comment
Closed

Add option to show additional field #13

dannyvankooten opened this issue Jan 29, 2015 · 1 comment

Comments

@dannyvankooten
Copy link
Member

Have users choose an extra field to show next to the email field (optional).

@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;
});

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