Or, embed this snippet using GenerateWP WordPress Plugin.

Download

Clone

MailRelay News Form

With Odin Theme Options Class

// Add Shortcode
function news_sign_form( $atts ) {

	// Attributes
	extract( shortcode_atts(
		array(
			'class' => 'md-color',
		), $atts )
	);

	// Code
	$url_base = get_site_url().'/';
	$theme_opts = get_option( 'news_sign_tab' );
	$url_host = $theme_opts['news_host'];
	$news_ok = $url_base.$theme_opts['news_ok'];
	$news_er = $url_base.$theme_opts['news_er'];
	$news_act = $url_base.$theme_opts['news_act'];


$news_form = '<form class="news-form '.$class.'" enctype="application/x-www-form-urlencoded" action="http://'.$url_host.'/ccm/subscribe/index/form/" method="post">
	
	<input type="hidden" name="confirmationUrl" value="'.$news_act.'" />
	<input type="hidden" name="successUrl" value="'.$news_ok.'" />
	<input type="hidden" name="errorUrl" value="'.$news_er.'" />
	
	<div class="form-group col-sm-4">
		<label class="sr-only" for="name" class="required">Nome</label>
		<input class="form-control input-lg" tabindex="1" type="text" autocomplete="off" name="name" id="name" placeholder="'.__('Your Name', 'odin').'" required />
	</div>
	<div class="form-group col-sm-5">
		<label class="sr-only" for="email" class="required">Email</label>
		<input class="form-control input-lg" tabindex="2" type="email" autocomplete="off" name="email" id="email" placeholder="'.__('Your Email', 'odin').'"  required />
	</div>
	<div class="form-group col-sm-3">
		<input type="hidden" name="groups[]" value="1" />
		<button class="btn btn-default btn-lg btn-block" tabindex="3" type="submit" name="submit" id="submit">Cadastre-se <span></span></button>
	</div>
</form>';
return $news_form;
}
add_shortcode( 'news_sign', 'news_sign_form' );