

		
	<link rel="stylesheet" href="https://condoprodata.com/wp-content/plugins/easy-form-builder-by-bitware/dist/bootstrap.css">
	<link rel="stylesheet" href="https://condoprodata.com/wp-content/plugins/easy-form-builder-by-bitware/dist/bootstrap-theme.css">
	<link rel="stylesheet" href="https://condoprodata.com/wp-content/plugins/easy-form-builder-by-bitware/vendor/css/vendor.css">
	<link rel="stylesheet" href="https://condoprodata.com/wp-content/plugins/easy-form-builder-by-bitware/dist/formbuilder.css">
	<link rel="stylesheet" href="https://condoprodata.com/wp-content/plugins/easy-form-builder-by-bitware/dist/fontAwesomeMin.css">
	<link rel="stylesheet" href="https://condoprodata.com/wp-content/plugins/easy-form-builder-by-bitware/signaturepad/assets/jquery.signaturepad.css">
	<link rel="stylesheet" href="https://condoprodata.com/wp-content/plugins/easy-form-builder-by-bitware/dist/bootstrapValidator.min.css">
	<link rel="stylesheet" href="https://condoprodata.com/wp-content/plugins/easy-form-builder-by-bitware/dist/slider.css">
	<link rel="stylesheet" href="https://condoprodata.com/wp-content/plugins/easy-form-builder-by-bitware/dist/toggle.css">
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/font-awesome/4.5.0/css/font-awesome.min.css">	
  <style>
  * {
    box-sizing: border-box;
  }

  body {
    background-color: #444;
    font-family: sans-serif;
  }

  .fb-main {
    background-color: #fff;
    border-radius: 5px;
    min-height: 600px;
  }

  input[type=text] {
    height: 26px;
    margin-bottom: 3px;
  }

  select {
    margin-bottom: 5px;
    font-size: 40px;
  }

.view-main {
    background-color: #fff;
    border-radius: 5px;
    width: 100%;
    float: left;
  }
  
#ViewForm .subtemplate-wrapper {
  border: 1px solid #ccc;
  float: left;
  margin: 4px 0;
  padding: 10px;
  width: 100%;
}
#ViewForm   .toggle_button {
  float: right;
  width: auto;
}
#ViewForm .help-block { 
  display: block; 
}

.radio{ width:10% !important; display: inline; }

/* form align csss*/
.right_label .subtemplate-wrapper label:first-child {
    display: inline !important;
    float: left;
    margin-left: 10%;
}

