top bar plugin FNAME mandatory field
-
Hello,
I added the below code to add the FNAME field to the top bar. How can I make this a mandatory field? Thank you in advance for all your help!!
add_action( ‘mctb_before_submit_button’, function() {
echo ‘<input type=”text” name=”NAME” placeholder=”Your name” />’;
});add_filter( ‘mctb_subscriber_data’, function( $subscriber ) {
if( ! empty( $_POST[‘NAME’] ) ) {
$subscriber->merge_fields[‘NAME’] = sanitize_text_field( $_POST[‘NAME’] );
}return $subscriber;
});The page I need help with: [log in to see the link]
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
- The topic ‘top bar plugin FNAME mandatory field’ is closed to new replies.