Example #1
0
/*
** this file is generting shortcode
*/
$mailchimp = dirname(__FILE__) . '/class.mailchimp.php';
include $mailchimp;
$mc = new clsMailchimp();
$arrList = $mc->getAccountLists();
if (!is_array($arrList)) {
    echo '<div class="error">' . __("You did not enter API Keys please enter your API Keys from Nmedia Mailchimp Setting area") . '</div>';
}
/*saving form */
if (isset($_POST['btn-form'])) {
    /*echo '<pre>';
    	print_r($_POST);
    	echo '</pre>';*/
    if (nmMailChimp::saveForm($_POST['form-name'], $_POST['form-detail'], $_POST['lid'], $_POST['chk-groups'], $_POST['chk-vars'])) {
    }
    echo '<div class="updated">Form saved</div>';
}
?>

<h2><?php 
_e('Form shortcode Wizard', 'nm_mailchimp_plugin');
?>
</h2>
<p><?php 
_e('This wizard will create shortcode based on your selected List, Groups and Vars, unlimited forms shortcodes can be genegrated. Once form shortcode is created you can simply put it in your Post/Page and even can put into widgets.', 'nm_mailchimp_plugin');
?>
</p>

<div id="shortcode-container">