.left_label .subtemplate-wrapper label:first-child {
    display: inline !important;
    float: left;
    margin-right: 10%;
}
/*11022015*/
.table.table-hover.table-responsive.formListing {
	margin: 0px auto;
	width: 80%;
	border-radius: 50px;
}
/*end form align css */
  </style>
  
	<style>
			.fb-button{display:inline-block;margin:0;padding:.563rem .844rem;border:0 none;background:#0073AA !important;color:#fff;text-align:center;text-decoration:none;font-size:12px;line-height:1.5;cursor:pointer;border-radius:.125rem;border:thin solid #0073AA !important;border-bottom:2px solid#0073AA !important;}
			.fb-button{border-bottom:2px solid #0073AA !important;background:#0073AA !important;}
			.view-button{border-bottom:2px solid #0073AA !important;background:#0073AA !important}
			.create_forms{padding:5px;boder-color:#19b394 #19b394 #0073AA !important;}
			.create-popupDesign{padding:5px;boder-color:#19b394 #19b394 #0073AA !important;}
			.create-popupDesign{	margin-left:10%;	margin-bottom:10px;	padding:5px;boder-color:#19b394 #19b394 #0073AA !important;	background-color: #0073AA !important;	color:#fff ;}
			.Bt-style{min-width:100px; background-color: #0073AA !important; color:white;}
			.create-inno-frm{color:#0073AA !important; font-size: 2em;  height: auto;  margin: 20px 0;  width: 100%;} 
			.create_forms{margin-bottom:10px;padding:5px;boder-color:#19b394 #19b394#0073AA !important;background-color:#0073AA !important;color:#fff ;}
			.DropDownBoxStyle{Width:80px;Color:white;background-color:#0073AA !important;font-size:16px;}
			.chooseThemeStyle{ color:#0073AA !important;}
			.fb-tabs li.active a { background:#0073AA !important;color: #fff;}
			.fb-button:hover {  background: #0073AA !important none repeat scroll 0 0;color: #fff;text-decoration: none;}
			
			/*Popup css*/
			 .modal-header {  background-color: #0073AA;  border-radius: 5px 5px 0 0;  color: #fff;}
			 .modal-header button.close {   color: #fff;   opacity: 0.8; }
			 .modal-content {  border: 2px solid #0073AA;  float: left;  width: 100%;}
			 .view-form-header { border-bottom: 2px solid #0073AA;}
			
	</style> 
	
	    		

<div style="display: block;" id="main_container2" class="container" style="z-index:0px !important;">
<div class="modal-content"  style="width:85%;">
<div class="modal-body">
           <div style="margin-top:1%;" class="view-main row">
		
			<div style="background-color:white;" class="col-md-12" id="ViewForm">
			  <div class="group-error col-md-12"></div>		
			  <form data-toggle="validator" role="form" method="post" onsubmit="submit_form_data(); return false;" id="showform"  enctype="multipart/form-data"></form> 
			  </div>
		  </div>
	  </div>
   </div> </div><script>
	
	var payLoadData="{\"fields\":[{\"field_type\":\"Name\",\"label\":\"NAME\",\"required\":true,\"field_options\":{\"READONLY\":false,\"name\":\"Normal\",\"visibility\":\"visible\"},\"cid\":\"c2\"},{\"field_type\":\"email\",\"label\":\"EMAIL\",\"required\":true,\"field_options\":{\"READONLY\":false,\"visibility\":\"visible\"},\"cid\":\"c23\"},{\"field_type\":\"phone\",\"label\":\"PHONE\",\"required\":false,\"field_options\":{\"READONLY\":false,\"phone\":\"International\",\"visibility\":\"visible\"},\"cid\":\"c6\"},{\"field_type\":\"paragraph\",\"label\":\"COMMENTS\",\"required\":true,\"field_options\":{\"READONLY\":false,\"size\":\"small\",\"visibility\":\"visible\",\"min_max_length_units\":\"characters\"},\"cid\":\"c14\"},{\"field_type\":\"checkboxes\",\"label\":\"CHECKBOXES\",\"required\":true,\"field_options\":{\"READONLY\":false,\"options\":[{\"label\":\"This is a legitimate request for information\",\"checked\":false}],\"visibility\":\"visible\",\"checkbox\":\"one_column\"},\"cid\":\"c32\"}]}";
	elemntObj=JSON.parse("{\"rule1\":[]}");
	var Formjson=JSON.parse("{\"forms\":[{\"field_options\":{\"form_title\":\"Email Request\",\"form_description\":\"Please send us your inquiry\",\"submitconfirm\":\"Your message has been sent\",\"redirecturl\":\"\",\"includejs\":\"\"}}]}");
	var form_id="1470777147";
		var user_id="0";
		
	</script>
		<script>
	var captchaStatus=false;
	var FileUploadStatus=false;
	var secretKey=0;
/* File uploading validation */
function checkExtensions(oInput,_validFileExtensions){

 var _validFileExtensions_Array= _validFileExtensions.split(',');
            var sFileName;
            if(oInput.multiple==true){
              var blnValid =false;
                for (var i=0; i<oInput.files.length; i++) {
                   sFileName = oInput.files[i].name;
                   
                    for (var j = 0; j < _validFileExtensions_Array.length; j++) {
                        var sCurExtension = _validFileExtensions_Array[j];
                        if (sFileName.substr(sFileName.length - sCurExtension.length, sCurExtension.length).toLowerCase() == sCurExtension.toLowerCase()) {
                            blnValid = true;
                            break;
                        }
                    }
                    
                }
                if (!blnValid) {
                    alert("Sorry, " + sFileName + " is invalid, allowed extensions are: " + _validFileExtensions_Array.join(", "));
                    oInput.value="";
                    return false;
                }
                return true;
            }
            else{
                sFileName = oInput.value;
            }
            if (sFileName.length > 0) {
                var blnValid = false;
                for (var j = 0; j < _validFileExtensions_Array.length; j++) {
                    var sCurExtension = _validFileExtensions_Array[j];
                    if (sFileName.substr(sFileName.length - sCurExtension.length, sCurExtension.length).toLowerCase() == sCurExtension.toLowerCase()) {
                        blnValid = true;
                        break;
                    }
                }
                
                if (!blnValid) {
                    alert("Sorry, " + sFileName + " is invalid, allowed extensions are: " + _validFileExtensions_Array.join(", "));
                    oInput.value="";
                    return false;
                }
            }
      return true;
}

function checkExtensions2(oInput,_validFileExtensions){
 //   alert("called 2");
 var _validFileExtensions_Array= _validFileExtensions.split(',');
        var sFileName;
          if(oInput.multiple==true){
      var blnValid =false;
        for (var i=0; i<oInput.files.length; i++) {
            sFileName = oInput.files[i].name;
            
            for (var j = 0; j < _validFileExtensions_Array.length; j++) {
                var sCurExtension = _validFileExtensions_Array[j];
                if (sFileName.substr(sFileName.length - sCurExtension.length, sCurExtension.length).toLowerCase() == sCurExtension.toLowerCase()) {
                    blnValid = true;
                    break;
                }
            }
        }
        if (blnValid) {
            alert("Sorry, " + sFileName + " is blocked, blocked extensions are: " + _validFileExtensions_Array.join(", "));
            oInput.value="";
            return false;
        }
        return true;
  
  }
     else{
     sFileName = oInput.value;
     }
            if (sFileName.length > 0) {
                var blnValid = false;
                for (var j = 0; j < _validFileExtensions_Array.length; j++) {
                    var sCurExtension = _validFileExtensions_Array[j];
                    if (sFileName.substr(sFileName.length - sCurExtension.length, sCurExtension.length).toLowerCase() == sCurExtension.toLowerCase()) {
                        blnValid = true;
                        break;
                    }
                }
                
                if (blnValid) {
                    alert("Sorry, " + sFileName + " is blocked, blocked extensions are: " + _validFileExtensions_Array.join(", "));
                    oInput.value="";
                    return false;
                }
        else{
        
              }
            }
            
      return true;
}
  function checkTotalFiles(oInput,totalFiles){
      var totalFilesSelected=oInput.files.length;
     
      if(totalFilesSelected>totalFiles){
          oInput.value="";
          alert("You cannot select more than "+ totalFiles +" files.");
          return false;
      }
      return true;
  }
  function checkFileSize(oInput,fileSizeLimit){
      var fileSize=0;
              if(oInput.multiple==true){
                  for (var i=0; i<oInput.files.length; i++) {
                      fileSize = oInput.files[i].size;
                      if(fileSize>fileSizeLimit*1024*1024){
                          oInput.value="";
                          alert("Files cannot be greater than "+ fileSizeLimit +" MB.");
                          return false;
                          
                      }
                  }
              }
              else{
                  fileSize = oInput.files[0].size;
                 // alert(oInput.files[0].size);
                  if(fileSize>fileSizeLimit*1024*1024){
                      oInput.value="";
                      alert("File cannot be greater than "+ fileSizeLimit +" MB.");
                      return false;
                      
                  }
              }
  }
/* END uploading file*/
	var signatureStatus=false;
    function renderForm(){

       // Logic builder enable disable element
	  
        if(jQuery.isEmptyObject(elemntObj)){
          elemntObj='{"rule1":[]}';
          elemntObj=JSON.parse(elemntObj);
        } 

      console.log("logic json"+JSON.stringify(elemntObj));
      // End Logic builder enable disable element

     
        // if payLoadData is empty
        if(payLoadData=="")
        payLoadData='{"fields":[]}';

        var text = payLoadData;
        obj = JSON.parse(text);
        var flist = [];
  
        var countryjson=["Afghanistan","Albania","Algeria","Andorra","Angola","Anguilla","Antigua &amp; Barbuda","Argentina","Armenia","Aruba","Australia","Austria","Azerbaijan","Bahamas","Bahrain","Bangladesh","Barbados","Belarus","Belgium","Belize","Benin","Bermuda","Bhutan","Bolivia","Bosnia &amp; Herzegovina","Botswana","Brazil","British Virgin Islands","Brunei","Bulgaria","Burkina Faso","Burundi","Cambodia","Cameroon","Cape Verde","Cayman Islands","Chad","Chile","China","Colombia","Congo","Cook Islands","Costa Rica","Cote D Ivoire","Croatia","Cruise Ship","Cuba","Cyprus","Czech Republic","Denmark","Djibouti","Dominica","Dominican Republic","Ecuador","Egypt","El Salvador","Equatorial Guinea","Estonia","Ethiopia","Falkland Islands","Faroe Islands","Fiji","Finland","France","French Polynesia","French West Indies","Gabon","Gambia","Georgia","Germany","Ghana","Gibraltar","Greece","Greenland","Grenada","Guam","Guatemala","Guernsey","Guinea","Guinea Bissau","Guyana","Haiti","Honduras","Hong Kong","Hungary","Iceland","India","Indonesia","Iran","Iraq","Ireland","Isle of Man","Israel","Italy","Jamaica","Japan","Jersey","Jordan","Kazakhstan","Kenya","Kuwait","Kyrgyz Republic","Laos","Latvia","Lebanon","Lesotho","Liberia","Libya","Liechtenstein","Lithuania","Luxembourg","Macau","Macedonia","Madagascar","Malawi","Malaysia","Maldives","Mali","Malta","Mauritania","Mauritius","Mexico","Moldova","Monaco","Mongolia","Montenegro","Montserrat","Morocco","Mozambique","Namibia","Nepal","Netherlands","Netherlands Antilles","New Caledonia","New Zealand","Nicaragua","Niger","Nigeria","Norway","Oman","Pakistan","Palestine","Panama","Papua New Guinea","Paraguay","Peru","Philippines","Poland","Portugal","Puerto Rico","Qatar","Reunion","Romania","Russia","Rwanda","Saint Pierre &amp; Miquelon","Samoa","San Marino","Satellite","Saudi Arabia","Senegal","Serbia","Seychelles","Sierra Leone","Singapore","Slovakia","Slovenia","South Africa","South Korea","Spain","Sri Lanka","St Kitts &amp; Nevis","St Lucia","St Vincent","St. Lucia","Sudan","Suriname","Swaziland","Sweden","Switzerland","Syria","Taiwan","Tajikistan","Tanzania","Thailand","Timor L'Este","Togo","Tonga","Trinidad &amp; Tobago","Tunisia","Turkey","Turkmenistan","Turks &amp; Caicos","Uganda","Ukraine","United States","United Arab Emirates","United Kingdom","Uruguay","Uzbekistan","Venezuela","Vietnam","Virgin Islands (US)","Yemen","Zambia","Zimbabwe"];

        var setLabelClass="";
		
		document.getElementById("showform").innerHTML='<div class="view-form-header"><i class="fa fa-file-text margin-0"></i>  <strong>'+Formjson.forms[0].field_options.form_title+'</strong><p class="view-form-description margin-0">'+Formjson.forms[0].field_options.form_description+'</p></div>';
        for(var i = 0; i < obj.fields.length; i += 1){
            var requiredHtml="";
            var requiredElement="";

            // Common Required
            if(obj.fields[i].required==true){ requiredHtml='<abbr title="required">*</abbr>'; requiredElement=" required "; }
			   // Common Read only
            if(obj.fields[i].field_options.READONLY==true){ requiredElement +=" readonly "; }
            // Common element ID
            var elementId="id='rend"+obj.fields[i].cid+"'";
            var logicId="id='logic"+obj.fields[i].cid+"'";

            var setlogicBuilderFun="";
             var visibleHtml="";
             if(obj.fields[i].field_options.visibility!="visible"){ visibleHtml='hiddenClass'; }

             var statusShow="",title=firstname=lastname=middlename="";
             var SecondFieldFun=HourFormatFun=bothFun=selectampm="";
             var addressFun=address2Fun=cityFun=stateFun=zipFun=countryFun=""; 
                  var titleFun=firstFun=middleFun=lastFun=""; 
                  var addressArr=['address','address2','city','state','zip','country'];

            for(var j=0; j<elemntObj.rule1.length;j++){
                  
                  if(elemntObj.rule1[j]['fromid']==obj.fields[i].cid){
                      
                     // alert(elemntObj.rule1[j]['selectelm']+" "+j );
                      //title
                      if(elemntObj.rule1[j]['selectelm']=="title"){

                        titleFun="setlogicBuilderFun('"+elemntObj.rule1[j]['fromid']+"','"+elemntObj.rule1[j]['selectelm']+"');";
                      }

                     if(elemntObj.rule1[j]['selectelm']=="firstname"){
                        //firstname
                        firstFun="setlogicBuilderFun('"+elemntObj.rule1[j]['fromid']+"','"+elemntObj.rule1[j]['selectelm']+"')";
                      }

                       if(elemntObj.rule1[j]['selectelm']=="middlename"){
                        //middlename
                          middleFun="setlogicBuilderFun('"+elemntObj.rule1[j]['fromid']+"','"+elemntObj.rule1[j]['selectelm']+"');";
                      }

                      if(elemntObj.rule1[j]['selectelm']=="lastname"){
                        //lastname
                        lastFun="setlogicBuilderFun('"+elemntObj.rule1[j]['fromid']+"','"+elemntObj.rule1[j]['selectelm']+"');";
                      }

                      //time SecondField
                      if(elemntObj.rule1[j]['selectelm']=="SecondField"){
                        //SecondField
                        SecondFieldFun="setlogicBuilderFun('"+elemntObj.rule1[j]['fromid']+"','"+elemntObj.rule1[j]['selectelm']+"');";
                      }

                      //time HourFormat
                      if(elemntObj.rule1[j]['selectelm']=="HourFormat"){
                        //HourFormat
                        HourFormatFun="setlogicBuilderFun('"+elemntObj.rule1[j]['fromid']+"','"+elemntObj.rule1[j]['selectelm']+"');";
                      }

                      //time both
                      if(elemntObj.rule1[j]['selectelm']=="both"){
                        //both
                        bothFun="setlogicBuilderFun('"+elemntObj.rule1[j]['fromid']+"','"+elemntObj.rule1[j]['selectelm']+"');";
                      }
                      
                      if(addressArr.includes(elemntObj.rule1[j]['selectelm'])){
                         
                        //address
                        if(elemntObj.rule1[j]['selectelm']=="address"){

                          addressFun="setlogicBuilderFun('"+elemntObj.rule1[j]['fromid']+"','"+elemntObj.rule1[j]['selectelm']+"');";
                         
                        }
                        //addrress2
                        if(elemntObj.rule1[j]['selectelm']=="address2"){
                          address2Fun="setlogicBuilderFun('"+elemntObj.rule1[j]['fromid']+"','"+elemntObj.rule1[j]['selectelm']+"');";
                        }

                        //city
                        if(elemntObj.rule1[j]['selectelm']=="city"){cityFun="setlogicBuilderFun('"+elemntObj.rule1[j]['fromid']+"','"+elemntObj.rule1[j]['selectelm']+"');";}

                        //state
                        if(elemntObj.rule1[j]['selectelm']=="state"){stateFun="setlogicBuilderFun('"+elemntObj.rule1[j]['fromid']+"','"+elemntObj.rule1[j]['selectelm']+"');";}

                        //city
                        if(elemntObj.rule1[j]['selectelm']=="zip"){zipFun="setlogicBuilderFun('"+elemntObj.rule1[j]['fromid']+"','"+elemntObj.rule1[j]['selectelm']+"');";}

                        //country
                        if(elemntObj.rule1[j]['selectelm']="country"){countryFun=="setlogicBuilderFun('"+elemntObj.rule1[j]['fromid']+"','"+elemntObj.rule1[j]['selectelm']+"');";}

                      }
                      else 
                      {
                        setlogicBuilderFun="setlogicBuilderFun('"+elemntObj.rule1[j]['fromid']+"');";
                      }
                      
                        console.log(i+"here"+setlogicBuilderFun+" "+elemntObj.rule1[j]['selectelm']);
                    }
                    //show/hide element
                    if(elemntObj.rule1[j]['cid']==obj.fields[i].cid){
                         console.log("status1"+statusShow);
                      if(elemntObj.rule1[j]['status']=="show"){
                         console.log("status2"+statusShow);
                        statusShow="style='display:none;'";
                      }
                    }

                 }
                 console.log("status"+statusShow);
                //setlogicBuilderFun="setlogicBuilderFun('"+obj.fields[i].cid+"');";
            
            // Common visible

            //website
            if(obj.fields[i].field_type=="website"){
              var htmlText='',sizeval='',defaultVal='',textType='url',minlength='',maxlength='';
              var onchangeFun='';
              var maxlength='',description=customcssclass='';
              
              $.each( obj.fields[i].field_options, function( key, value ) {
   
                      if(key=="size"){
                        sizeval=value;
                      }else if(key=="defaultvalue"){
                        defaultVal=value;
                      }else if(key=="customcssclass"){
                        customcssclass=value;
                      }else if(key=="description"){
                        description=value;
                      }

                   });

              var descriptionHtml="";
             // Description
            if(description!=""){
              descriptionHtml=' <div class="help-block col-md-12">'+description+'</div> '; 
            }

                onchangeFun=="";
               if(setlogicBuilderFun!="")
               onchangeFun='oninput="'+setlogicBuilderFun+'"';

                document.getElementById("showform").innerHTML =
                document.getElementById("showform").innerHTML+'<div '+logicId+' class="subtemplate-wrapper form-group'+visibleHtml+' '+customcssclass+'" '+statusShow+'>  <label class="'+setLabelClass+'"> <span>'+obj.fields[i].label+requiredHtml+'</span></label><br><input type="url" class="rf-size-  " value="'+defaultVal+'" placeholder="http://" '+elementId+' '+requiredElement+' '+onchangeFun+' data-error="Please enter valid website."></div>'+descriptionHtml+'<div class="help-block with-errors"></div>';
            }

            // Text
            if(obj.fields[i].field_type=="text"){

              // Get Text Propertise
              var htmlText='',sizeval='',defaultVal='',textType='text',minlength='',maxlength='';
              var onchangeFun='';
              var maxlength='',description=customcssclass='';
              $.each( obj.fields[i].field_options, function( key, value ) {
   
                  if(key=="size"){
                    sizeval=value;
                  }else if(key=="password"){
                   textType=value;
                  }else if(key=="defaultvalue"){
                    defaultVal=value;
                  }else if(key=="minlength"){
                    minlength=value;
                  }else if(key=="maxlength"){
                    maxlength=value;
                  }else if(key=="description"){
                    description=value;
                  }else if(key=="customcssclass"){
                    customcssclass=value;
                  }else if(key=="min_max_length_units"){
                     if(value=="words"){textWC='w';}else{textWC='c';}
                  }

                });
                
          if(maxlength!="" || minlength!=""){
               onchangeFun="onchange=\"limit_input('rend"+obj.fields[i].cid+"','"+textWC+"','"+maxlength+"','"+minlength+"'); "+setlogicBuilderFun+"\"";             
                    if(textWC=="c"){
                         onchangeFun +=" maxlength='"+maxlength+"'";
                    }
              }
              else
              {
                onchangeFun='oninput="'+setlogicBuilderFun+'"';
              } 

            
            var descriptionHtml="";
             // Description
            if(description!=""){
              descriptionHtml=' <div class="help-block col-md-12">'+description+'</div>'; 
            }
            
    htmlText +='<div class="elementdiv"><input '+requiredElement+' '+elementId+' type="'+textType+'" name="'+obj.fields[i].label+'[]" class="rf-size-'+sizeval+'" value="'+defaultVal+'"  '+onchangeFun+' data-error=""></div>'+descriptionHtml+'<div class="help-block with-errors"></div>';
                document.getElementById("showform").innerHTML =
                  document.getElementById("showform").innerHTML+'<div '+logicId+' class="subtemplate-wrapper form-group response-field-text '+visibleHtml+' '+customcssclass+'" '+statusShow+'>  <label class="'+setLabelClass+'"> <span>'+obj.fields[i].label+requiredHtml+'</span></label>'+htmlText+'</div> '; 
            }
         //End Text

		 // Captcha
		 if(obj.fields[i].field_type=="Captcha"){
captchaStatus=true;

              // Get Text Propertise
              var htmlText='',textType='text';
              var description=customcssclass='';
			  var siteKey='';
             
              $.each( obj.fields[i].field_options, function( key, value ) {
   
                   if(key=="description"){
                    description=value;
                  }else if(key=="customcssclass"){
                    customcssclass=value;
                  }else if(key=="secreat_key"){
                    secretKey=value;
                  }else if(key=="site_key")
				  { siteKey=value;}
                });
					  
            var descriptionHtml="";
             // Description
            if(description!=""){
              descriptionHtml=' <div class="help-block col-md-12">'+description+'</div>'; 
            }
            
    htmlText +='<div class="elementdiv"><div class="g-recaptcha" data-sitekey="'+siteKey+'"></div><input '+requiredElement+' '+elementId+' type="'+textType+'" name="'+obj.fields[i].label+'[]" data-error="" style="display:none;"></div>'+descriptionHtml+'<div class="help-block with-errors"></div>';
                document.getElementById("showform").innerHTML =
                  document.getElementById("showform").innerHTML+'<div '+logicId+' class="subtemplate-wrapper form-group response-field-text '+customcssclass+'" >  <label class="'+setLabelClass+'"> <span>'+obj.fields[i].label+requiredHtml+'</span></label>'+htmlText+'</div> '; 
            }
         //End Captcha

             // Slider
            if(obj.fields[i].field_type=="slider"){
              var htmlSlider=customcssclass=urltext=description=defaulturl=currencyslider=onchangeFun="";
              var maxlength=100,minlength=0;
              // Get Text Propertise
              $.each( obj.fields[i].field_options, function( key, value ) {
              console.log(key +":"+ value);
                  
                  if(key=="defaulturl"){
                    defaulturl=value;
                  }else if(key=="urltext"){
                    urltext=value;
                  }else if(key=="min"){
                    minlength=value;
                  }else if(key=="max" ){
                    maxlength=value;
                  }else if(key=="description"){
                    description=value;
                  }else if(key=="currencyslider"){
                    currencyslider=value;
                  }else if(key=="customcssclass"){
                    customcssclass=value;
                  }
               
             });
             
            var descriptionHtml="";
             // Description
            if(description!=""){
              descriptionHtml=' <span class="help-block">'+description+'</span> '; 
            }

/* old htmlSlider +='<input type="range" min="'+minlength+'" max="'+maxlength+'" name="'+obj.fields[i].label+'[]" oninput="document.getElementById(\'sliderInp'+obj.fields[i].cid+'\').innerHTML=this.value;"/><label id="sliderInp'+obj.fields[i].cid+'">'+minlength+' '+EFBP_getCurrencySymbol(currencyslider)+'</label><span class="optionalContent1"><a href="'+defaulturl+'" target="_blank" class="linktext">'+urltext+'</a></span>'+descriptionHtml;*/

htmlSlider +='<div class="row"><div class="all col-md-10 col-sm-10 col-xm-10"><input value="'+minlength+'" type="range" min="'+minlength+'" max="'+maxlength+'" name="'+obj.fields[i].label+'[]" oninput="document.getElementById(\'sliderInp'+obj.fields[i].cid+'\').value=this.value;"/></div><div class="textcurrency"><span class="currencylabel">'+EFBP_getCurrencySymbol(currencyslider)+'</span><input type="text" id="sliderInp'+obj.fields[i].cid+'" value="'+minlength+'"></div><span class="optionalContent1"><a href="'+defaulturl+'" target="_blank" class="linktext">'+urltext+'</a></span></div>'+descriptionHtml;


                document.getElementById("showform").innerHTML =
                document.getElementById("showform").innerHTML+'<div id="sliderdiv'+obj.fields[i].cid+'" class="subtemplate-wrapper form-group response-field-text '+visibleHtml+' '+customcssclass+'" '+statusShow+'>  <label class="'+setLabelClass+'"> <span>'+obj.fields[i].label+requiredHtml+'</span></label>'+htmlSlider+'</div> ';
            }
            //End Slider


            // Toggle
            if(obj.fields[i].field_type=="Toggle"){
             var htmlToggle=customcssclass="";
              // Get Text Propertise
              $.each( obj.fields[i].field_options, function( key, value ) {
              console.log(key +":"+ value);
             if(key=="description"){
                    description=value;
                  }
             });
            var descriptionHtml="";
             // Description
            if(description!=""){
              descriptionHtml=' <span class="help-block">'+description+'</span> '; 
            }else if(key=="customcssclass"){
                    customcssclass=value;
            } 

htmlToggle +=descriptionHtml+'<div class="toggle_button"><div class="onoffswitch"><input '+requiredElement+'type="checkbox" checked="" id="myonoffswitch'+i+'" class="onoffswitch-checkbox" name="'+obj.fields[i].label+'[]"><label for="myonoffswitch'+i+'" class="onoffswitch-label"><span class="onoffswitch-inner"></span><span class="onoffswitch-switch"></span></label></div></div>';

                document.getElementById("showform").innerHTML =
                  document.getElementById("showform").innerHTML+'<div '+logicId+' class="subtemplate-wrapper form-group togglediv '+visibleHtml+'" '+statusShow+'> <label class="'+setLabelClass+'"> <span>'+obj.fields[i].label+requiredHtml+'</span></label>'+htmlToggle+'</div> ';

            }

            //End Toggle

            // Number
            if(obj.fields[i].field_type=="number"){
                // Get Number Propertise
              var htmlNumber='',sizeval='',defaultVal='',minlength='',maxlength='',customcssclass='';
              var onchangeFun='';
              var maxlength='',description='';
              var unitVal="";
              $.each( obj.fields[i].field_options, function( key, value ) {
   
                  if(key=="size"){
                    sizeval=value;
                  }else if(key=="defaultvalue"){
                    defaultVal=value;
                  }else if(key=="min"){
                    minlength=value;
                  }else if(key=="maxlength"){
                    maxlength=value;
                  }else if(key=="max"){
                    maxlength=value;
                  }else if(key=="description"){
                    description=value;
                  }else if(key=="customcssclass"){
                    customcssclass=value;
                  }
                  else if(key=="units"){
                     unitVal=value;
                     }

                });
            
              if(setlogicBuilderFun!="")
                setlogicBuilderFun='oninput="'+setlogicBuilderFun+'"';
           
             var descriptionHtml="";
             // Description
            if(description!=""){
              descriptionHtml=' <div class="help-block col-md-12">'+description+'</div>'; 
            }
            
           var inRangeFunction="",onlyMin="",onlyMax="",errorMessage="";
            if((minlength!="") && (maxlength!="")){
          inRangeFunction="if(integerInRange(this.value,'"+minlength+"','"+maxlength+"')==true){}else{ this.value='';}";
              errorMessage=errorMessage+'Number should be in range of '+minlength+' and '+maxlength+'.';
            }
            else if(minlength!=""){
               onlyMin="if(this.value<'"+minlength+"'){this.value='';}";
               errorMessage=errorMessage+'Number should be greater than or equal to '+minlength+'.';
            }
            else if(maxlength!=""){
                onlyMax="if(this.value>'"+maxlength+"'){this.value='';}";
                errorMessage=errorMessage+'Number should be less than or equal to '+maxlength+'.';
            }
            else{
              errorMessage="Please enter proper number. ";
            }
        
    onchangeFun='onchange="'+inRangeFunction+' '+onlyMin+' '+onlyMax+'";';
    htmlNumber +='<div class="elementdiv"><input  pattern="^[0-9]+" '+requiredElement+' '+elementId+' name="'+obj.fields[i].label+'[]" type="text" class="rf-size-'+sizeval+'" value="'+defaultVal+'"  '+onchangeFun+' '+setlogicBuilderFun+' data-error="'+errorMessage+'"><label>'+unitVal+'</label> </div>'+descriptionHtml+'<div class="help-block with-errors"></div>';
                document.getElementById("showform").innerHTML =
                  document.getElementById("showform").innerHTML+'<div '+logicId+' class="subtemplate-wrapper  form-group response-field-number '+visibleHtml+' '+customcssclass+'" '+statusShow+'> <label class="'+setLabelClass+'"> <span>'+obj.fields[i].label+requiredHtml+'</span></label>'+htmlNumber+'</div> ';

            }
          //End number

         // Paragraph
    if(obj.fields[i].field_type=="paragraph"){

              // Get paragraph Propertise
              var htmlPara='',sizeval='',defaultVal='',textType='text',minlength='',maxlength='',textWC='c';
              var onchangeFun='';
              var maxlength='',description=customcssclass='';
              $.each( obj.fields[i].field_options, function( key, value ) {
   
                  if(key=="size"){
                    sizeval=value;
                  }else if(key=="defaultvaluetextarea"){
                    defaultVal=value;
                  }else if(key=="minlength"){
                    minlength=value;
                  }else if(key=="maxlength"){
                    maxlength=value;
                  }else if(key=="description"){
                    description=value;
                  }else if(key=="customcssclass"){
                    customcssclass=value;
                  }
                });
           
           if(maxlength!="" || minlength!=""){
             
             onchangeFun="onchange=\"limit_input('rend"+obj.fields[i].cid+"','"+textWC+"','"+maxlength+"','"+minlength+"'); "+setlogicBuilderFun+"\"";             
                  
                  if(textWC=="c"){
                       onchangeFun +=" maxlength='"+maxlength+"'";
                  }           
               }
              else
              {
                onchangeFun='oninput="'+setlogicBuilderFun+'"';
              }  

            var descriptionHtml="";
             // Description
            if(description!=""){
              descriptionHtml=' <div class="help-block col-md-12">'+description+'</div>'; 
            }         
         var elementClass="rend"+obj.fields[i].cid;   

   htmlPara +='<div class="elementdiv"><textarea '+requiredElement+' '+elementId+' name="'+obj.fields[i].label+'[]" class="rf-size-'+sizeval+'"  '+onchangeFun+' data-error="">'+defaultVal+'</textarea></div>'+descriptionHtml+'<div class="help-block with-errors '+elementClass+'" style="color:#a94442;"></div>';
                document.getElementById("showform").innerHTML =
                  document.getElementById("showform").innerHTML+'<div '+logicId+' class="subtemplate-wrapper  form-group response-field-paragraph '+visibleHtml+' '+customcssclass+'" '+statusShow+'> <label class="'+setLabelClass+'"> <span>'+obj.fields[i].label+requiredHtml+'</span></label>'+htmlPara+'</div> ';
            }
   
      //End Paragraph

      // Name
        if(obj.fields[i].field_type=="Name"){

            if(titleFun!="")
          titleFun='oninput="'+titleFun+'"';
         if(firstFun!="")
          firstFun='oninput="'+firstFun+'"';
         if(middleFun!="")
          middleFun='oninput="'+middleFun+'"';
         if(lastFun!="")
          lastFun='oninput="'+lastFun+'"';
         

          // Get phone Propertise
              var htmlName='',defaultVal=description='',nameType='Normal';
              var description=customcssclass='';
              $.each( obj.fields[i].field_options, function( key, value ) {
            
                  if(key=="name"){
                    nameType=value;
                  }

                  if(key=="description"){
                    description=value;
                  }else if(key=="customcssclass"){
                    customcssclass=value;
                  }
            });
            
            var descriptionHtml="";
             // Description
            if(description!=""){
              descriptionHtml=' <span class="help-block">'+description+'</span>'; 
            }

            var nameId=obj.fields[i].cid;
            if(nameType=="Normal")
            {
                
                htmlName='<div class="elementdiv"> <span class="street"><div class="col-md-3 padding-left-none"><input data-error="Please enter proper name." pattern="^[A-Za-z]+" id="firstname'+nameId+'" '+requiredElement+' type="text" visible="" value="" name=" First Name "'+firstFun+'><label class="col-md-12 padding-0">First Name</label><div class="help-block with-errors padding-left-none"></div></div><div class="col-md-4 padding-left-none"><input data-error="Please enter proper name." pattern="^[A-Za-z]+" '+requiredElement+' id="lastname'+nameId+'" type="text" visible="" value="" name="Last Name"'+lastFun+'><label class="col-md-12 padding-0">Last Name</label><div class="help-block with-errors col-md-4 padding-left-none"></div></div></span> </div>'+descriptionHtml;
            }
            else if(nameType=="Nor_title")
            {
                htmlName='<div class="full_title elementdiv normal-title-full"><div class="col-md-1 col-sm-1 col-xs-1 padding-left-none"><input data-error="Please enter proper name." pattern="^[A-Za-z]+" id="title'+nameId+'" '+requiredElement+' type="text" name="Title" '+titleFun+'> <label> Title</label></div><div class="col-md-3 col-sm-3 col-xs-3 padding-left-none"> <input data-error="Please enter proper name." pattern="^[A-Za-z]+" id="firstname'+nameId+'" '+requiredElement+' type="text" name="First Name" '+firstFun+'><label> First</label></div><div class="col-md-4 col-sm-4 col-xs-4 padding-left-none"><input data-error="Please enter proper name." pattern="^[A-Za-z]+" id="lastname'+nameId+'" '+requiredElement+' type="text" name=" Last Name " '+lastFun+'><label> Last </label></div><div class="col-md-1 col-sm-1 col-xs-1 padding-left-none"><input data-error="Please enter proper name." pattern="^[A-Za-z]+" '+requiredElement+' type="text" name="Suffix"><label> Suffix </label></div></div><div class="help-block with-errors col-md-12 padding-0"></div>'+descriptionHtml;
            }
            else if(nameType=="Full")
            {
                htmlName='<div class="full elementdiv"><div class="col-md-3 col-sm-3 col-xs-3 padding-left-none"><input data-error="Please enter proper name." pattern="^[A-Za-z]+" id="firstname'+nameId+'" '+requiredElement+' type="text" name=" First Name " '+firstFun+'> <label> First</label></div><div class="col-md-3 col-sm-3 col-xs-3 padding-left-none"><input data-error="Please enter proper name." pattern="^[A-Za-z]+" id="middlename'+nameId+'" '+requiredElement+' type="text" name="Middle Name" '+middleFun+'><label> Middle </label></div><div class="col-md-4 col-sm-4 col-xs-4 padding-left-none"><input data-error="Please enter proper name." pattern="^[A-Za-z]+" name=" Last Name" id="lastname'+nameId+'" '+requiredElement+' type="text" style=" " '+lastFun+'><label> Last </label></div></div><div class="help-block with-errors col-md-12 padding-0"></div>'+descriptionHtml;
            }
            else if(nameType=="F_title")
            {
                htmlName='<div class="full_title elementdiv normal-title-full"><div class="col-md-1 col-sm-1 col-xs-1 padding-left-none"><input data-error="Please enter proper name." pattern="^[A-Za-z]+" id="title'+nameId+'" '+requiredElement+' type="text" name=" Title " '+titleFun+'> <label> Title</label></div><div class="col-md-3 col-sm-3 col-xs-3 padding-left-none"> <input data-error="Please enter proper name." pattern="^[A-Za-z]+" id="firstname'+nameId+'" '+requiredElement+' type="text" name=" First Name " '+firstFun+'><label> First</label></div><div class="col-md-3 col-sm-3 col-xs-3 padding-left-none"><input data-error="Please enter proper name." pattern="^[A-Za-z]+" '+requiredElement+' id="middlename'+nameId+'" type="text" name="Middle Name" style=" " '+middleFun+'> <label> Middle </label></div><div class="col-md-4 col-sm-4 col-xs-4 padding-left-none"><input data-error="Please enter proper name." pattern="^[A-Za-z]+" id="lastname'+nameId+'" '+requiredElement+' type="text" name="Last Name" style=" " '+lastFun+'><label> Last </label></div><div class="col-md-1 col-sm-1 col-xs-1 padding-left-none"><input data-error="Please enter proper name." pattern="^[A-Za-z]+" '+requiredElement+' type="text" name=" Suffix "><label> Suffix </label></div></div><div class="help-block with-errors col-md-12 padding-0"></div>'+descriptionHtml;
            }

            document.getElementById("showform").innerHTML =
              document.getElementById("showform").innerHTML+'<div '+logicId+' class="subtemplate-wrapper  form-group response-field-Name '+visibleHtml+' '+customcssclass+'" '+statusShow+'>  <label class="'+setLabelClass+'"> <span>'+obj.fields[i].label+requiredHtml+'</span></label><div class="input-line">'+htmlName+'</div></div> ';
        }
        //End Name

         // Time
        if(obj.fields[i].field_type=="time"){

           // Get phone Propertise


           if(SecondFieldFun!=""){
             selectampm='onchange="'+SecondFieldFun+'"';
             SecondFieldFun='oninput="'+SecondFieldFun+'"';
            }
            if(HourFormatFun!="")
            HourFormatFun='oninput="'+HourFormatFun+'"';
            if(bothFun!="")
            bothFun='oninput="'+bothFun+'"';

              var htmlTime=description='',timeType='SecondField';
              var description=customcssclass='';
              $.each( obj.fields[i].field_options, function( key, value ) {
            
                  if(key=="time"){
                    timeType=value;
                  }
                 if(key=="description"){
                    description=value;
                  }else if(key=="customcssclass"){
                    customcssclass=value;
                  }
                  else if(key=="description"){
                    description=value;
                  }
            });

            var descriptionHtml="";
             // Description
            if(description!=""){
              descriptionHtml=' <div class="help-block">'+description+'</div>'; 
            }
       var timeId=obj.fields[i].cid;

      if(timeType=="HourFormat")
      {
          htmlTime='<div class="elementdiv"><label>HH</label> <input  maxlength="2" data-error="Only numeric values are allowed" pattern="^[0-9]+" id="hour'+timeId+'" '+HourFormatFun+' '+requiredElement+' type="text" name="Hour" style="width: 10%;display: inline;" class="form-control"> : <label>MM</label> <input  maxlength="2" data-error="Only numeric values are allowed" pattern="^[0-9]+" id="minute'+timeId+'" '+HourFormatFun+' '+requiredElement+' type="text" name=" Minutes " style="width: 10%;display: inline;" class="form-control"></div> <div class="help-block with-errors"></div><div class="help-block with-errors"></div>'+descriptionHtml;
      }
      else if(timeType=="both")
      {
          htmlTime='<div class="elementdiv">MM <input  maxlength="2" data-error="Only numeric values are allowed" pattern="^[0-9]+" id="minute'+timeId+'" '+bothFun+' '+requiredElement+' type="text" name=" Minutes " style="width: 10%;display: inline;" class="form-control"> SS: <input maxlength="2" id="second'+timeId+'" '+bothFun+' '+requiredElement+' data-error="Only numeric values are allowed" pattern="^[0-9]+"  type="text" name=" Seconds "  style="width: 10%;display: inline;" class="form-control"> MM: <input maxlength="2" data-error="Only numeric values are allowed" pattern="^[0-9]+" id="minute1'+timeId+'" '+bothFun+' '+requiredElement+' type="text" name=" MM" style="width: 10%;display: inline;" class="form-control"></div>'+descriptionHtml+'<div class="help-block with-errors"></div>';
      }
      else
      {
          htmlTime='<div class="elementdiv"><label>HH</label> <input maxlength="2" data-error="Only numeric values are allowed" pattern="^[0-9]+" id="hour'+timeId+'" '+SecondFieldFun+' '+requiredElement+' type="text" name=" Hours " style="width: 10%;display: inline;" class="form-control"> :<label>MM</label> <input maxlength="2" data-error="Only numeric values are allowed" pattern="^[0-9]+" id="minute'+timeId+'" '+SecondFieldFun+' '+requiredElement+' type="text" name=" Minutes "  style="width: 10%;display: inline;" class="form-control"> :<label>SS</label> <input maxlength="2" data-error="Only numeric values are allowed" pattern="^[0-9]+" id="second'+timeId+'" '+SecondFieldFun+' '+requiredElement+' type="text" name=" Seconds "  style="width: 10%;display: inline; margin-right:5px;" class="form-control"><select id="ampm'+timeId+'" '+selectampm+' style="width: 15%;display: inline;" name=" AM/PM "  class="form-control"> <option value="am">AM</option> <option value="pm">PM</option> </select></div><div class="help-block with-errors"></div>'+descriptionHtml;
      }

            document.getElementById("showform").innerHTML =
            document.getElementById("showform").innerHTML+'<div '+logicId+' class="subtemplate-wrapper form-group  response-field-Name '+visibleHtml+' '+customcssclass+'">  <label class="'+setLabelClass+'" '+statusShow+'> <span>'+obj.fields[i].label+requiredHtml+'</span></label>'+htmlTime+'</div> ';
        }
        //End TIME

         // DATE
        if(obj.fields[i].field_type=="date"){

                    // Get date Propertise
  var htmlDate='',defaultVal=descriptionHtml=minDate=maxDate='',dateType='date1',weekday='false';
  var disablePastFutureDate1=false,pastfuture='';
  var disableDates="";
  var disableDatesCheck=false;
              var description=customcssclass='';
              $.each( obj.fields[i].field_options, function( key, value ) {
            
                  if(key=="date"){ // date format
                    dateType=value;
                  }
                  else if(key=="datevalfixmin" || key=="datevalRelmax"){ // min date
                  
                    minDate=value;  
                  }
                  else if(key=="datevalfixmax" || key=="datevalRelmax"){ // max date
                  
                    maxDate=value;  
                  }
                  else if(key=="DISABLEWEEKENDDATE"){ //disable week days
                    weekday=value;
                  }
                  else if(key=="datevalRelmin"){ //minimum days
                    minDate=value;  
                  }
                  else if(key=="datevalRelmax"){ //maximum days
                    maxDate=value;  
                  }
                  else if(key=="DISABLEPASTFURDATE"){ //past date
                    disablePastFutureDate1=value;
                  }
                  else if(key=="ALLPASTFURDATE"){ //past date
                    pastfuture=value;
                  }
                  else if(key=="DISABLESPCDATETXTAREA"){ //past date
                  disableDates=value;
                  }
                  else if(key=="DISABLESPCDATETXTAREA"){ //Specific date
                  disableDates=value;
                  }
                  else if(key=="DISABLESPCDATE"){ //Specific date Boolean
                     disableDatesCheck=value;
                  }
                  if(key=="description"){
                    description=value;
                  }else if(key=="customcssclass"){
                    customcssclass=value;
                  }
            });

            // if checked disable Past/future buttons
            if(disablePastFutureDate1===true){
              if(pastfuture === 'future'){
                 maxDate="-1"; 
              }
              else
               {
                 minDate="0";
               } 
            }
        var dateFormat=(dateType=="date1")?"mm/dd/yy":"dd/mm/yy";
        var datefun="dateFunction('"+obj.fields[i].cid+"','"+dateFormat+"','"+minDate+"','"+maxDate+"','"+weekday+"','"+disableDates+"');";

            var onchangeFun="";
            if(setlogicBuilderFun!="")
            onchangeFun='onchange="'+setlogicBuilderFun+'"';
            if(dateType=="date1")
            {
                htmlDate='<div class="elementdiv"><div class="col-md-3 col-sm-3 col-xm-3 padding-left-none"><input maxlength="2"  data-error="Only numeric values are allowed" pattern="^[0-9]+"  '+requiredElement+' type="text" name=" Month "  id="mm'+obj.fields[i].cid+'" class="form-control" style="max-width: 88%; margin-right: 10px;"><span>/</span><label style="min-width:100%;">MM</label> </div><div class="col-md-3 col-sm-3 col-xm-3 padding-left-none"><input  maxlength="2"  data-error="Only numeric values are allowed" '+requiredElement+' pattern="^[0-9]+"  type="text" name="Day"  id="dd'+obj.fields[i].cid+'" class="form-control" style="max-width: 88%; margin-right: 10px;"><span>/</span><label>DD</label> </div><div class="col-md-3 col-sm-3 col-xm-3 padding-left-none"><input maxlength="2"  data-error="Only numeric values are allowed" '+requiredElement+' pattern="^[0-9]+"  type="text" name="Year"  id="yy'+obj.fields[i].cid+'" class="form-control" style="max-width: 88%; margin-right: 10px;"> <label>YY</label></div><div class="col-md-3 col-sm-3 col-xm-3 padding-left-none" style="padding-top:5px;"> <span><img src="https://condoprodata.com/wp-content/plugins/easy-form-builder-by-bitware/img/calendar.gif" class="dateimg'+obj.fields[i].cid+'" onclick="'+datefun+'"><input '+onchangeFun+' type="hidden" id="rend'+obj.fields[i].cid+'"></span></div></div>';
            }
            else
            {
                htmlDate='<div class="elementdiv"><div class="col-md-3 col-sm-3 col-xm-3 padding-left-none"><input maxlength="2" data-error="Only numeric values are allowed" pattern="^[0-9]+"  '+requiredElement+' type="text" name=" Month "  id="mm'+obj.fields[i].cid+'" class="form-control" style="max-width: 88%; margin-right: 10px;"><span>/</span><label>DD</label> </div><div class="col-md-3 col-sm-3 col-xm-3 padding-left-none"><input maxlength="2" data-error="Only numeric values are allowed" '+requiredElement+' pattern="^[0-9]+"  type="text" name=" Day "  id="dd'+obj.fields[i].cid+'" class="form-control" style="max-width: 88%; margin-right: 10px;"><span>/</span><label>MM</label> </div><div class="col-md-3 col-sm-3 col-xm-3 padding-left-none"><input maxlength="2" data-error="Only numeric values are allowed" '+requiredElement+' pattern="^[0-9]+"  type="text" name=" Month "  id="yy'+obj.fields[i].cid+'" class="form-control" style="max-width: 88%; margin-right: 10px;"> <label>YY</label></div><div class="col-md-3 col-sm-3 col-xm-3 padding-left-none" style="padding-top:5px;"><span><img src="https://condoprodata.com/wp-content/plugins/easy-form-builder-by-bitware/img/calendar.gif" class="dateimg'+obj.fields[i].cid+'" onclick="'+datefun+'"><input '+onchangeFun+' type="hidden" id="datepickerme'+obj.fields[i].cid+'"></span></div></div>';
            }
            
            var setDateHtml ='<div id="dateformatdiv" class="input-line">'+htmlDate+'</span></div><div class="help-block with-errors"></div>'+descriptionHtml;
            document.getElementById("showform").innerHTML =
            document.getElementById("showform").innerHTML+'<div '+logicId+' class="subtemplate-wrapper form-group response-field-Name '+visibleHtml+' '+customcssclass+'" '+statusShow+'>  <label class="'+setLabelClass+'"> <span>'+obj.fields[i].label+requiredHtml+'</span></label>'+setDateHtml+'</div> ';
        }
        //End DATE
	
		
         // address
        if(obj.fields[i].field_type=="address"){
        if(addressFun!="")
          addressFun='oninput="'+addressFun+'"';
         if(address2Fun!="")
          address2Fun='oninput="'+address2Fun+'"';
         if(cityFun!="")
          cityFun='oninput="'+cityFun+'"';
         if(countryFun!="")
          countryFun='onchange="'+countryFun+'"';
         if(stateFun!="")
          stateFun='oninput="'+stateFun+'"';
         if(zipFun!="")
          zipFun='oninput="'+zipFun+'"';
          // Get Text Propertise
        var addId=obj.fields[i].cid;
       // alert(addressFun);
          var htmlAddress='';
          var newLineAddress='<span class="street"><label>Address line 1</label><input data-error="Please enter proper address." placeholder="Enter your address" '+addressFun+' id="address'+addId+'" '+requiredElement+' class="form-control" name="Address"  type="text"></span>';
          var secondAddress="";
          var usrestrict="";
          var description=customcssclass=defaultcountry='';
          $.each( obj.fields[i].field_options, function( key, value ) {

             if(key=="description"){
                description=value;
              }else if(key=="defaultcountry"){
                defaultcountry=value;
              }
              else if(key=="customcssclass"){
                    customcssclass=value;
                  }
                 else if(key=="address"){
                 secondAddress=value;
                 }
                 
                 else if(key=="usrestrict"){
                 usrestrict=value;
                 }
                 
            });
          var optionslist='<option></option>';
          
          for(var c=0;c<countryjson.length; c++){
            if(defaultcountry==countryjson[c])
            optionslist +='<option value="'+countryjson[c]+'" selected="true">'+countryjson[c]+'</option>';
            else
            optionslist +='<option value="'+countryjson[c]+'">'+countryjson[c]+'</option>';
          }
          
          if(usrestrict==true){
              optionslist='<option value="united states">United States</option>'
          }
        var descriptionHtml="";
         // Description
        if(description!=""){
          descriptionHtml=' <div class="help-block col-md-12">'+description+'</div>'; 
        }
        
        // second address enable checked 
        if(secondAddress=="checked"){
            newLineAddress='<span class="street"><input data-error="Please enter proper address." placeholder="Enter your address" '+address2Fun+' id="address2'+addId+'" '+requiredElement+' class="form-control" name=" Address line 1"  type="text"><label>Address line 1</label><input data-error="Please enter proper address." placeholder="Enter your address" '+requiredElement+' class="form-control" name=" Address line 2"  type="text"><label>Address line 2</label></span>';
        }
        
htmlAddress +='<br><br><div class="view-address col-md-10 col-sm-10 col-xs-10 padding-0"> <div class="elementdiv col-md-12">'+newLineAddress+'</div><div class="input-line col-md-6"><span class="city"><input data-error="Please enter proper city." placeholder="City" '+cityFun+' id="city'+addId+'"'+requiredElement+' type="text" name=" City " class="form-control"><label>City</label></span> </div><div class="input-line col-md-6"><span class="state"><input data-error="Please enter proper state." placeholder="State" pattern="^[A-Za-z]+" '+stateFun+' id="state'+addId+'" '+requiredElement+' type="text" name=" State" class="form-control"><label>State / Province / Region</label></span> </div><div class="input-line col-md-6"><span class="zip"><input data-error="Please enter proper zipcode." pattern="^[0-9]+"  placeholder="Zipcode" '+zipFun+' id="zip'+addId+'" '+requiredElement+' type="number" name=" Zip Code"  class="form-control"><label>Zipcode</label></span> </div><div class="input-line col-md-6"> <span class="country"><select placeholder="Select Country" class="form-control" name=" Country" '+countryFun+' id="country'+addId+'"  >'+optionslist+'</select><label>Country</label></span> </div></div><div class="help-block with-errors"></div>'+descriptionHtml;

            document.getElementById("showform").innerHTML =
            document.getElementById("showform").innerHTML+'<div '+logicId+' class="subtemplate-wrapper form-group response-field-Name '+visibleHtml+' '+customcssclass+'" '+statusShow+'>  <label class="'+setLabelClass+'"> <span>'+obj.fields[i].label+requiredHtml+'</span></label>'+htmlAddress+'</div> ';
        }
        //End address

         // price
        if(obj.fields[i].field_type=="price"){

          // Get Text Propertise
          var htmlPrice=sizeval=customcssclass='';
          var description=customcssclass='';
          var currencyVal="";

          $.each( obj.fields[i].field_options, function( key, value ) {
            if(key=="description"){
                description=value;
              }
              else if(key=="size"){
                    sizeval=value;
              }else if(key=="customcssclass"){
                customcssclass=value;
              }else if(key=="currency"){
                currencyVal=value;
              }    

            });
        var descriptionHtml="";
         // Description
        if(description!=""){
          descriptionHtml=' <span class="help-block col-md-12">'+description+'</span>'; 
        }

        onchangeFun=="";
        if(setlogicBuilderFun!="")
        onchangeFun='oninput="'+setlogicBuilderFun+'"';

htmlPrice +='<div class="elementdiv"> <span class="dolars"> <input data-error="Only numeric values are allowed" pattern="^[0-9]+" '+elementId+' '+requiredElement+' '+onchangeFun+' type="text" name="'+obj.fields[i].label+'[]" '+requiredElement+' placeholder="'+EFBP_getCurrencyFirst(currencyVal)+'"></span> <span class="above-line">.</span> <span class="cents"> <input placeholder="'+EFBP_getCurrencySecond(currencyVal)+'" data-error="Only numeric values are allowed" pattern="^[0-9]+"  type="text" name="'+obj.fields[i].label+'[]" '+requiredElement+'></span><span class="above-line">'+EFBP_getCurrencySymbol(currencyVal)+'</span> </div>'+descriptionHtml+'<div class="help-block with-errors"></div>';

            document.getElementById("showform").innerHTML =
            document.getElementById("showform").innerHTML+'<div '+logicId+' class="subtemplate-wrapper form-group response-field-Name '+visibleHtml+' '+customcssclass+'" '+statusShow+' >  <label class="'+setLabelClass+'"> <span>'+obj.fields[i].label+requiredHtml+'</span></label>'+htmlPrice+'</div> ';
        }
        //End price

          // email
        if(obj.fields[i].field_type=="email"){

          // Get Text Propertise
          var htmlEmail=defaultValEmail='';
          var description=customcssclass='';
      var  onchangeFun='',elementSize="small";
          $.each( obj.fields[i].field_options, function( key, value ) {

             if(key=="description"){
                description=value;
              }else if(key=="defaultValEmail"){
                    defaultValEmail=value;
              }else if(key=="customcssclass"){
                    customcssclass=value;
                  }
                  else if(key=="size"){
                 elementSize=value;
                 }

            });
      
         var oninputFun="";
        if(setlogicBuilderFun!="")
        oninputFun='oninput="'+setlogicBuilderFun+'"';

        var descriptionHtml="";
         // Description
        if(description!=""){
          descriptionHtml=' <div class="help-block col-md-12">'+description+'</div>'; 
        }
        
        htmlEmail +='<div class="elementdiv"><input placeholder="abc@something.com" '+elementId+' type="email" name="'+obj.fields[i].label+'[]" class="rf-size-'+elementSize+'" '+requiredElement+' '+oninputFun+' data-error="Entered email address is invalid" ></div>'+descriptionHtml+'<div class="help-block with-errors"></div>';
        

            document.getElementById("showform").innerHTML =
            document.getElementById("showform").innerHTML+'<div '+logicId+' class="subtemplate-wrapper form-group response-field-text '+visibleHtml+' '+customcssclass+'" '+statusShow+' '+defaultValEmail+'>  <label class="'+setLabelClass+'"> <span>'+obj.fields[i].label+requiredHtml+'</span></label>'+htmlEmail+'</div> ';
        }

        //End email


        // Dropdown
       var drop_dwn_optionsHtml="";
      if(obj.fields[i].field_type=="dropdown"){
        var maxlength=customcssclass=description=sizeval='';
        var includeBlank=false;

        $.each( obj.fields[i].field_options, function( key, value ) {
             if(key=="size"){
                    sizeval=value;
                  }else if(key=="customcssclass"){
                    customcssclass=value;
                  }
                  else if(key=="include_blank_option"){
                   includeBlank=value;
                }
            });
       
      var descriptionHtml="";
       // Description
      if(description!=""){
        descriptionHtml=' <span class="help-block">'+description+'</span>'; 
      }         
        onchangeFun='onchange="'+setlogicBuilderFun+'"';
        
        if(includeBlank==true){
            drop_dwn_optionsHtml='<option value=""></option>';
        }
      if( obj.fields[i].field_options.options.length>0){
          for(var j = 0; j < obj.fields[i].field_options.options.length; j += 1){
          drop_dwn_optionsHtml=drop_dwn_optionsHtml+'<option selected="'+obj.fields[i].field_options.options[j].checked+'"   value="'+obj.fields[i].field_options.options[j].label+'">'+obj.fields[i].field_options.options[j].label+'</option>'; }
          
      }

          document.getElementById("showform").innerHTML =
          document.getElementById("showform").innerHTML+'<div '+logicId+' class="subtemplate-wrapper form-group '+visibleHtml+' '+customcssclass+' '+sizeval+'" '+statusShow+'> <label class="'+setLabelClass+'"><span >'+obj.fields[i].label+requiredHtml+'</span></label><div class="elementdiv"><select style=\"font-size:13px !important;\" visible="" name="'+obj.fields[i].label+'[]" class="rf-size-'+sizeval+' " '+elementId+' '+requiredElement+' '+onchangeFun+'>'+drop_dwn_optionsHtml+'</select></div><span class="help-block"></span></div> ';
         }
        //END Dropdown


        //Checkbox new
       var checkbox_Html="";
      if(obj.fields[i].field_type=="checkboxes"){  
          var CheckboxClass="",customClass="";
          var checkedVal=false;
          var oneColumn="";

          $.each( obj.fields[i].field_options, function( key, value ) {
            if(key=="checkbox")
              {
              CheckboxClass=value
              }
               if(key=="customcssclass"){
              customClass=value;
              }
              if(key=="checkbox"){
               oneColumn=value;
              }
              if(key=="description"){
                description=value;
              }
              if(key=="checkbox"){
               oneColumn=value;
              }

            });

            var descriptionHtml="";
            if(description!=""){
              descriptionHtml=' <span class="help-block">'+description+'</span>'; 
            }  

            var onchangeFun='onchange="'+setlogicBuilderFun+'"';
           /* old 
            if(obj.fields[i].field_options.options.length>0){for(var k = 0; k < obj.fields[i].field_options.options.length; k += 1){ checkbox_Html=checkbox_Html+'<input '+onchangeFun+' '+requiredElement+' '+elementId+' type=\"checkbox\" /> <label>'+obj.fields[i].field_options.options[k].label+'</label><br>'; }} */

              if(obj.fields[i].field_options.options.length>0){for(var k = 0; k < obj.fields[i].field_options.options.length; k += 1){
                  if(obj.fields[i].field_options.options[k].checked==true){
                   checkbox_Html=checkbox_Html+'<div><label class="fb-option '+oneColumn+' "><input '+onchangeFun+' '+requiredElement+' '+elementId+' type=\"checkbox\"checked="true" name="'+obj.fields[i].field_options.options[k].label+'" /> <label>'+obj.fields[i].field_options.options[k].label+'</label></label></div>';
                  }
                  else{
                     checkbox_Html=checkbox_Html+'<div><label class="fb-option '+oneColumn+' "><input '+onchangeFun+' '+requiredElement+' '+elementId+' type=\"checkbox\"  name="'+obj.fields[i].field_options.options[k].label+'"  /> <label>'+obj.fields[i].field_options.options[k].label+'</label></label></div>';
                  }
                 
              }}
                document.getElementById("showform").innerHTML =
                document.getElementById("showform").innerHTML+'<div '+logicId+' class="subtemplate-wrapper form-group '+' '+CheckboxClass+' '+visibleHtml+' '+customClass+'" '+statusShow+'><label>  <span>'+obj.fields[i].label+requiredHtml+'</span></label> <div> '+checkbox_Html+descriptionHtml+'</div><span class="help-block"></span><div class="actions-wrapper"> </div></div> ';
       }
       //End Checkbox     


//RADIO BUTTON NEW
       var radio_Html="";
      if(obj.fields[i].field_type=="radio"){        
            var radiosetClass="one_column",customClass="";    
            var includeOther=false;
			var description="";
             $.each( obj.fields[i].field_options, function( key, value ) {      
              if(key=="radio"){
                radiosetClass=value;
              }     
             if(key=="description"){
                description=value;
              }
            if(key=="customcssclass"){
            customClass=value;
            }
            if(key=="include_other_option"){
             includeOther=value;
            }
          });

     onchangeFun='onchange="'+setlogicBuilderFun+'"';

     /* old 
      if( obj.fields[i].field_options.options.length>0){
        for(var l = 0; l < obj.fields[i].field_options.options.length; l += 1){if(obj.fields[i].field_options.options[l].checked==true){radio_Html=radio_Html+'<input '+elementId+' '+requiredElement+' '+onchangeFun+' type=\"radio\" name =\"radiobt\" checked=\"true\" value="'+obj.fields[i].field_options.options[l].label+'"/> <label>'+obj.fields[i].field_options.options[l].label+'</label><br>';}else{ radio_Html=radio_Html+'<input '+elementId+' '+requiredElement+' '+onchangeFun+' type=\"radio\" name =\"radiobt\" value="'+obj.fields[i].field_options.options[l].label+'" /> <label>'+obj.fields[i].field_options.options[l].label+'</label><br>';}  }
      } */

    //new virgil code
    var elementClass="class='rend"+obj.fields[i].cid+"'";
    
      if( obj.fields[i].field_options.options.length>0){
          if(radiosetClass!="one_column"){
              for(var l = 0; l < obj.fields[i].field_options.options.length; l += 1){if(obj.fields[i].field_options.options[l].checked==true){radio_Html=radio_Html+'<div><label class="fb-option '+radiosetClass+' "><input '+elementClass+' '+requiredElement+' '+onchangeFun+' type=\"radio\" name =\"radiobt[]\" checked=\"true\" value="'+obj.fields[i].field_options.options[l].label+'"/> <label>'+obj.fields[i].field_options.options[l].label+'</label></label></div>';}else{ radio_Html=radio_Html+'<div><label class="fb-option   '+radiosetClass+' "><input '+elementClass+' '+requiredElement+' '+onchangeFun+' type=\"radio\" name =\"radiobt[]\" value="'+obj.fields[i].field_options.options[l].label+'" /> <label>'+obj.fields[i].field_options.options[l].label+'</label></label></div>';}  }
              if(includeOther==true){
                  radio_Html=radio_Html+'<div><label class="fb-option '+radiosetClass+' "><input '+elementClass+' '+requiredElement+' '+onchangeFun+' type=\"radio\" name =\"radiobt[]\" checked=\"true\" value="other"/> <label>Other</label><input type="text" name="'+obj.fields[i].label+'[]"></label></div>';
              }
              
          }
          else{
               for(var l = 0; l < obj.fields[i].field_options.options.length; l += 1){if(obj.fields[i].field_options.options[l].checked==true){radio_Html=radio_Html+'<input '+elementClass+' '+requiredElement+' '+onchangeFun+' type=\"radio\" name =\"radiobt\" checked=\"true\" value="'+obj.fields[i].field_options.options[l].label+'"/> <label>'+obj.fields[i].field_options.options[l].label+'</label><br>';}else{ radio_Html=radio_Html+'<input '+elementClass+' '+requiredElement+' '+onchangeFun+' type=\"radio\" name =\"radiobt\" value="'+obj.fields[i].field_options.options[l].label+'" /> <label>'+obj.fields[i].field_options.options[l].label+'</label><br>';}  }
               if(includeOther==true){
                   radio_Html=radio_Html+'<input '+elementClass+' '+requiredElement+' '+onchangeFun+' type=\"radio\" name =\"radiobt[]\" checked=\"true\" value="other"/> <label>Other</label><input type="text" name="'+obj.fields[i].label+'[]">';
               }
              
          }
       }
       //end new
          document.getElementById("showform").innerHTML =
          document.getElementById("showform").innerHTML+'<div '+logicId+'class="subtemplate-wrapper form-group '+visibleHtml+' '+customClass+' " '+statusShow+'><label>  <span>'+obj.fields[i].label+requiredHtml+'</span></label> <div> '+radio_Html+description+' </div><span class="help-block"></span><div class="actions-wrapper"> </div></div> ';

         }
  //End BUTTON

  
        // Phone
          if(obj.fields[i].field_type=="phone"){

              // Get phone Propertise
              var htmlPhone='',defaultVal=defaultVal1=defaultVal2=defaultVal3='',phoneType='International';
              var description=customcssclass=onchangeFun='';

              $.each( obj.fields[i].field_options, function( key, value ) {
            
                  if(key=="phone"){
                    phoneType=value;
                  }

                 if(phoneType=="International"){
                    if(key=="defaultvaluephone"){
                      defaultVal=value;
                    }    
                 }
                 else
                 {
                      if(key=="defaultvaluephone1"){
                        defaultVal1=value;
                      }else if(key=="defaultvaluephone2"){
                        defaultVal2=value;
                      }else if(key=="defaultvaluephone3"){
                        defaultVal3=value;
                      } 
                 }  

                  if(key=="description"){
                    description=value;
                  }else if(key=="customcssclass"){
                    customcssclass=value;
                  }
            });

             var onchangeFun="";
             if(setlogicBuilderFun!="") 
            onchangeFun='oninput="'+setlogicBuilderFun+'"';

            if(phoneType=="International")
            {
                htmlPhone='<div class="elementdiv"><input data-error="Only numeric values are allowed" pattern="^[0-9]+" '+elementId+' '+requiredElement+' '+onchangeFun+' type="text" name="'+obj.fields[i].label+'[]" class="rf-size- " value="'+defaultVal+'" ></div><div class="help-block with-errors"></div>';
            }  
            else
            {
                htmlPhone='<div class="elementdiv"><input data-error="Only numeric values are allowed" pattern="^[0-9]+"  '+requiredElement+' type="text"  name="'+obj.fields[i].label+'[]" maxlength="3" value="'+defaultVal1+'" style="width:50px;" >-<input data-error="Only numeric values are allowed" pattern="^[0-9]+" '+requiredElement+' type="text" name="'+obj.fields[i].label+'[]" value="'+defaultVal2+'" style="width:50px;" maxlength="3" >-<input data-error="Only numeric values are allowed" pattern="^[0-9]+" '+requiredElement+' type="text"  name="'+obj.fields[i].label+'[]" value="'+defaultVal3+'" style="width:70px;" maxlength="4"></div><div class="help-block with-errors"></div>';
            }  
              document.getElementById("showform").innerHTML =
              document.getElementById("showform").innerHTML+'<div '+logicId+' class="subtemplate-wrapper form-group '+visibleHtml+' '+customcssclass+'" '+statusShow+'>  <label class="'+setLabelClass+'"> <span>'+obj.fields[i].label+requiredHtml+'</span></label>'+htmlPhone +'</div> ';
          }
        // End Phone  

// File upload new
     if(obj.fields[i].field_type=="file_upload"){
FileUploadStatus=true;
              // Get phone Propertise
            var htmlfile='';
       var setLabelClass="";
              var description=customcssclass=checkExtension='';
        var multipleFileUpload="";
        var limitFileUploadType="";
        var fileup="opt1";
              var fileSizeLimit;
              var LIMIT_FILE_SIZE=false;
              var LIMIT_MAX_FILEUP_SIZE;
              var LIMIT_MUL_FILE_UP;
              var MUL_FILE_UP=false;
              $.each( obj.fields[i].field_options, function( key, value ) {
            
                  if(key=="description"){
                    description=value;
                  }else if(key=="customcssclass"){
                    customcssclass=value;
                  }else if(key=='LIMIT_FILE_UP_TXTAR'){
         checkExtension=value } 
         else if(key=='MUL_FILE_UP'){
         multipleFileUpload=value } 
         else if(key=='LIMIT_FIL_UPLOAD_TYPE'){
         limitFileUploadType=value }  
         else if(key=='fileup'){
         fileup=value }
                else if(key=='LIMIT_FILE_SIZE'){
                     LIMIT_FILE_SIZE=value }
                else if(key=='LIMIT_MAX_FILEUP_SIZE'){
                     LIMIT_MAX_FILEUP_SIZE=value }
                     else if(key=='LIMIT_MUL_FILE_UP'){
                     LIMIT_MUL_FILE_UP=value }
                 
            });
            var callFunctionFileSize="";
            if(LIMIT_FILE_SIZE==true){
                callFunctionFileSize="checkFileSize(this,\'"+LIMIT_MAX_FILEUP_SIZE+"\');";
            }
            var callFunctionFilesLimit="";
            if(LIMIT_MUL_FILE_UP>0){
                callFunctionFilesLimit="checkTotalFiles(this,\'"+LIMIT_MUL_FILE_UP+"\');";
            }

          if(multipleFileUpload==true){
      if(limitFileUploadType==true){
      if(fileup!="opt1"){
      htmlfile ='<div class="elementdiv "> <span> <input  '+requiredElement+' '+requiredElement+' '+elementId+' type="file" class="myfile"  name="'+obj.fields[i].label+'[]"  onchange="checkExtensions(this,\''+checkExtension+'\');'+callFunctionFileSize+' '+callFunctionFilesLimit+' "  multiple> </span> </div>';
          
      }
      else{
      htmlfile ='<div class="elementdiv "> <span> <input '+requiredElement+' '+elementId+' type="file" class="myfile" name="'+obj.fields[i].label+'[]"  onchange="checkExtensions2(this,\''+checkExtension+'\');'+callFunctionFileSize+'  '+callFunctionFilesLimit+'   "  multiple> </span> </div>';
          
      }
          
      }
      else{
          htmlfile ='<div class="elementdiv "> <span> <input '+requiredElement+' '+elementId+' type="file" class="myfile" name="'+obj.fields[i].label+'[]"  onchange="'+callFunctionFileSize+' '+callFunctionFilesLimit+'  "  multiple> </span> </div>';
          
      }
      
      }
      else{
       
      if(limitFileUploadType==true){
      if(fileup!="opt1"){
      htmlfile ='<div class="elementdiv "> <span> <input '+requiredElement+' '+elementId+' type="file" class="myfile" name="'+obj.fields[i].label+'[]"  onchange="checkExtensions(this,\''+checkExtension+'\'); '+callFunctionFileSize+'  "  > </span> </div>';
          
      }
      else{
      htmlfile ='<div class="elementdiv "> <span> <input '+requiredElement+' '+elementId+' type="file" class="myfile" name="'+obj.fields[i].label+'[]"  onchange="checkExtensions2(this,\''+checkExtension+'\'); '+callFunctionFileSize+'  "  > </span> </div>';  
      }
      }
      else{
          htmlfile ='<div class="elementdiv "> <span> <input '+requiredElement+' '+elementId+' type="file" class="myfile"  name="'+obj.fields[i].label+'[]"  onchange=" '+callFunctionFileSize+' "  > </span> </div>';  
      }
      }              
              document.getElementById("showform").innerHTML =
              document.getElementById("showform").innerHTML+'<div '+logicId+' class="subtemplate-wrapper form-group'+visibleHtml+'" '+statusShow+'>  <label class="'+setLabelClass+'"> <span>'+obj.fields[i].label+requiredHtml+'</span></label>'+htmlfile +'<input type="text" id="allFiles" name="'+obj.fields[i].label+'" style="display:none;"/></div> ';
          }
        // file upload ends


// Section Break section_break
 if(obj.fields[i].field_type=="section_break"){
     
     document.getElementById("showform").innerHTML =
     document.getElementById("showform").innerHTML+'<div class="subtemplate-wrapper form-group" style="border-bottom:1px solid black !important;"></div><br>';
 }


  //Signature
  signatureStatus=true;
       var radio_Html="";
      if(obj.fields[i].field_type=="signature"){    
       // Get Text Propertise
          var htmlEmail='';
          var description=customcssclass='';
          $.each( obj.fields[i].field_options, function( key, value ) {

             if(key=="description"){
                description=value;
              }
              else if(key=="customcssclass"){
                    customcssclass=value;
                  }

            });
        var descriptionHtml="";
         // Description
        if(description!=""){
          descriptionHtml=' <span class="help-block">'+description+'</span>'; 
        }

          htmlEmail +='<div class="sigPad elementdiv"> <p class="drawItDesc">Draw your signature</p> <ul class="sigNav"> <li class="drawIt"><a href="#draw-it" >Draw It</a></li> <li class="clearButton"><a href="#clear">Clear</a></li> </ul> <div class="sig sigWrapper"> <div class="typed"></div> <canvas class="pad" width="198" height="55"></canvas> <input '+requiredElement+' type="hidden" name="'+obj.fields[i].label+'" class="output signature"> </div></div>';

            document.getElementById("showform").innerHTML =
            document.getElementById("showform").innerHTML+'<div '+logicId+' class="subtemplate-wrapper form-group response-field-Name '+visibleHtml+' '+customcssclass+'" '+statusShow+'>  <label class="'+setLabelClass+'"> <span>'+obj.fields[i].label+requiredHtml+'</span></label>'+htmlEmail+'</div> ';
         }
      //End Signature

        if(obj.fields.length==(i+1))
        {

            // Scroll Down 
             var height=($(document).height()+$( window ).height()+200);
            // console.log("height"+$( window ).height()+" docu "+height);
             window.scrollTo(0,height);
        }

     }//end for
        document.getElementById("showform").innerHTML =
        document.getElementById("showform").innerHTML+'<input class="btn btn-success bt-style  " type="submit" id="successMessage" value="Submit " />';


  }//End RenderForm
  
  //pass parameter datepicker
function dateFunction(id,formatme,minDate,maxDate,weekday,allDisabledDates) {
    console.log(formatme+" "+weekday);
    if(formatme=="mm/dd/yy"){formatme="mm/dd/yy";}else{formatme="dd/mm/yy";}
  var allDisabledDatesArray = allDisabledDates.split(',');
    $(".dateimg"+id).hide();
    if(weekday=="false"){
        $("#rend"+id).datepicker({
        showOn: "button",
        buttonImage: "https://condoprodata.com/wp-content/plugins/easy-form-builder-by-bitware/img/calendar.gif",
        buttonImageOnly: true,
        buttonText: "Select date",
        dateFormat: formatme,
                                         beforeShowDay: function(mydate){
                                         var $return=true;
                                         var $returnclass ="available";
                                         var $myBadDates = allDisabledDatesArray;
                                         $checkdate = $.datepicker.formatDate(formatme, mydate);
                                         for(var i = 0; i < $myBadDates.length; i++)
                                         {
                                         if($myBadDates[i] == $checkdate)
                                         {
                                         $return = false;
                                         $returnclass= "unavailable";
                                         }
                                         }
                                         return [$return,$returnclass];
                                         },
        minDate: minDate,
        maxDate: maxDate,
        onSelect: function(dateText, inst) {
            var pieces = dateText.split('/');
            console.log('piece'+pieces);
            if(formatme=="mm/dd/yy")
             {
              $('#mm'+id).val(pieces[0]);
              $('#dd'+id).val(pieces[1]);
              $('#yy'+id).val(pieces[2]);
             }
             else 
              {
              $('#dd'+id).val(pieces[0]);
              $('#mm'+id).val(pieces[1]);
              $('#yy'+id).val(pieces[2]);
             } 
        }

      });
    }
    else
    {
        $("#rend"+id).datepicker({
        showOn: "button",
        buttonImage: "https://condoprodata.com/wp-content/plugins/easy-form-builder-by-bitware/img/calendar.gif",
        buttonImageOnly: true,
        buttonText: "Select date",
        dateFormat: formatme,
        minDate: minDate,
        maxDate: maxDate,
                                         beforeShowDay: function(mydate){
                                         var $return=true;
                                         var $returnclass ="available";
                                         var $myBadDates = allDisabledDatesArray;
                                         $checkdate = $.datepicker.formatDate(formatme, mydate);
                                         for(var i = 0; i < $myBadDates.length; i++)
                                         {
                                         if($myBadDates[i] == $checkdate)
                                         {
                                         $return = false;
                                         $returnclass= "unavailable";
                                         return [$return,$returnclass];
                                         }
                                         }
                                         mydate = mydate.getDay();
                                         return [mydate > 0 && mydate < 6, ""];
                                         },
        onSelect: function(dateText, inst) {
            var pieces = dateText.split('/');
            console.log('piece'+pieces);
            if(formatme=="mm/dd/yy")
             {
              $('#mm'+id).val(pieces[0]);
              $('#dd'+id).val(pieces[1]);
              $('#yy'+id).val(pieces[2]);
             }
             else 
              {
              $('#dd'+id).val(pieces[0]);
              $('#mm'+id).val(pieces[1]);
              $('#yy'+id).val(pieces[2]);
             } 
        },
        
      });
    }  
}
  
  
function removeParam(key, sourceURL) {
    var rtn = sourceURL.split("?")[0],
        param,
        params_arr = [],
        queryString = (sourceURL.indexOf("?") !== -1) ? sourceURL.split("?")[1] : "";
    if (queryString !== "") {
        params_arr = queryString.split("&");
        for (var i = params_arr.length - 1; i >= 0; i -= 1) {
            param = params_arr[i].split("=")[0];
            if (param === key) {
                params_arr.splice(i, 1);
            }
        }
        rtn = rtn + "?" + params_arr.join("&");
    }
    return rtn;
}
  function submit_form_data()
  {   	
  
  if(signatureStatus==true){
	  var checkSign=false;
	  $(".signature").each(function() {
    if($(this).val()==""){
		alert("Please sign the document");
		checkSign=true;
		return false;
	}
});
if(checkSign==true){
	return false;
}
  }
  
var jsonFData=$('#showform').serializeArray();
//alert(jsonFData[0].name);
for(var i=0;i<jsonFData.length;i++)
{
    if (jsonFData[i]['name']=="g-recaptcha-response") {
        // do something with `key'
	delete jsonFData[i];
    }
	/* if (jsonFData[i]['name']=="CAPTCHA[]") {
        // do something with `key'
		delete jsonFData[i];
    }  
	 if (jsonFData[i]['name']=="FILE_UPLOAD") {
		delete jsonFData[i];
    }*/
}
	//alert('success message is :'+$( "#successMessage" ).hasClass( "disabled" ));
	if($( "#successMessage" ).hasClass( "disabled" )==false){
		
	  if(FileUploadStatus==true)
		{
				var form_data = new FormData();   
				var leng=$('.myfile').prop('files').length;
				while(leng>0){
						var file_data = $('.myfile').prop('files')[leng-1];  
						form_data.append('file[]', file_data);
						leng--;
				}
					form_data.append('action', 'EFBP_verify_upload_file');
			                            
				$.ajax({
						url: 'https://condoprodata.com/wp-admin/admin-ajax.php', // point to server-side PHP script 
						cache: false,
						contentType: false,
						processData: false,
						data:form_data,                         
						type: 'post',
						success: function(php_script_response){
							$("#allFiles").val(php_script_response);
							
							if(captchaStatus==true){
		var responseCaptcha = secretKey; // "6LdbjxoTAAAAAK22tBPZIK2NiE4ujB4CWPJRR88h";
		var responseVar=grecaptcha.getResponse();
		var data = {
			'action':'EFBP_verify_captcha',
			'secret ': responseCaptcha,
			'responseVar ':responseVar
			};
			  $.ajax({
            type: "POST",
            url: "https://condoprodata.com/wp-admin/admin-ajax.php",
			async:    false,
            data: "action=" + 'EFBP_verify_captcha' + "&secret=" + responseCaptcha + "&responseVar=" + responseVar
        }).done(function(status) {
            if (status == "1") {
				jsonFData=$('#showform').serializeArray();
for(var i=0;i<jsonFData.length;i++)
{
    if (jsonFData[i]['name']=="g-recaptcha-response") {
        // do something with `key'
	delete jsonFData[i];
    }
	/* if (jsonFData[i]['name']=="CAPTCHA[]") {
        // do something with `key'
		delete jsonFData[i];
    }  
	 if (jsonFData[i]['name']=="FILE_UPLOAD") {
		delete jsonFData[i];
    }*/
}
		jQuery.post("https://condoprodata.com/wp-admin/admin-ajax.php",
		 {
			'action':'EFBP_submit_form_json_data',
			'formdata':JSON.stringify(jsonFData),
			'form_id':form_id,
			'user_id':user_id
		},function(response) {	  if(Formjson.forms[0].field_options.submitconfirm!="")
            {   
						  alert(Formjson.forms[0].field_options.submitconfirm);
            }
			  if(Formjson.forms[0].field_options.redirecturl!="")
            {   
						window.location.assign(Formjson.forms[0].field_options.redirecturl);
            }else{
				alert("Data has been saved successfully.");
					window.location.reload();
			}
		});		
            }
			else{
				alert("Wrong Capcha");
			}
        });

  }
  else{  // if captchstatus is false      
  	jsonFData=$('#showform').serializeArray();
//alert(jsonFData[0].name);
for(var i=0;i<jsonFData.length;i++)
{
    if (jsonFData[i]['name']=="g-recaptcha-response") {
        // do something with `key'
	delete jsonFData[i];
    }
	/* if (jsonFData[i]['name']=="CAPTCHA[]") {
        // do something with `key'
		delete jsonFData[i];
    }  
	 if (jsonFData[i]['name']=="FILE_UPLOAD") {
		delete jsonFData[i];
    }*/
}
		jQuery.post("https://condoprodata.com/wp-admin/admin-ajax.php",
		 {
			'action':'EFBP_submit_form_json_data',
			'formdata':JSON.stringify(jsonFData),
			'form_id':form_id,
			'user_id':user_id
		},function(response) {	  if(Formjson.forms[0].field_options.submitconfirm!="")
            {   
						  alert(Formjson.forms[0].field_options.submitconfirm);
            }
			  if(Formjson.forms[0].field_options.redirecturl!="")
            {   
						window.location.assign(Formjson.forms[0].field_options.redirecturl);
            }else{
				alert("Data has been saved successfully.");
					location.reload();
			}
		});		
  }
						}
			 });
		}
		else if(captchaStatus==true){ // if its not upload status then check for captcha status.
	  var responseCaptcha = secretKey; //"6LdbjxoTAAAAAK22tBPZIK2NiE4ujB4CWPJRR88h";
		
		var responseVar=grecaptcha.getResponse();
	//	alert(responseVar);
		var data = {
			'action':'EFBP_verify_captcha',
			'secret ': responseCaptcha,
			'responseVar ':responseVar
			};
			//alert(data);
			  $.ajax({
            type: "POST",
            url: "https://condoprodata.com/wp-admin/admin-ajax.php",
			async:    false,
            data: "action=" + 'EFBP_verify_captcha' + "&secret=" + responseCaptcha + "&responseVar=" + responseVar
        }).done(function(status) {
		//	alert(status);
            if (status == "1") {
      		jsonFData=$('#showform').serializeArray();
//alert(jsonFData[0].name);
for(var i=0;i<jsonFData.length;i++)
{
    if (jsonFData[i]['name']=="g-recaptcha-response") {
        // do something with `key'
	delete jsonFData[i];
    }
	/* if (jsonFData[i]['name']=="CAPTCHA[]") {
        // do something with `key'
		delete jsonFData[i];
    }  
	 if (jsonFData[i]['name']=="FILE_UPLOAD") {
		delete jsonFData[i];
    }*/
}
		jQuery.post("https://condoprodata.com/wp-admin/admin-ajax.php",
		 {
			'action':'EFBP_submit_form_json_data',
			'formdata':JSON.stringify(jsonFData),
			'form_id':form_id,
			'user_id':user_id
		},function(response) {	  if(Formjson.forms[0].field_options.submitconfirm!="")
            {   
						  alert(Formjson.forms[0].field_options.submitconfirm);
            }
			  if(Formjson.forms[0].field_options.redirecturl!="")
            {   
						window.location.assign(Formjson.forms[0].field_options.redirecturl);
            }else{
				alert("Data has been saved successfully.");
					location.reload();
			}
		});		
            }
			else{
				alert("Wrong Capcha");
			}
        });

  }
  else{    // if its not captcha or upload then submit remaining fields of the form
  			jsonFData=$('#showform').serializeArray();
//alert(jsonFData[0].name);
for(var i=0;i<jsonFData.length;i++)
{
    if (jsonFData[i]['name']=="g-recaptcha-response") {
        // do something with `key'
	delete jsonFData[i];
    }
	/* if (jsonFData[i]['name']=="CAPTCHA[]") {
        // do something with `key'
		delete jsonFData[i];
    }  
	 if (jsonFData[i]['name']=="FILE_UPLOAD") {
		delete jsonFData[i];
    }*/
}
		jQuery.post("https://condoprodata.com/wp-admin/admin-ajax.php",
		 {
			'action':'EFBP_submit_form_json_data',
			'formdata':JSON.stringify(jsonFData),
			'form_id':form_id,
			'user_id':user_id
		},function(response) {
				  if(Formjson.forms[0].field_options.submitconfirm!="")
            {   
						  alert(Formjson.forms[0].field_options.submitconfirm);
            }
			  if(Formjson.forms[0].field_options.redirecturl!="")
            {   
						window.location.assign(Formjson.forms[0].field_options.redirecturl);
            }else{
				alert("Data has been saved successfully.");
					location.reload();
			}
			
              
		});		
  }
	}
	else{
		return false;
	}
}


jQuery(document).ready(function() {
  
 	// $('#showform').attr('action',Formjson.forms[0].field_options.redirecturl);
	renderForm();
	    jQuery('.sigPad').signaturePad({drawOnly:true});
      
});

	</script>
	
	{"id":7478,"date":"2016-08-09T11:22:22","date_gmt":"2016-08-09T21:22:22","guid":{"rendered":"http:\/\/condoprosoftware.com\/?page_id=7478"},"modified":"2016-08-09T11:25:23","modified_gmt":"2016-08-09T21:25:23","slug":"easy-form","status":"publish","type":"page","link":"https:\/\/condoprodata.com\/?page_id=7478","title":{"rendered":"Easy Form"},"content":{"rendered":"","protected":false},"excerpt":{"rendered":"","protected":false},"author":1,"featured_media":0,"parent":0,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"footnotes":""},"_links":{"self":[{"href":"https:\/\/condoprodata.com\/index.php?rest_route=\/wp\/v2\/pages\/7478"}],"collection":[{"href":"https:\/\/condoprodata.com\/index.php?rest_route=\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/condoprodata.com\/index.php?rest_route=\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/condoprodata.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/condoprodata.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=7478"}],"version-history":[{"count":3,"href":"https:\/\/condoprodata.com\/index.php?rest_route=\/wp\/v2\/pages\/7478\/revisions"}],"predecessor-version":[{"id":7481,"href":"https:\/\/condoprodata.com\/index.php?rest_route=\/wp\/v2\/pages\/7478\/revisions\/7481"}],"wp:attachment":[{"href":"https:\/\/condoprodata.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=7478"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}