<?php
defined( 'ABSPATH' ) or die( 'Nope, not accessing this' );
function frontFormeventer($atts) {
$form = '';
extract($atts);
$cookievar = 'eventer'.$key;
$class='';
if (isset($_COOKIE[$cookievar])) 
{
   $class='disabled="disabled"';
}
ob_start();
$form='';
 $form .='<form name="eventer" id="eventer-front-form"><div class="eventermain"><ul class="form-style-1"><li><div id="thanksinfo"></div></li><input type="hidden" name="EventID" value="'.$key.'" class="field-long" />';
 if(isset($emailtext))
 $form .='<li> <label>'.$emailtext.':</label><input type="email" required name="emailAddress" class="field-long" /></li>';
  
  if(isset($locationtext))
  $form .='<li><label>'.$locationtext.':</label><input type="text"  required name="location" class="field-long" /></li>';
  $form .='<li>';
 if(isset($option1))
   $form .='<div class="option"><label>'.$option1.'</label><input type="checkbox" name="option1" value="1"  /></div>';   
   
    if(isset($option2))
   $form .='<div class="option"><label>'.$option2.'</label><input type="checkbox" name="option2" value="1"  /></div>';
    if(isset($option3))
   $form .='<div class="option"><label>'.$option3.'</label><input type="checkbox" name="option3" value="1"  /></div>';
    if(isset($option4))
   $form .='<div class="option"><label>'.$option4.'</label><input type="checkbox" name="option4" value="1"  /></div>';
    if(isset($option5))
   $form .='<div class="option"><label>'.$option5.'</label><input type="checkbox" name="option5" value="1"  /></div>';
   
     if(isset($option6))
   $form .='<div class="option"><label>'.$option6.'</label><input type="checkbox" name="option6" value="1"  /></div>';
   
  $form .='</li><li><input type="submit" '.$class.' id="eventersubmit" value="'.$buttontext.'" /><div class="loader" id="loader">
</div></li> </ul></div></form>';
echo  $form ;
$formdata = ob_get_contents();
ob_clean();
return $formdata;

 }