Adding subscribe to custom form
-
Hi,
I am using ‘Ken’ theme, which has its own contact form, which i want to add a subscribe option to.
Ive added the snippet from the FAQ, though nothing is happening on my mailchimp.
The account is all synced and the list to add to is specified in the plugin settings.
The contact form looks like this currently
$skin_style .= ($style == 'modern') ? '' : $skin.'-skin '; $output .= '<div id="contact-form-'.$id.'" class="mk-contact-form-wrapper '.$style.'-style '.$skin_style.$el_class.'">'; $output .= ' <form class="mk-contact-form" method="post" novalidate="novalidate">'; $output .= ' <div class="mk-form-row"> '.$icon_user.' <input placeholder="'.$name_str.'" type="text" required="required" name="contact_name" class="text-input" value="" tabindex="'.$tabindex_1.'" /> </div>'; $output .= ' <div class="mk-form-row"> '.$icon_email.' <input placeholder="'.$email_str.'" type="email" required="required" name="contact_email" class="text-input" value="" tabindex="'.$tabindex_2.'" /> </div>'; if($phone == 'true'){ $output .= ' <div class="mk-form-row"> '.$icon_phone.' <input placeholder="'.$phone_str.'" type="text" name="contact_phone" class="text-input" value="" tabindex="'.$tabindex_3.'" /></div>'; } $output .= ' <textarea required="required" placeholder="'.$content_str.'" name="contact_content" class="mk-textarea" tabindex="'.$tabindex_4.'"></textarea>'; // CAPTCHA if($captcha == 'true') { $output .= '<div class="mk-form-row"> '.$icon_lock.' <input placeholder="'.$enter_captcha.'" type="text" name="captcha" class="captcha-form text-input full" required="required" autocomplete="off" /> <img src="'.THEME_DIR_URI.'/captcha/captcha.php" class="captcha-image" alt="captcha txt"> <a href="#" class="captcha-change-image">'.$not_readable.' '.$change_text.'</a> </div>'; } $output .= ' <label> <input type="checkbox" name="mc4wp-subscribe" value="1" /> Sign-up to our newsletter. </label> <div class="button-row"> <button tabindex="'.$tabindex_5.'" class="mk-progress-button mk-button outline-button medium" data-style="move-up"> <span class="mk-progress-button-content">'.$submit_str.'</span> <span class="mk-progress"> <span class="mk-progress-inner"></span> </span> <span class="state-success"><i class="mk-icon-check"></i></span> <span class="state-error"><i class="mk-icon-times"></i></span> </button> </div>'; $output .= ' <i class="mk-contact-loading mk-icon-refresh"></i>'; $output .= ' <i class="mk-contact-success mk-theme-icon-tick"></i>'; $output .= ' <input type="hidden" value="'.$email.'" name="contact_to"/>'; $output .= ' </form>'; $output .= ' <div class="clearboth"></div>'; $output .= '</div>'; $output .= $style_css; echo $output;
The topic ‘Adding subscribe to custom form’ is closed to new replies.