Forum Replies Created

Viewing 1 replies (of 1 total)
  • I got this working on my bar by using the following. Hope it helps. Basically you have to add two actions, one for a field of first name, the second for the last name. Feel free to see it on my wife’s food blog at http://www.grabsomejoy.com

    add_action( ‘mctb_before_email_field’, function() {
    echo ‘<input type=”text” name=”FNAME” placeholder=”First Name” required>’;
    echo ‘<input type=”text” name=”LNAME” placeholder=”Last Name” required>’;

    });

    add_filter( ‘mctb_merge_vars’, function( $vars ) {
    $vars[‘FNAME’] = ( isset( $_POST[‘FNAME’] ) ) ? sanitize_text_field( $_POST[‘FNAME’] ) : ”;
    return $vars;
    });

    add_filter( ‘mctb_merge_vars’, function( $vars ) {
    $vars[‘LNAME’] = ( isset( $_POST[‘LNAME’] ) ) ? sanitize_text_field( $_POST[‘LNAME’] ) : ”;
    return $vars;
    });

Viewing 1 replies (of 1 total)