Version Description
- Accesibility update
Download this release
Release Info
Developer | codepeople |
Plugin | Contact Form Email |
Version | 1.3.29 |
Comparing to | |
See all releases |
Code changes from version 1.3.28 to 1.3.29
- README.txt +5 -3
- form-to-email.php +1 -1
- js/fbuilderf.jquery.js +1 -1
- js/fbuilderf.jquery.original.js +2 -2
README.txt
CHANGED
@@ -456,6 +456,9 @@ When you click a field already added into the contact form builder area, you can
|
|
456 |
|
457 |
== Changelog ==
|
458 |
|
|
|
|
|
|
|
459 |
= 1.3.28 =
|
460 |
* Compatibility with Elementor
|
461 |
* CSV export improvements
|
@@ -1139,6 +1142,5 @@ When you click a field already added into the contact form builder area, you can
|
|
1139 |
|
1140 |
== Upgrade Notice ==
|
1141 |
|
1142 |
-
= 1.3.
|
1143 |
-
*
|
1144 |
-
* CSV export improvements
|
456 |
|
457 |
== Changelog ==
|
458 |
|
459 |
+
= 1.3.29 =
|
460 |
+
* Accesibility update
|
461 |
+
|
462 |
= 1.3.28 =
|
463 |
* Compatibility with Elementor
|
464 |
* CSV export improvements
|
1142 |
|
1143 |
== Upgrade Notice ==
|
1144 |
|
1145 |
+
= 1.3.29 =
|
1146 |
+
* Accesibility update
|
|
form-to-email.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
Plugin Name: Contact Form Email
|
4 |
Plugin URI: https://form2email.dwbooster.com/download
|
5 |
Description: Contact form that sends the data to email and also to a database list and CSV file.
|
6 |
-
Version: 1.3.
|
7 |
Author: CodePeople
|
8 |
Author URI: https://form2email.dwbooster.com
|
9 |
Text Domain: contact-form-to-email
|
3 |
Plugin Name: Contact Form Email
|
4 |
Plugin URI: https://form2email.dwbooster.com/download
|
5 |
Description: Contact form that sends the data to email and also to a database list and CSV file.
|
6 |
+
Version: 1.3.29
|
7 |
Author: CodePeople
|
8 |
Author URI: https://form2email.dwbooster.com
|
9 |
Text Domain: contact-form-to-email
|
js/fbuilderf.jquery.js
CHANGED
@@ -1,2 +1,2 @@
|
|
1 |
jQuery(function(){var n;(n=jQuery).extend({stringifyXX:function(r){encodeParam=function(n,r){return r?(n=n.replace(/&/g,"%26"),encodeURI(n)):n},enc=function(n){return n=(n=n.replace(/\\/g,"\\\\")).replace(/\"/g,'\\"')};var e=typeof r;if("object"!=e||null===r)return"string"==e&&(r='"'+r+'"'),encodeParam(String(r));var t,c,i=[],o=r&&r.constructor==Array;for(t in r)"function"!=(e=typeof(c=r[t]))&&("string"==e?c='"'+enc(c)+'"':"object"==e&&null!==c&&(c=n.stringifyXX(c)),i.push((o?"":'"'+t+'":')+String(c)));return encodeParam(o?"[":"{")+String(i)+(o?"]":"}")}})});
|
2 |
-
jQuery(window).on("load",function(){!function($){$.fn.CFTEfbuilder=function(options){var opt=$.extend({},{typeList:new Array({id:"ftext",name:"Single Line"},{id:"fnumber",name:"Number"},{id:"femail",name:"Email"},{id:"fdate",name:"Date Time"},{id:"ftextarea",name:"Text Area"},{id:"fcurrency",name:"Currency"},{id:"fcheck",name:"Checkboxes"},{id:"fradio",name:"Radio Buttons"},{id:"fdropdown",name:"Dropdown"},{id:"ffile",name:"Upload File"},{id:"fpassword",name:"Password"},{id:"fPhone",name:"Phone field"},{id:"fCommentArea",name:"Instruct. Text"},{id:"fhidden",name:"Hidden"},{id:"fSectionBreak",name:"Section break"},{id:"fPageBreak",name:"Page break"},{id:"fsummary",name:"Summary"},{id:"fMedia",name:"Media"},{id:"fButton",name:"Button"},{id:"fhtml",name:"HTML content"},{id:"facceptance",name:"Accept / GDPR"},{id:"category",name:"Container Controls"},{id:"ffieldset",name:"Fieldset"},{id:"fdiv",name:"Div"},{id:"category",name:"Form Controls with Datasource Connection"},{id:"ftextds",name:"Line Text DS"},{id:"femailds",name:"Email DS"},{id:"ftextareads",name:"Text Area DS"},{id:"fcheckds",name:"Checkboxes DS"},{id:"fradiods",name:"Radio Btns DS"},{id:"fPhoneds",name:"Phone DS"},{id:"fdropdownds",name:"Dropdown DS"},{id:"fhiddends",name:"Hidden DS"},{id:"fnumberds",name:"Number DS"},{id:"fcurrencyds",name:"Currency DS"}),pub:!1,identifier:"",title:""},options,!0);if(opt.pub&&(opt.messages=$.extend({previous:"Previous",next:"Next",page:"Page",of:"of",required:"This field is required.",email:"Please enter a valid email address.",datemmddyyyy:"Please enter a valid date with this format(mm/dd/yyyy)",dateddmmyyyy:"Please enter a valid date with this format(dd/mm/yyyy)",number:"Please enter a valid number.",digits:"Please enter only digits.",maxlength:$.validator.format("Please enter no more than {0} characters"),minlength:$.validator.format("Please enter at least {0} characters."),equalTo:"Please enter the same value again.",max:$.validator.format("Please enter a value less than or equal to {0}."),min:$.validator.format("Please enter a value greater than or equal to {0}.")},opt.messages),opt.messages.max=$.validator.format(opt.messages.max),opt.messages.min=$.validator.format(opt.messages.min),$.extend($.validator.messages,opt.messages)),getNameByIdFromType=function(e){for(var i=0;i<opt.typeList.length;i++)if(opt.typeList[i].id==e)return opt.typeList[i].name;return""},!opt.pub){for(var i=0;i<opt.typeList.length;i++)"category"==opt.typeList[i].id?$("#tabs-1").append('<div style="clear:both;"></div><br /><div class="category-description">'+opt.typeList[i].name+"</div><hr />"):$("#tabs-1").append('<div class="button width40 '+(i>5&&20!=i||i%2==1?"n":"itemForm")+'" id="'+opt.typeList[i].id+'">'+opt.typeList[i].name+"</div>");$("#tabs-1").append('<div class="clearer"></div>')}opt.pub||$(".button").button();var items=new Array,itemSelected=-2;function htmlDecode(e){return/&(?:#x[a-f0-9]+|#[0-9]+|[a-z0-9]+);?/gi.test(e)&&(e=$("<div/>").html(e).text()),e}function htmlEncode(e){return e=(e=$("<div/>").text(e).html()).replace(/"/g,""")}function showHideDep(){function e(e,i){for(var t=0;t<i.length;t++)if(i[t]==e)return!0;return!1}function t(e,i){for(var t=0;t<i.length;t++)i[t]==e&&(i.splice(t,1),t--);return i}var s=new Array,a=new Array;$(".depItem").each(function(){var n=$(this);try{if(1==n.parents("#fieldlist"+opt.identifier).length&&n.attr("dep")&&""!=n.attr("dep")){var l=n.attr("dep").split(",");for(i=0;i<l.length;i++)if(""!=l[i]&&(l[i]=l[i]+opt.identifier),""!=l[i]&&!e(l[i],s))try{!n.is(":checked")&&!n.is(":selected")||e(n.hasClass("field")?n.attr("id"):n.parents(".field").attr("id"),a)?($("#"+l[i]).parents(".fields").css("display","none"),$("#"+l[i]).parents(".fields").find(".field").each(function(){$(this).addClass("ignore")}),a[a.length]=l[i]):($("#"+l[i]).parents(".fields").css("display",""),$("#"+l[i]).parents(".fields").find(".field").each(function(){$(this).hasClass("ignorepb")||$(this).removeClass("ignore")}),s[s.length]=l[i],t(l[i],a))}catch(e){}}}catch(e){}})}editItem=function(e){opt.pub||$("#tabs").tabs("option","active",1);try{$("#tabs-2").html(items[e].showAllSettings())}catch(e){}itemSelected=e,$(".helpfbuilder").click(function(){alert($(this).attr("text"))}),$("#sValue").bind("keyup",function(){items[e].value=$(this).val(),reloadItems()}),$("#sURL").bind("keyup",function(){items[e].url=$(this).val(),reloadItems()}),$("#sMessage").bind("keyup",function(){items[e].message=$(this).val(),reloadItems()}),$("#sMinDate").change(function(){items[e].minDate=$(this).val(),reloadItems()}),$("#sMaxDate").change(function(){items[e].maxDate=$(this).val(),reloadItems()}),$("#sDefaultDate").change(function(){items[e].defaultDate=$(this).val(),reloadItems()}),$("#sTitle").keyup(function(){var i=$(this).val();items[e].title=i.replace(/\n/g,"<br />"),reloadItems()}),$("#sName").keyup(function(){items[e].name=$(this).val(),reloadItems()}),$("#sShortlabel").keyup(function(){items[e].shortlabel=$(this).val(),reloadItems()}),$("#sPredefined").keyup(function(){items[e].predefined=$(this).val(),reloadItems()}),$("#sPredefinedClick").click(function(){items[e].predefinedClick=$(this).is(":checked"),reloadItems()}),$("#sEq").keyup(function(){items[e].eq=$(this).val(),reloadItems()}),$("#sSuffix").keyup(function(){items[e].suffix=$(this).val(),reloadItems()}),$("#sPrefix").keyup(function(){items[e].prefix=$(this).val(),reloadItems()}),$("#sDecimalSymbol").keyup(function(){items[e].decimalsymbol=$(this).val(),reloadItems()}),$("#sGroupingSymbol").keyup(function(){items[e].groupingsymbol=$(this).val(),reloadItems()}),$("#sDropdownRange").keyup(function(){items[e].dropdownRange=$(this).val(),reloadItems()}),$("#sRequired").click(function(){items[e].required=$(this).is(":checked"),reloadItems()}),$("#sReadOnly").click(function(){items[e].readonly=$(this).is(":checked"),reloadItems()}),$("#sShowDropdown").click(function(){items[e].showDropdown=$(this).is(":checked"),$(this).is(":checked")?$("#divdropdownRange").css("display",""):$("#divdropdownRange").css("display","none"),reloadItems()}),$("#sSize").change(function(){items[e].size=$(this).val(),reloadItems()}),$("#sFormat").change(function(){items[e].dformat=$(this).val(),reloadItems()}),$("#sLayout").change(function(){items[e].layout=$(this).val(),reloadItems()}),$("#sMin").change(function(){items[e].min=$(this).val(),reloadItems()}),$("#sMax").change(function(){items[e].max=$(this).val(),reloadItems()}),$("#sMinlength").change(function(){items[e].minlength=$(this).val(),reloadItems()}),$("#sMaxlength").change(function(){items[e].maxlength=$(this).val(),reloadItems()}),$("#sEqualTo").change(function(){items[e].equalTo=$(this).val(),reloadItems()}),$(".showHideDependencies").click(function(){return items[e].showDep?($(this).parent().removeClass("show"),$(this).parent().addClass("hide"),$(this).html("Show Dependencies"),items[e].showDep=!1):($(this).parent().addClass("show"),$(this).parent().removeClass("hide"),$(this).html("Hide Dependencies"),items[e].showDep=!0),!1}),$(".choice_remove").click(function(){1==items[e].choices.length?(items[e].choices[0]="",items[e].choicesVal[0]="",items[e].choicesDep[0]=new Array):(items[e].choices.splice($(this).attr("i"),1),items[e].choicesVal.splice($(this).attr("i"),1),items[e].choicesDep.splice($(this).attr("i"),1)),"fcheck"==items[e].ftype&&(1==items[e].choiceSelected.length?items[e].choiceSelected[0]="":items[e].choiceSelected.splice($(this).attr("i"),1)),editItem(e),reloadItems()}),$(".choice_add").click(function(){items[e].choices.splice(1*$(this).attr("i")+1,0,""),items[e].choicesVal.splice(1*$(this).attr("i")+1,0,""),items[e].choicesDep.splice(1*$(this).attr("i")+1,0,new Array),"fcheck"==items[e].ftype&&items[e].choiceSelected.splice(1*$(this).attr("i")+1,0,!1),editItem(e),reloadItems()}),$(".choice_text").keyup(function(){items[e].choices[$(this).attr("i")]==items[e].choicesVal[$(this).attr("i")]&&($("#"+$(this).attr("id")+"V"+$(this).attr("i")).val($(this).val()),items[e].choicesVal[$(this).attr("i")]=$(this).val()),items[e].choices[$(this).attr("i")]=$(this).val(),reloadItems()}),$(".choice_value").keyup(function(){items[e].choicesVal[$(this).attr("i")]=$(this).val(),reloadItems()}),$(".choice_radio").click(function(){$(this).is(":checked")&&(items[e].choiceSelected=items[e].choicesVal[$(this).attr("i")]),reloadItems()}),$(".choice_select").click(function(){$(this).is(":checked")&&(items[e].choiceSelected=items[e].choicesVal[$(this).attr("i")]),reloadItems()}),$(".choice_check").click(function(){$(this).is(":checked")?items[e].choiceSelected[$(this).attr("i")]=!0:items[e].choiceSelected[$(this).attr("i")]=!1,reloadItems()}),$("#sUserhelp").keyup(function(){items[e].userhelp=$(this).val(),reloadItems()}),$("#sUserhelpTooltip").click(function(){items[e].userhelpTooltip=$(this).is(":checked"),reloadItems()}),$("#sCsslayout").keyup(function(){items[e].csslayout=$(this).val(),reloadItems()}),$(".equalTo").each(function(){for(var e='<option value="" '+(""==$(this).attr("dvalue")?"selected":"")+"></option>",i=0;i<items.length;i++)"ftext"!=items[i].ftype&&"femail"!=items[i].ftype&&"fpassword"!=items[i].ftype||items[i].name==$(this).attr("dname")||(e+='<option value="'+items[i].name+'" '+(items[i].name==$(this).attr("dvalue")?"selected":"")+">"+items[i].title+"</option>");$(this).html(e)}),$(".dependencies").each(function(){for(var e='<option value="" '+(""==$(this).attr("dvalue")?"selected":"")+"></option>",i=0;i<items.length;i++)items[i].name!=$(this).attr("dname")&&(e+='<option value="'+items[i].name+'" '+(items[i].name==$(this).attr("dvalue")?"selected":"")+">"+items[i].title+"</option>");$(this).html(e)}),$(".dependencies").change(function(){items[e].choicesDep[$(this).attr("i")][$(this).attr("j")]=$(this).val(),reloadItems()}),$(".choice_removeDep").click(function(){1==items[e].choices.length?items[e].choicesDep[$(this).attr("i")][0]="":items[e].choicesDep[$(this).attr("i")].splice($(this).attr("j"),1),editItem(e),reloadItems()}),$(".choice_addDep").click(function(){items[e].choicesDep[$(this).attr("i")].splice(1*$(this).attr("j")+1,0,""),editItem(e),reloadItems()})},editForm=function(){$("#tabs-3").html(theForm.showAllSettings()),itemSelected=-1,$("#fTitle").keyup(function(){theForm.title=$(this).val(),reloadItems()}),$("#fDescription").keyup(function(){theForm.description=$(this).val(),reloadItems()}),$("#fLayout").change(function(){theForm.formlayout=$(this).val(),reloadItems()})},removeItem=function(e){items.splice(e,1);for(var i=0;i<items.length;i++)items[i].index=i;$("#tabs").tabs("option","active",0),reloadItems()},reloadItems=function(){for(var e=0;e<showSettings.formlayoutList.length;e++)$("#fieldlist"+opt.identifier).removeClass(showSettings.formlayoutList[e].id);$("#fieldlist"+opt.identifier).addClass(theForm.formlayout),$("#formheader"+opt.identifier).html(theForm.display()),$("#fieldlist"+opt.identifier).html(""),-1==parseInt(itemSelected)?$(".fform").addClass("ui-selected"):$(".fform").removeClass("ui-selected");for(e=0;e<items.length;e++)items[e].index=e,$("#fieldlist"+opt.identifier).append(items[e].display()),e==itemSelected?$("#field"+opt.identifier+"-"+e).addClass("ui-selected"):$("#field"+opt.identifier+"-"+e).removeClass("ui-selected"),$(".fields").mouseover(function(){$(this).addClass("ui-over")}).mouseout(function(){$(this).removeClass("ui-over")}).click(function(){editItem($(this).attr("id").replace("field"+opt.identifier+"-","")),$(this).siblings().removeClass("ui-selected"),$(this).addClass("ui-selected")}),$(".field").focus(function(){$(this).blur()}),$("#field"+opt.identifier+"-"+e+" .remove").click(function(){removeItem($(this).parent().attr("id").replace("field"+opt.identifier+"-",""))});$("#fieldlist"+opt.identifier).html(),$("#saveForm").css("display","none"),$(".fform").mouseover(function(){$(this).addClass("ui-over")}).mouseout(function(){$(this).removeClass("ui-over")}).click(function(){$("#tabs").tabs("option","active",2),editForm(),$(this).siblings().removeClass("ui-selected"),$(this).addClass("ui-selected")}),ffunct.saveData("form_structure");var i="";for(e=0;e<items.length;e++)"femail"==items[e].ftype&&(i+='<option value="'+items[e].name+'" '+(items[e].name==$("#cu_user_email_field").attr("def")?"selected":"")+">"+items[e].title+"</option>");if($("#cu_user_email_field").html(i),$("#request_cost").length>0&&$("#request_cost").is("select")){for(i="",e=0;e<items.length;e++)i+='<option value="'+items[e].name+'" '+(items[e].name==$("#request_cost").attr("def")?"selected":"")+">"+items[e].name+"("+items[e].title+")</option>";$("#request_cost").html(i)}if($("#paypal_price_field").length>0){for(i='<option value="" '+(""==$("#paypal_price_field").attr("def")?"selected":"")+"> ---- No ---- </option>",e=0;e<items.length;e++)i+='<option value="'+items[e].name+'" '+(items[e].name==$("#paypal_price_field").attr("def")?"selected":"")+">"+items[e].title+"</option>";$("#paypal_price_field").html(i)}},reloadItemsPublic=function(){for(var e=0;e<showSettings.formlayoutList.length;e++)$("#fieldlist"+opt.identifier).removeClass(showSettings.formlayoutList[e].id);$("#fieldlist"+opt.identifier).html("").addClass(theForm.formlayout),$("#formheader"+opt.identifier).html(theForm.show());var i=0;$("#fieldlist"+opt.identifier).append('<div class="pb'+i+' pbreak" page="'+i+'"></div>');var t=new Array;for(e=0;e<items.length;e++){if(items[e].index=e,"fPageBreak"==items[e].ftype)i++,$("#fieldlist"+opt.identifier).append('<div class="pb'+i+' pbreak" page="'+i+'"></div>');else{if($("#fieldlist"+opt.identifier+" .pb"+i).append(items[e].show()),items[e].predefinedClick){var s=$("#fieldlist"+opt.identifier+" .pb"+i).find("#"+items[e].name).attr("class")+" predefinedClick";$("#fieldlist"+opt.identifier+" .pb"+i).find("#"+items[e].name).attr("class",s),$("#fieldlist"+opt.identifier+" .pb"+i).find("#"+items[e].name).attr("predefined",items[e].predefined)}if(items[e].userhelpTooltip){var a=$("#fieldlist"+opt.identifier+" .pb"+i).find("#"+items[e].name).parents(".fields");a.find(".uh").css("display","none"),""!=a.find(".uh").text()&&a.attr("uh",a.find(".uh").text())}}$(".fields").mouseover(function(){$(this).addClass("ui-over")}).mouseout(function(){$(this).removeClass("ui-over")}).click(function(){editItem($(this).attr("id").replace("field"+opt.identifier+"-","")),$(this).siblings().removeClass("ui-selected"),$(this).addClass("ui-selected")}),"fdate"==items[e].ftype&&(t[t.length]=items[e])}if(i>0?($("#fieldlist"+opt.identifier+" .pb"+i).addClass("pbEnd"),$("#fieldlist"+opt.identifier+" .pbreak").find(".field").addClass("ignore").addClass("ignorepb"),$("#fieldlist"+opt.identifier+" .pb0").find(".field").removeClass("ignore").removeClass("ignorepb"),$("#fieldlist"+opt.identifier+" .pbreak").each(function(e){var t=$(this).html(),s="";e==i&&($("#cpcaptchalayer"+opt.identifier).html()&&(t+='<div class="fields cpfieldcaptcha" id="fieldcaptcha'+opt.identifier+'">'+$("#cpcaptchalayer"+opt.identifier).html()+"</div>",$("#cpcaptchalayer"+opt.identifier).html("")),$("#cp_subbtn"+opt.identifier).html()&&(s='<div class="pbSubmit">'+$("#cp_subbtn"+opt.identifier).html()+"</div>")),$(this).html("<fieldset><legend>"+opt.messages.page+" "+(e+1)+" "+opt.messages.of+" "+(i+1)+"</legend>"+t+'<div class="pbPrevious">'+opt.messages.previous+'</div><div class="pbNext">'+opt.messages.next+"</div>"+s+'<div class="clearer"></div></fieldset>')}),$(".pbPrevious,.pbNext").bind("click",function(){if($(this).parents("form").valid()){var e=parseInt($(this).parents(".pbreak").attr("page"));$(this).hasClass("pbPrevious")?e--:e++,$("#fieldlist"+opt.identifier+" .pbreak").css("display","none"),$("#fieldlist"+opt.identifier+" .pbreak").find(".field").addClass("ignore").addClass("ignorepb"),$("#fieldlist"+opt.identifier+" .pb"+e).css("display","block"),$("#fieldlist"+opt.identifier+" .pb"+e).find(".field").removeClass("ignore").removeClass("ignorepb"),showHideDep()}return!1})):($("#cpcaptchalayer"+opt.identifier).html()&&($("#fieldlist"+opt.identifier+" .pb"+i).append('<div class="fields cpfieldcaptcha" id="fieldcaptcha'+opt.identifier+'">'+$("#cpcaptchalayer"+opt.identifier).html()+"</div>"),$("#cpcaptchalayer"+opt.identifier).html("")),$("#cp_subbtn"+opt.identifier).html()&&$("#fieldlist"+opt.identifier+" .pb"+i).append('<div class="pbSubmit">'+$("#cp_subbtn"+opt.identifier).html()+"</div>")),$(".pbSubmit").bind("click",function(){$(this).parents("#fieldlist"+opt.identifier).parents("form").submit()}),$("#fieldlist"+opt.identifier+" .predefinedClick").bind("click",function(){$(this).attr("predefined")==$(this).val()&&$(this).val("")}),$("#fieldlist"+opt.identifier+" .predefinedClick").blur("click",function(){""==$(this).val()&&$(this).val($(this).attr("predefined"))}),e>0){for(var n=0;n<t.length;n++)t[n].showDropdown?$("#"+t[n].name).datepicker({changeMonth:!0,changeYear:!0,yearRange:t[n].dropdownRange,dateFormat:t[n].dformat.replace(/yyyy/g,"yy")}):$("#"+t[n].name).datepicker({dateFormat:t[n].dformat.replace(/yyyy/g,"yy")}),$("#"+t[n].name).datepicker("option","minDate",t[n].minDate),$("#"+t[n].name).datepicker("option","maxDate",t[n].maxDate),$("#"+t[n].name).datepicker("option","defaultDate",t[n].defaultDate);showHideDep(),$.validator.addMethod("dateddmmyyyy",function(e,i){return this.optional(i)||/^(?:[1-9]|0[1-9]|1[0-9]|2[0-9]|3[0-1])[\/\-](?:[1-9]|0[1-9]|1[0-2])[\/\-]\d{4}$/.test(e)}),$.validator.addMethod("datemmddyyyy",function(e,i){return this.optional(i)||/^(?:[1-9]|0[1-9]|1[0-2])[\/\-](?:[1-9]|0[1-9]|1[0-9]|2[0-9]|3[0-1])[\/\-]\d{4}$/.test(e)}),$(".depItemSel,.depItem").bind("change",function(){showHideDep()});try{$("#fbuilder"+opt.identifier).tooltip({show:!1,hide:!1,tooltipClass:"uh-tooltip",position:{my:"left top",at:"left bottom",collision:"none"},items:"[uh]",content:function(){return $(this).attr("uh")}})}catch(e){}}for(e=0;e<items.length;e++)items[e].after_show()};var showSettings={sizeList:new Array({id:"small",name:"Small"},{id:"medium",name:"Medium"},{id:"large",name:"Large"}),layoutList:new Array({id:"one_column",name:"One Column"},{id:"two_column",name:"Two Column"},{id:"three_column",name:"Three Column"},{id:"side_by_side",name:"Side by Side"}),formlayoutList:new Array({id:"top_aligned",name:"Top Aligned"},{id:"left_aligned",name:"Left Aligned"},{id:"right_aligned",name:"Right Aligned"}),showTitle:function(e,i){var t='<label>Field Label</label><textarea class="large" name="sTitle" id="sTitle">'+i+"</textarea>";return"Page Break"==i&&(t=""),"<label>Field Type: "+getNameByIdFromType(e)+"</label><br /><br />"+t},showName:function(e,i){return'<div><label>Short label (optional) [<a class="helpfbuilder" text="The short label is used at title for the column when exporting the form data to CSV files.\n\nIf the short label is empty then, the field label will be used for the CSV file.">help?</a>] :</label><input class="large" name="sShortlabel" id="sShortlabel" value="'+i+'" /></div><div><label>Field tag for the message (optional):</label><input readonly="readonly" class="large" name="sNametag" id="sNametag" value="<%'+e+'%>" /><input style="display:none" readonly="readonly" class="large" name="sName" id="sName" value="'+e+'" /></div>'},showPredefined:function(e,i){return'<div><label>Predefined Value</label><textarea class="large" name="sPredefined" id="sPredefined">'+e+'</textarea><br /><input type="checkbox" name="sPredefinedClick" id="sPredefinedClick" '+(i?"checked":"")+' value="1" > Hide predefined value on click.</div>'},showEqualTo:function(e,i){return'<div><label>Equal to [<a class="helpfbuilder" text="Use this field to create password confirmation field or email confirmation fields.\n\nSpecify this setting ONLY into the confirmation field, not in the original field.">help?</a>]</label><br /><select class="equalTo" name="sEqualTo" id="sEqualTo" dvalue="'+e+'" dname="'+i+'"></select></div>'},showRequired:function(e){return'<div><input type="checkbox" name="sRequired" id="sRequired" '+(e?"checked":"")+"><label>Required</label></div>"},showSize:function(e){for(var i="",t=0;t<this.sizeList.length;t++)i+='<option value="'+this.sizeList[t].id+'" '+(this.sizeList[t].id==e?"selected":"")+">"+this.sizeList[t].name+"</option>";return'<label>Field Size</label><br /><select name="sSize" id="sSize">'+i+"</select>"},showLayout:function(e){for(var i="",t=0;t<this.layoutList.length;t++)i+='<option value="'+this.layoutList[t].id+'" '+(this.layoutList[t].id==e?"selected":"")+">"+this.layoutList[t].name+"</option>";return'<label>Field Layout</label><br /><select name="sLayout" id="sLayout">'+i+"</select>"},showUserhelp:function(e,i){return'<div><label>Instructions for User</label><textarea class="large" name="sUserhelp" id="sUserhelp">'+e+'</textarea><br /><input type="checkbox" name="sUserhelpTooltip" id="sUserhelpTooltip" '+(i?"checked":"")+' value="1" > Show as floating tooltip.</div>'},showCsslayout:function(e){return'<label>Additional CSS Class</label><input class="large" name="sCsslayout" id="sCsslayout" value="'+e+'" />'}},fform=function(){};$.extend(fform.prototype,{title:"Untitled Form",description:"This is my form. Please fill it out. It's awesome!",formlayout:"top_aligned",display:function(){return'<div class="fform" id="field">'+(""!=this.title?"<h1>"+this.title+"</h1>":"")+(""!=this.description?"<span>"+this.description+"</span>":"")+"</div>"},show:function(){var e="";return""!=this.title&&(e+="<h1>"+this.title+"</h1>"),""!=this.description&&(e+="<span>"+this.description+"</span>"),'<div class="fform" id="field">'+e+"</div>"},showAllSettings:function(){for(var e="",i=0;i<showSettings.formlayoutList.length;i++)e+='<option value="'+showSettings.formlayoutList[i].id+'" '+(showSettings.formlayoutList[i].id==this.formlayout?"selected":"")+">"+showSettings.formlayoutList[i].name+"</option>";return'<div><label>Form Name</label><input class="large" name="fTitle" id="fTitle" value="'+htmlEncode(this.title)+'" /></div><div><label>Description</label><textarea class="large" name="fDescription" id="fDescription">'+this.description+'</textarea></div><div><label>Label Placement</label><br /><select name="fLayout" id="fLayout">'+e+"</select></div>"}});var theForm=new fform,ffields=function(){};$.extend(ffields.prototype,{name:"",shortlabel:"",index:-1,ftype:"",userhelp:"",userhelpTooltip:!1,csslayout:"",init:function(){},after_show:function(){},showSpecialData:function(){return void 0!==this.showSpecialDataInstance?this.showSpecialDataInstance():""},showEqualTo:function(){return void 0!==this.equalTo?showSettings.showEqualTo(this.equalTo,this.name):""},showPredefined:function(){return void 0!==this.predefined?showSettings.showPredefined(this.predefined,this.predefinedClick):""},showRequired:function(){return void 0!==this.required?showSettings.showRequired(this.required):""},showSize:function(){return void 0!==this.size?showSettings.showSize(this.size):""},showLayout:function(){return void 0!==this.layout?showSettings.showLayout(this.layout):""},showRange:function(){return void 0!==this.min?this.showRangeIntance():""},showFormat:function(){if(void 0===this.dformat)return"";try{return this.showFormatIntance()}catch(e){return""}},showChoice:function(){return void 0!==this.choices?this.showChoiceIntance():""},showUserhelp:function(){return"fPageBreak"!=this.ftype?showSettings.showUserhelp(this.userhelp,this.userhelpTooltip):""},showCsslayout:function(){return"fPageBreak"!=this.ftype?showSettings.showCsslayout(this.csslayout):""},showAllSettings:function(){return this.showTitle()+this.showName()+this.showSize()+this.showLayout()+this.showFormat()+this.showRange()+this.showRequired()+this.showSpecialData()+this.showEqualTo()+this.showPredefined()+this.showChoice()+this.showUserhelp()+this.showCsslayout()},showTitle:function(){return showSettings.showTitle(this.ftype,this.title)},showName:function(){return"fPageBreak"!=this.ftype?showSettings.showName(this.name,this.shortlabel):""},display:function(){return"Not available yet"},show:function(){return"Not available yet"},toJSON:function(){return str="",$.each(this,function(e,i){"function"!=typeof i&&(""!=str&&(str+=","),str+='"'+e+'":'+i)}),str}});var ftext=function(){};$.extend(ftext.prototype,ffields.prototype,{title:"Untitled",ftype:"ftext",predefined:"",predefinedClick:!1,required:!1,size:"medium",minlength:"",maxlength:"",equalTo:"",display:function(){return'<div class="fields" id="field'+opt.identifier+"-"+this.index+'"><div class="arrow ui-icon ui-icon-play "></div><div class="remove ui-icon ui-icon-trash "></div><label>'+this.title+(this.required?"*":"")+'</label><div class="dfield"><input class="field disabled '+this.size+'" type="text" value="'+htmlEncode(this.predefined)+'"/><span class="uh">'+this.userhelp+'</span></div><div class="clearer"></div></div>'},show:function(){return'<div class="fields '+this.csslayout+'" id="field'+opt.identifier+"-"+this.index+'"><label>'+this.title+(this.required?"*":"")+'</label><div class="dfield"><input id="'+this.name+'" name="'+this.name+'" minlength="'+this.minlength+'" maxlength="'+htmlEncode(this.maxlength)+'" '+(""!=this.equalTo?'equalTo="#'+htmlEncode(this.equalTo+opt.identifier)+'"':"")+' class="field '+this.size+(this.required?" required":"")+'" type="text" value="'+htmlEncode(this.predefined)+'"/><span class="uh">'+this.userhelp+'</span></div><div class="clearer"></div></div>'},showSpecialDataInstance:function(){return'<div class="column"><label>Min length/characters</label><br /><input name="sMinlength" id="sMinlength" value="'+this.minlength+'"></div><div class="column"><label>Max length/characters</label><br /><input name="sMaxlength" id="sMaxlength" value="'+this.maxlength+'"></div><div class="clearer"></div>'}});var facceptance=function(){};$.extend(facceptance.prototype,ffields.prototype,{title:"Accept terms and conditions",ftype:"facceptance",value:"I accept",required:!0,url:"",message:"",display:function(){return'<div class="fields" id="field'+opt.identifier+"-"+this.index+'"><div class="arrow ui-icon ui-icon-play "></div><div class="remove ui-icon ui-icon-trash "></div><div class="dfield"><input class="field" disabled="true" type="checkbox"/> '+this.title+(this.required?"*":"")+'<span class="uh">'+this.userhelp+'</span></div><div class="clearer"></div></div>'},show:function(){var e=this,i="",t=e.title;return/^\s*$/.test(e.url)?/^\s*$/.test(e.message)||(t='<a href="javascript:void(0);" class="cff-open-dlg">'+t+"</a>",i+='<div class="cff-dialog hide"><span class="cff-close-dlg"></span><div class="cff-dialog-content">'+e.message+"</div></div>"):t='<a href="'+htmlEncode($.trim(e.url))+'" target="_blank">'+t+"</a>",'<div class="fields '+e.csslayout+' cff-checkbox-field" id="field'+e.identifier+"-"+e.index+'"><div class="dfield"><div class="one_column"><label><input name="'+e.name+'" id="'+e.name+'" class="field '+(this.required?" required":"")+'" value="'+htmlEncode(e.value)+'" vt="'+htmlEncode(/^\s*$/.test(e.value)?e.title:e.value)+'" type="checkbox" /> <span>'+htmlDecode(t)+(e.required?'<span class="r">*</span>':"")+"</span></label></div>"+i+'</div><div class="clearer"></div></div>'},after_show:function(){$(document).on("click",".cff-open-dlg",function(){var e=$(this).closest(".fields").find(".cff-dialog"),i=e.data("width"),t=e.data("height");e.removeClass("hide"),void 0===i&&(i=Math.min($(this).closest("form").width(),$(window).width(),e.width())),void 0===t&&(t=Math.min($(this).closest("form").height(),$(window).height(),e.height())),e.data("width",i),e.data("height",t),e.css({width:i+"px",height:t+"px","margin-top":-1*t/2+"px","margin-left":-1*i/2+"px"})}),$(document).on("click",".cff-close-dlg",function(){$(this).closest(".cff-dialog").addClass("hide")})},showSpecialDataInstance:function(){return'<div><label>Value</label><input class="large" type="text" name="sValue" id="sValue" value="'+htmlEncode(this.value)+'"></div><div><label>URL to the Consent and Acknowledgement page</label><input class="large" type="text" name="sURL" id="sURL" value="'+htmlEncode(this.url)+'"></div><div><label>- or - enter the Consent and Acknowledgement text</label><textarea class="large" name="sMessage" id="sMessage" style="height:150px;">'+this.message+"</textarea></div>"}});var fpassword=function(){};$.extend(fpassword.prototype,ffields.prototype,{title:"Untitled",ftype:"fpassword",predefined:"",predefinedClick:!1,required:!1,size:"medium",minlength:"",maxlength:"",equalTo:"",display:function(){return'<div class="fields" id="field'+opt.identifier+"-"+this.index+'">Not available in free version<div class="clearer"></div></div>'},show:function(){return'<div class="fields '+this.csslayout+'" id="field'+opt.identifier+"-"+this.index+'">Not available in free version<div class="clearer"></div></div>'},showSpecialDataInstance:function(){return"Not available in free version"}});var femail=function(){};$.extend(femail.prototype,ffields.prototype,{title:"Email",ftype:"femail",predefined:"",predefinedClick:!1,required:!1,size:"medium",equalTo:"",display:function(){return'<div class="fields" id="field'+opt.identifier+"-"+this.index+'"><div class="arrow ui-icon ui-icon-play "></div><div class="remove ui-icon ui-icon-trash "></div><label>'+this.title+(this.required?"*":"")+'</label><div class="dfield"><input class="field disabled '+this.size+'" type="email" value="'+htmlEncode(this.predefined)+'"/><span class="uh">'+this.userhelp+'</span></div><div class="clearer"></div></div>'},show:function(){return'<div class="fields '+this.csslayout+'" id="field'+opt.identifier+"-"+this.index+'"><label>'+this.title+(this.required?"*":"")+'</label><div class="dfield"><input id="'+this.name+'" name="'+this.name+'" '+(""!=this.equalTo?'equalTo="#'+htmlEncode(this.equalTo+opt.identifier)+'"':"")+' class="field email '+this.size+(this.required?" required":"")+'" type="email" value="'+htmlEncode(this.predefined)+'"/><span class="uh">'+this.userhelp+'</span></div><div class="clearer"></div></div>'},showSpecialDataInstance:function(){return""}});var fnumber=function(){};$.extend(fnumber.prototype,ffields.prototype,{title:"Number",ftype:"fnumber",predefined:"",predefinedClick:!1,required:!1,size:"small",min:"",max:"",dformat:"digits",formats:new Array("digits","number"),display:function(){return'<div class="fields" id="field'+opt.identifier+"-"+this.index+'">Not available in free version<div class="clearer"></div></div>'},show:function(){return'<div class="fields '+this.csslayout+'" id="field'+opt.identifier+"-"+this.index+'">Not available in free version<div class="clearer"></div></div>'},showFormatIntance:function(){return"<div>Not available in free version</div>"},showRangeIntance:function(){return"Not available in free version"}});var fdate=function(){};$.extend(fdate.prototype,ffields.prototype,{title:"Date",ftype:"fdate",predefined:"",predefinedClick:!1,size:"medium",required:!1,dformat:"mm/dd/yyyy",showDropdown:!1,dropdownRange:"-10:+10",minDate:"",maxDate:"",defaultDate:"",formats:new Array("mm/dd/yyyy","dd/mm/yyyy"),display:function(){return""},show:function(){return""},showFormatIntance:function(){return"<div>Not available in free version</div>"},showSpecialDataInstance:function(){return"Not available in free version"}});var ftextarea=function(){};$.extend(ftextarea.prototype,ffields.prototype,{title:"Untitled",ftype:"ftextarea",predefined:"",predefinedClick:!1,required:!1,size:"medium",minlength:"",maxlength:"",display:function(){return'<div class="fields" id="field'+opt.identifier+"-"+this.index+'"><div class="arrow ui-icon ui-icon-play "></div><div class="remove ui-icon ui-icon-trash "></div><label>'+this.title+(this.required?"*":"")+'</label><div class="dfield"><textarea class="field disabled '+this.size+'">'+this.predefined+'</textarea><span class="uh">'+this.userhelp+'</span></div><div class="clearer"></div></div>'},show:function(){return'<div class="fields '+this.csslayout+'" id="field'+opt.identifier+"-"+this.index+'"><label>'+this.title+(this.required?"*":"")+'</label><div class="dfield"><textarea id="'+this.name+'" name="'+this.name+'" minlength="'+this.minlength+'" maxlength="'+htmlEncode(this.maxlength)+'" class="field '+this.size+(this.required?" required":"")+'">'+this.predefined+'</textarea><span class="uh">'+this.userhelp+'</span></div><div class="clearer"></div></div>'},showSpecialDataInstance:function(){return'<div class="column"><label>Min length/characters</label><br /><input name="sMinlength" id="sMinlength" value="'+this.minlength+'"></div><div class="column"><label>Max length/characters</label><br /><input name="sMaxlength" id="sMaxlength" value="'+this.maxlength+'"></div><div class="clearer"></div>'}});var ffile=function(){};$.extend(ffile.prototype,ffields.prototype,{title:"Untitled",ftype:"ffile",required:!1,size:"medium",display:function(){return'<div class="fields" id="field'+opt.identifier+"-"+this.index+'">Not available in free version<div class="clearer"></div></div>'},show:function(){return'<div class="fields '+this.csslayout+'" id="field'+opt.identifier+"-"+this.index+'">Not available in free version<div class="clearer"></div></div>'}});var fSectionBreak=function(){};$.extend(fSectionBreak.prototype,ffields.prototype,{title:"Section Break",ftype:"fSectionBreak",userhelp:"A description of the section goes here.",display:function(){return'<div class="fields" id="field'+opt.identifier+"-"+this.index+'">Not available in free version<div class="clearer"></div></div>'},show:function(){return'<div class="fields '+this.csslayout+' section_breaks" id="field'+opt.identifier+"-"+this.index+'">Not available in free version<div class="clearer"></div></div>'}});var fPageBreak=function(){};$.extend(fPageBreak.prototype,ffields.prototype,{title:"Page Break",ftype:"fPageBreak",display:function(){return'<div class="fields" id="field'+opt.identifier+"-"+this.index+'">Not available in free version<div class="clearer"></div></div>'},show:function(){return'<div class="fields '+this.csslayout+' section_breaks" id="field'+opt.identifier+"-"+this.index+'">Not available in free version<div class="clearer"></div></div>'}});var fPhone=function(){};$.extend(fPhone.prototype,ffields.prototype,{title:"Phone",ftype:"fPhone",required:!1,dformat:"### ### ####",predefined:"888 888 8888",display:function(){return'<div class="fields" id="field'+opt.identifier+"-"+this.index+'">Not available in free version<div class="clearer"></div></div>'},show:function(){return'<div class="fields '+this.csslayout+'" id="field'+opt.identifier+"-"+this.index+'">Not available in free version<div class="clearer"></div></div>'},showFormatIntance:function(){return"<div>Not available in free version</div>"}});var fCommentArea=function(){};$.extend(fCommentArea.prototype,ffields.prototype,{title:"Comments here",ftype:"fCommentArea",userhelp:"A description of the section goes here.",display:function(){return'<div class="fields" id="field'+opt.identifier+"-"+this.index+'">Not available in free version<div class="clearer"></div></div>'},show:function(){return'<div class="fields '+this.csslayout+' comment_area" id="field'+opt.identifier+"-"+this.index+'">Not available in free version<div class="clearer"></div></div>'}});var fcheck=function(){};$.extend(fcheck.prototype,ffields.prototype,{title:"Check All That Apply",ftype:"fcheck",layout:"one_column",required:!1,showDep:!1,init:function(){},display:function(){return'<div class="fields" id="field'+opt.identifier+"-"+this.index+'">Not available in free version<div class="clearer"></div></div>'},show:function(){return'<div class="fields '+this.csslayout+'" id="field'+opt.identifier+"-"+this.index+'">Not available in free version<div class="clearer"></div></div>'},showChoiceIntance:function(){return'<div class="choicesSet '+(this.showDep?"show":"hide")+'">Not available in free version<div class="clearer"></div></div>'+str+"</div>"}});var fradio=function(){};$.extend(fradio.prototype,ffields.prototype,{title:"Select a Choice",ftype:"fradio",layout:"one_column",required:!1,choiceSelected:null,showDep:!1,init:function(){},display:function(){return'<div class="fields" id="field'+opt.identifier+"-"+this.index+'"><div class="arrow ui-icon ui-icon-play "></div><div class="remove ui-icon ui-icon-trash "></div><label>'+this.title+(this.required?"*":"")+'</label><div class="dfield">'+str+'<span class="uh">'+this.userhelp+'</span></div><div class="clearer"></div></div>'},show:function(){this.choicesVal=void 0!==this.choicesVal&&null!==this.choicesVal?this.choicesVal:this.choices.slice(0);var e="";if(void 0===this.choicesDep||null===this.choicesDep){this.choicesDep=new Array;for(var i=0;i<this.choices.length;i++)this.choicesDep[i]=new Array}for(i=0;i<this.choices.length;i++){var t="",s="",a=this.choicesDep;if(a[i].length>0){t=" depItem";for(var n=0;n<a[i].length;n++)s+=","+a[i][n]}e+='<div class="'+this.layout+'"><input name="'+this.name+'" id="'+this.name+'" '+(""!=t?'dep="'+s+'"':"")+' class="field depItem group '+(this.required?" required":"")+'" value="'+htmlEncode(this.choicesVal[i])+'" type="radio" i="'+i+'" '+(this.choicesVal[i]==this.choiceSelected?"checked":"")+"/> <span>"+this.choices[i]+"</span></div>"}return'<div class="fields '+this.csslayout+'" id="field'+opt.identifier+"-"+this.index+'"><label>'+this.title+(this.required?"*":"")+'</label><div class="dfield">'+e+'<span class="uh">'+this.userhelp+'</span></div><div class="clearer"></div></div>'},showChoiceIntance:function(){this.choicesVal=void 0!==this.choicesVal&&null!==this.choicesVal?this.choicesVal:this.choices.slice(0);var e=this.choices,i=this.choicesVal;this.choiceSelected;if(void 0===this.choicesDep||null===this.choicesDep){this.choicesDep=new Array;for(var t=0;t<e.length;t++)this.choicesDep[t]=new Array}var s=this.choicesDep,a="";for(t=0;t<e.length;t++){a+='<div class="choicesEdit"><input class="choice_radio" i="'+t+'" type="radio" '+(this.choiceSelected==i[t]?"checked":"")+' name="choice_radio" /><input class="choice_text" i="'+t+'" type="text" name="sChoice'+this.name+'" id="sChoice'+this.name+'" value="'+htmlEncode(e[t])+'"/><input class="choice_value" i="'+t+'" type="text" name="sChoice'+this.name+"V"+t+'" id="sChoice'+this.name+"V"+t+'" value="'+htmlEncode(i[t])+'"/><a class="choice_add ui-icon ui-icon-circle-plus" i="'+t+'" title="Add another choice."></a><a class="choice_remove ui-icon ui-icon-circle-minus" i="'+t+'" title="Delete this choice."></a></div>';for(var n=0;n<s[t].length;n++)a+='<div class="choicesEditDep">If selected show: <select class="dependencies" i="'+t+'" j="'+n+'" dname="'+this.name+'" dvalue="'+s[t][n]+'" ></select><a class="choice_addDep ui-icon ui-icon-circle-plus" i="'+t+'" j="'+n+'" title="Add another dependency."></a><a class="choice_removeDep ui-icon ui-icon-circle-minus" i="'+t+'" j="'+n+'" title="Delete this dependency."></a></div>';0==s[t].length&&(a+='<div class="choicesEditDep">If selected show: <select class="dependencies" i="'+t+'" j="'+s[t].length+'" dname="'+this.name+'" dvalue="" ></select><a class="choice_addDep ui-icon ui-icon-circle-plus" i="'+t+'" j="'+s[t].length+'" title="Add another dependency."></a><a class="choice_removeDep ui-icon ui-icon-circle-minus" i="'+t+'" j="'+s[t].length+'" title="Delete this dependency."></a></div>')}return'<div class="choicesSet '+(this.showDep?"show":"hide")+'"><label>Choices</label> <a class="helpfbuilder dep" text="Dependencies are used to show/hide other fields depending of the option selected in this field.">help?</a> <a href="" class="showHideDependencies">'+(this.showDep?"Hide":"Show")+' Dependencies</a><div><div class="t">Text</div><div class="t">Value</div><div class="clearer"></div></div>'+a+"</div>"}});var fdropdown=function(){};$.extend(fdropdown.prototype,ffields.prototype,{title:"Select a Choice",ftype:"fdropdown",size:"medium",required:!1,choiceSelected:"",showDep:!1,init:function(){},display:function(){return this.choicesVal=void 0!==this.choicesVal&&null!==this.choicesVal?this.choicesVal:this.choices.slice(0),'<div class="fields" id="field'+opt.identifier+"-"+this.index+'">Not available in free version<div class="clearer"></div></div>'},show:function(){return'<div class="fields '+this.csslayout+'" id="field'+opt.identifier+"-"+this.index+'">Not available in free version<div class="clearer"></div></div>'},showChoiceIntance:function(){return'<div class="choicesSet '+(this.showDep?"show":"hide")+'">Not available in free version<div class="clearer"></div></div>'+str+"</div>"}}),opt.pub||$("#fieldlist"+opt.identifier).sortable({start:function(e,i){var t=i.item.index();i.item.data("start_pos",t)},stop:function(e,i){var t=parseInt(i.item.index()),s=parseInt(i.item.data("start_pos")),a=items[s];if(t>s)for(var n=s;n<t;n++)items[n]=items[n+1];else for(n=s;n>t;n--)items[n]=items[n-1];items[t]=a,reloadItems()}}),opt.pub||$("#tabs").tabs({activate:function(e,i){1!=$(this).tabs("option","active")?($(".fields").removeClass("ui-selected"),itemSelected=-2,2==$(this).tabs("option","active")?($(".fform").addClass("ui-selected"),editForm()):$(".fform").removeClass("ui-selected")):($(".fform").removeClass("ui-selected"),itemSelected<0&&$("#tabs-2").html("<b>No Field Selected</b><br />Please click on a field in the form preview on the right to change its properties."))}}),loadtmp=function(p){if((d=$.parseJSON(p))&&2==d.length){items=new Array;for(var i=0;i<d[0].length;i++){var obj=eval("new "+d[0][i].ftype+"();");obj=$.extend(obj,d[0][i]),obj.name=obj.name+opt.identifier,items[items.length]=obj}theForm=new fform,theForm=$.extend(theForm,d[1][0]),opt.pub?reloadItemsPublic():reloadItems()}};var ffunct={getItems:function(){return items},addItem:function(id){var obj=eval("new "+id+"();");obj.init();for(var n=0,i=0;i<items.length;i++)n1=parseInt(items[i].name.replace(/fieldname/g,"")),n1>n&&(n=n1);$.extend(obj,{name:"fieldname"+(n+1)}),items[items.length]=obj,reloadItems()},saveData:function(e){""!=e?$("#"+e).val("["+$.stringifyXX(items,!1)+",["+$.stringifyXX(theForm,!1)+"]]"):$.ajax({type:"POST",url:"process.php?act=save",data:"items="+$.stringifyXX(items,!0)+"&theForm="+$.stringifyXX(theForm,!0),dataType:"json",success:function(e){alert("The form has been saved!!!")}})},loadData:function(e){""!=e?loadtmp($("#"+e).val()):$.ajax({async:!1,url:"process.php?act=load",success:function(e){loadtmp(e.toString())}})},removeItem:removeItem,editItem:editItem};return this.fBuild=ffunct,this};for(var fcount=1,fnum="_"+fcount;10>fcount||eval("typeof cp_contactformtoemail_fbuilder_config"+fnum+" != 'undefined'");){try{var cp_contactformtoemail_fbuilder_config=eval("cp_contactformtoemail_fbuilder_config"+fnum),f=$("#fbuilder"+fnum).CFTEfbuilder($.parseJSON(cp_contactformtoemail_fbuilder_config.obj));f.fBuild.loadData("form_structure"+fnum),$("#cp_contactformtoemail_pform"+fnum).validate({ignore:".ignore",errorElement:"div",errorPlacement:function(e,i){i.hasClass("group")&&(i=i.parent()),e.insertBefore(i),e.addClass("message"),e.css("position","absolute"),e.css("left",0),e.css("top",i.parent().outerHeight(!0))}}),$(document).trigger("showHideDepEvent",fnum)}catch(e){}fcount++,fnum="_"+fcount}}(jQuery)});
|
1 |
jQuery(function(){var n;(n=jQuery).extend({stringifyXX:function(r){encodeParam=function(n,r){return r?(n=n.replace(/&/g,"%26"),encodeURI(n)):n},enc=function(n){return n=(n=n.replace(/\\/g,"\\\\")).replace(/\"/g,'\\"')};var e=typeof r;if("object"!=e||null===r)return"string"==e&&(r='"'+r+'"'),encodeParam(String(r));var t,c,i=[],o=r&&r.constructor==Array;for(t in r)"function"!=(e=typeof(c=r[t]))&&("string"==e?c='"'+enc(c)+'"':"object"==e&&null!==c&&(c=n.stringifyXX(c)),i.push((o?"":'"'+t+'":')+String(c)));return encodeParam(o?"[":"{")+String(i)+(o?"]":"}")}})});
|
2 |
+
jQuery(window).on("load",function(){!function($){$.fn.CFTEfbuilder=function(options){var opt=$.extend({},{typeList:new Array({id:"ftext",name:"Single Line"},{id:"fnumber",name:"Number"},{id:"femail",name:"Email"},{id:"fdate",name:"Date Time"},{id:"ftextarea",name:"Text Area"},{id:"fcurrency",name:"Currency"},{id:"fcheck",name:"Checkboxes"},{id:"fradio",name:"Radio Buttons"},{id:"fdropdown",name:"Dropdown"},{id:"ffile",name:"Upload File"},{id:"fpassword",name:"Password"},{id:"fPhone",name:"Phone field"},{id:"fCommentArea",name:"Instruct. Text"},{id:"fhidden",name:"Hidden"},{id:"fSectionBreak",name:"Section break"},{id:"fPageBreak",name:"Page break"},{id:"fsummary",name:"Summary"},{id:"fMedia",name:"Media"},{id:"fButton",name:"Button"},{id:"fhtml",name:"HTML content"},{id:"facceptance",name:"Accept / GDPR"},{id:"category",name:"Container Controls"},{id:"ffieldset",name:"Fieldset"},{id:"fdiv",name:"Div"},{id:"category",name:"Form Controls with Datasource Connection"},{id:"ftextds",name:"Line Text DS"},{id:"femailds",name:"Email DS"},{id:"ftextareads",name:"Text Area DS"},{id:"fcheckds",name:"Checkboxes DS"},{id:"fradiods",name:"Radio Btns DS"},{id:"fPhoneds",name:"Phone DS"},{id:"fdropdownds",name:"Dropdown DS"},{id:"fhiddends",name:"Hidden DS"},{id:"fnumberds",name:"Number DS"},{id:"fcurrencyds",name:"Currency DS"}),pub:!1,identifier:"",title:""},options,!0);if(opt.pub&&(opt.messages=$.extend({previous:"Previous",next:"Next",page:"Page",of:"of",required:"This field is required.",email:"Please enter a valid email address.",datemmddyyyy:"Please enter a valid date with this format(mm/dd/yyyy)",dateddmmyyyy:"Please enter a valid date with this format(dd/mm/yyyy)",number:"Please enter a valid number.",digits:"Please enter only digits.",maxlength:$.validator.format("Please enter no more than {0} characters"),minlength:$.validator.format("Please enter at least {0} characters."),equalTo:"Please enter the same value again.",max:$.validator.format("Please enter a value less than or equal to {0}."),min:$.validator.format("Please enter a value greater than or equal to {0}.")},opt.messages),opt.messages.max=$.validator.format(opt.messages.max),opt.messages.min=$.validator.format(opt.messages.min),$.extend($.validator.messages,opt.messages)),getNameByIdFromType=function(e){for(var i=0;i<opt.typeList.length;i++)if(opt.typeList[i].id==e)return opt.typeList[i].name;return""},!opt.pub){for(var i=0;i<opt.typeList.length;i++)"category"==opt.typeList[i].id?$("#tabs-1").append('<div style="clear:both;"></div><br /><div class="category-description">'+opt.typeList[i].name+"</div><hr />"):$("#tabs-1").append('<div class="button width40 '+(i>5&&20!=i||i%2==1?"n":"itemForm")+'" id="'+opt.typeList[i].id+'">'+opt.typeList[i].name+"</div>");$("#tabs-1").append('<div class="clearer"></div>')}opt.pub||$(".button").button();var items=new Array,itemSelected=-2;function htmlDecode(e){return/&(?:#x[a-f0-9]+|#[0-9]+|[a-z0-9]+);?/gi.test(e)&&(e=$("<div/>").html(e).text()),e}function htmlEncode(e){return e=(e=$("<div/>").text(e).html()).replace(/"/g,""")}function showHideDep(){function e(e,i){for(var t=0;t<i.length;t++)if(i[t]==e)return!0;return!1}function t(e,i){for(var t=0;t<i.length;t++)i[t]==e&&(i.splice(t,1),t--);return i}var s=new Array,a=new Array;$(".depItem").each(function(){var n=$(this);try{if(1==n.parents("#fieldlist"+opt.identifier).length&&n.attr("dep")&&""!=n.attr("dep")){var l=n.attr("dep").split(",");for(i=0;i<l.length;i++)if(""!=l[i]&&(l[i]=l[i]+opt.identifier),""!=l[i]&&!e(l[i],s))try{!n.is(":checked")&&!n.is(":selected")||e(n.hasClass("field")?n.attr("id"):n.parents(".field").attr("id"),a)?($("#"+l[i]).parents(".fields").css("display","none"),$("#"+l[i]).parents(".fields").find(".field").each(function(){$(this).addClass("ignore")}),a[a.length]=l[i]):($("#"+l[i]).parents(".fields").css("display",""),$("#"+l[i]).parents(".fields").find(".field").each(function(){$(this).hasClass("ignorepb")||$(this).removeClass("ignore")}),s[s.length]=l[i],t(l[i],a))}catch(e){}}}catch(e){}})}editItem=function(e){opt.pub||$("#tabs").tabs("option","active",1);try{$("#tabs-2").html(items[e].showAllSettings())}catch(e){}itemSelected=e,$(".helpfbuilder").click(function(){alert($(this).attr("text"))}),$("#sValue").bind("keyup",function(){items[e].value=$(this).val(),reloadItems()}),$("#sURL").bind("keyup",function(){items[e].url=$(this).val(),reloadItems()}),$("#sMessage").bind("keyup",function(){items[e].message=$(this).val(),reloadItems()}),$("#sMinDate").change(function(){items[e].minDate=$(this).val(),reloadItems()}),$("#sMaxDate").change(function(){items[e].maxDate=$(this).val(),reloadItems()}),$("#sDefaultDate").change(function(){items[e].defaultDate=$(this).val(),reloadItems()}),$("#sTitle").keyup(function(){var i=$(this).val();items[e].title=i.replace(/\n/g,"<br />"),reloadItems()}),$("#sName").keyup(function(){items[e].name=$(this).val(),reloadItems()}),$("#sShortlabel").keyup(function(){items[e].shortlabel=$(this).val(),reloadItems()}),$("#sPredefined").keyup(function(){items[e].predefined=$(this).val(),reloadItems()}),$("#sPredefinedClick").click(function(){items[e].predefinedClick=$(this).is(":checked"),reloadItems()}),$("#sEq").keyup(function(){items[e].eq=$(this).val(),reloadItems()}),$("#sSuffix").keyup(function(){items[e].suffix=$(this).val(),reloadItems()}),$("#sPrefix").keyup(function(){items[e].prefix=$(this).val(),reloadItems()}),$("#sDecimalSymbol").keyup(function(){items[e].decimalsymbol=$(this).val(),reloadItems()}),$("#sGroupingSymbol").keyup(function(){items[e].groupingsymbol=$(this).val(),reloadItems()}),$("#sDropdownRange").keyup(function(){items[e].dropdownRange=$(this).val(),reloadItems()}),$("#sRequired").click(function(){items[e].required=$(this).is(":checked"),reloadItems()}),$("#sReadOnly").click(function(){items[e].readonly=$(this).is(":checked"),reloadItems()}),$("#sShowDropdown").click(function(){items[e].showDropdown=$(this).is(":checked"),$(this).is(":checked")?$("#divdropdownRange").css("display",""):$("#divdropdownRange").css("display","none"),reloadItems()}),$("#sSize").change(function(){items[e].size=$(this).val(),reloadItems()}),$("#sFormat").change(function(){items[e].dformat=$(this).val(),reloadItems()}),$("#sLayout").change(function(){items[e].layout=$(this).val(),reloadItems()}),$("#sMin").change(function(){items[e].min=$(this).val(),reloadItems()}),$("#sMax").change(function(){items[e].max=$(this).val(),reloadItems()}),$("#sMinlength").change(function(){items[e].minlength=$(this).val(),reloadItems()}),$("#sMaxlength").change(function(){items[e].maxlength=$(this).val(),reloadItems()}),$("#sEqualTo").change(function(){items[e].equalTo=$(this).val(),reloadItems()}),$(".showHideDependencies").click(function(){return items[e].showDep?($(this).parent().removeClass("show"),$(this).parent().addClass("hide"),$(this).html("Show Dependencies"),items[e].showDep=!1):($(this).parent().addClass("show"),$(this).parent().removeClass("hide"),$(this).html("Hide Dependencies"),items[e].showDep=!0),!1}),$(".choice_remove").click(function(){1==items[e].choices.length?(items[e].choices[0]="",items[e].choicesVal[0]="",items[e].choicesDep[0]=new Array):(items[e].choices.splice($(this).attr("i"),1),items[e].choicesVal.splice($(this).attr("i"),1),items[e].choicesDep.splice($(this).attr("i"),1)),"fcheck"==items[e].ftype&&(1==items[e].choiceSelected.length?items[e].choiceSelected[0]="":items[e].choiceSelected.splice($(this).attr("i"),1)),editItem(e),reloadItems()}),$(".choice_add").click(function(){items[e].choices.splice(1*$(this).attr("i")+1,0,""),items[e].choicesVal.splice(1*$(this).attr("i")+1,0,""),items[e].choicesDep.splice(1*$(this).attr("i")+1,0,new Array),"fcheck"==items[e].ftype&&items[e].choiceSelected.splice(1*$(this).attr("i")+1,0,!1),editItem(e),reloadItems()}),$(".choice_text").keyup(function(){items[e].choices[$(this).attr("i")]==items[e].choicesVal[$(this).attr("i")]&&($("#"+$(this).attr("id")+"V"+$(this).attr("i")).val($(this).val()),items[e].choicesVal[$(this).attr("i")]=$(this).val()),items[e].choices[$(this).attr("i")]=$(this).val(),reloadItems()}),$(".choice_value").keyup(function(){items[e].choicesVal[$(this).attr("i")]=$(this).val(),reloadItems()}),$(".choice_radio").click(function(){$(this).is(":checked")&&(items[e].choiceSelected=items[e].choicesVal[$(this).attr("i")]),reloadItems()}),$(".choice_select").click(function(){$(this).is(":checked")&&(items[e].choiceSelected=items[e].choicesVal[$(this).attr("i")]),reloadItems()}),$(".choice_check").click(function(){$(this).is(":checked")?items[e].choiceSelected[$(this).attr("i")]=!0:items[e].choiceSelected[$(this).attr("i")]=!1,reloadItems()}),$("#sUserhelp").keyup(function(){items[e].userhelp=$(this).val(),reloadItems()}),$("#sUserhelpTooltip").click(function(){items[e].userhelpTooltip=$(this).is(":checked"),reloadItems()}),$("#sCsslayout").keyup(function(){items[e].csslayout=$(this).val(),reloadItems()}),$(".equalTo").each(function(){for(var e='<option value="" '+(""==$(this).attr("dvalue")?"selected":"")+"></option>",i=0;i<items.length;i++)"ftext"!=items[i].ftype&&"femail"!=items[i].ftype&&"fpassword"!=items[i].ftype||items[i].name==$(this).attr("dname")||(e+='<option value="'+items[i].name+'" '+(items[i].name==$(this).attr("dvalue")?"selected":"")+">"+items[i].title+"</option>");$(this).html(e)}),$(".dependencies").each(function(){for(var e='<option value="" '+(""==$(this).attr("dvalue")?"selected":"")+"></option>",i=0;i<items.length;i++)items[i].name!=$(this).attr("dname")&&(e+='<option value="'+items[i].name+'" '+(items[i].name==$(this).attr("dvalue")?"selected":"")+">"+items[i].title+"</option>");$(this).html(e)}),$(".dependencies").change(function(){items[e].choicesDep[$(this).attr("i")][$(this).attr("j")]=$(this).val(),reloadItems()}),$(".choice_removeDep").click(function(){1==items[e].choices.length?items[e].choicesDep[$(this).attr("i")][0]="":items[e].choicesDep[$(this).attr("i")].splice($(this).attr("j"),1),editItem(e),reloadItems()}),$(".choice_addDep").click(function(){items[e].choicesDep[$(this).attr("i")].splice(1*$(this).attr("j")+1,0,""),editItem(e),reloadItems()})},editForm=function(){$("#tabs-3").html(theForm.showAllSettings()),itemSelected=-1,$("#fTitle").keyup(function(){theForm.title=$(this).val(),reloadItems()}),$("#fDescription").keyup(function(){theForm.description=$(this).val(),reloadItems()}),$("#fLayout").change(function(){theForm.formlayout=$(this).val(),reloadItems()})},removeItem=function(e){items.splice(e,1);for(var i=0;i<items.length;i++)items[i].index=i;$("#tabs").tabs("option","active",0),reloadItems()},reloadItems=function(){for(var e=0;e<showSettings.formlayoutList.length;e++)$("#fieldlist"+opt.identifier).removeClass(showSettings.formlayoutList[e].id);$("#fieldlist"+opt.identifier).addClass(theForm.formlayout),$("#formheader"+opt.identifier).html(theForm.display()),$("#fieldlist"+opt.identifier).html(""),-1==parseInt(itemSelected)?$(".fform").addClass("ui-selected"):$(".fform").removeClass("ui-selected");for(e=0;e<items.length;e++)items[e].index=e,$("#fieldlist"+opt.identifier).append(items[e].display()),e==itemSelected?$("#field"+opt.identifier+"-"+e).addClass("ui-selected"):$("#field"+opt.identifier+"-"+e).removeClass("ui-selected"),$(".fields").mouseover(function(){$(this).addClass("ui-over")}).mouseout(function(){$(this).removeClass("ui-over")}).click(function(){editItem($(this).attr("id").replace("field"+opt.identifier+"-","")),$(this).siblings().removeClass("ui-selected"),$(this).addClass("ui-selected")}),$(".field").focus(function(){$(this).blur()}),$("#field"+opt.identifier+"-"+e+" .remove").click(function(){removeItem($(this).parent().attr("id").replace("field"+opt.identifier+"-",""))});$("#fieldlist"+opt.identifier).html(),$("#saveForm").css("display","none"),$(".fform").mouseover(function(){$(this).addClass("ui-over")}).mouseout(function(){$(this).removeClass("ui-over")}).click(function(){$("#tabs").tabs("option","active",2),editForm(),$(this).siblings().removeClass("ui-selected"),$(this).addClass("ui-selected")}),ffunct.saveData("form_structure");var i="";for(e=0;e<items.length;e++)"femail"==items[e].ftype&&(i+='<option value="'+items[e].name+'" '+(items[e].name==$("#cu_user_email_field").attr("def")?"selected":"")+">"+items[e].title+"</option>");if($("#cu_user_email_field").html(i),$("#request_cost").length>0&&$("#request_cost").is("select")){for(i="",e=0;e<items.length;e++)i+='<option value="'+items[e].name+'" '+(items[e].name==$("#request_cost").attr("def")?"selected":"")+">"+items[e].name+"("+items[e].title+")</option>";$("#request_cost").html(i)}if($("#paypal_price_field").length>0){for(i='<option value="" '+(""==$("#paypal_price_field").attr("def")?"selected":"")+"> ---- No ---- </option>",e=0;e<items.length;e++)i+='<option value="'+items[e].name+'" '+(items[e].name==$("#paypal_price_field").attr("def")?"selected":"")+">"+items[e].title+"</option>";$("#paypal_price_field").html(i)}},reloadItemsPublic=function(){for(var e=0;e<showSettings.formlayoutList.length;e++)$("#fieldlist"+opt.identifier).removeClass(showSettings.formlayoutList[e].id);$("#fieldlist"+opt.identifier).html("").addClass(theForm.formlayout),$("#formheader"+opt.identifier).html(theForm.show());var i=0;$("#fieldlist"+opt.identifier).append('<div class="pb'+i+' pbreak" page="'+i+'"></div>');var t=new Array;for(e=0;e<items.length;e++){if(items[e].index=e,"fPageBreak"==items[e].ftype)i++,$("#fieldlist"+opt.identifier).append('<div class="pb'+i+' pbreak" page="'+i+'"></div>');else{if($("#fieldlist"+opt.identifier+" .pb"+i).append(items[e].show()),items[e].predefinedClick){var s=$("#fieldlist"+opt.identifier+" .pb"+i).find("#"+items[e].name).attr("class")+" predefinedClick";$("#fieldlist"+opt.identifier+" .pb"+i).find("#"+items[e].name).attr("class",s),$("#fieldlist"+opt.identifier+" .pb"+i).find("#"+items[e].name).attr("predefined",items[e].predefined)}if(items[e].userhelpTooltip){var a=$("#fieldlist"+opt.identifier+" .pb"+i).find("#"+items[e].name).parents(".fields");a.find(".uh").css("display","none"),""!=a.find(".uh").text()&&a.attr("uh",a.find(".uh").text())}}$(".fields").mouseover(function(){$(this).addClass("ui-over")}).mouseout(function(){$(this).removeClass("ui-over")}).click(function(){editItem($(this).attr("id").replace("field"+opt.identifier+"-","")),$(this).siblings().removeClass("ui-selected"),$(this).addClass("ui-selected")}),"fdate"==items[e].ftype&&(t[t.length]=items[e])}if(i>0?($("#fieldlist"+opt.identifier+" .pb"+i).addClass("pbEnd"),$("#fieldlist"+opt.identifier+" .pbreak").find(".field").addClass("ignore").addClass("ignorepb"),$("#fieldlist"+opt.identifier+" .pb0").find(".field").removeClass("ignore").removeClass("ignorepb"),$("#fieldlist"+opt.identifier+" .pbreak").each(function(e){var t=$(this).html(),s="";e==i&&($("#cpcaptchalayer"+opt.identifier).html()&&(t+='<div class="fields cpfieldcaptcha" id="fieldcaptcha'+opt.identifier+'">'+$("#cpcaptchalayer"+opt.identifier).html()+"</div>",$("#cpcaptchalayer"+opt.identifier).html("")),$("#cp_subbtn"+opt.identifier).html()&&(s='<button type="button" class="pbSubmit">'+$("#cp_subbtn"+opt.identifier).html()+"</button>")),$(this).html("<fieldset><legend>"+opt.messages.page+" "+(e+1)+" "+opt.messages.of+" "+(i+1)+"</legend>"+t+'<div class="pbPrevious">'+opt.messages.previous+'</div><div class="pbNext">'+opt.messages.next+"</div>"+s+'<div class="clearer"></div></fieldset>')}),$(".pbPrevious,.pbNext").bind("click",function(){if($(this).parents("form").valid()){var e=parseInt($(this).parents(".pbreak").attr("page"));$(this).hasClass("pbPrevious")?e--:e++,$("#fieldlist"+opt.identifier+" .pbreak").css("display","none"),$("#fieldlist"+opt.identifier+" .pbreak").find(".field").addClass("ignore").addClass("ignorepb"),$("#fieldlist"+opt.identifier+" .pb"+e).css("display","block"),$("#fieldlist"+opt.identifier+" .pb"+e).find(".field").removeClass("ignore").removeClass("ignorepb"),showHideDep()}return!1})):($("#cpcaptchalayer"+opt.identifier).html()&&($("#fieldlist"+opt.identifier+" .pb"+i).append('<div class="fields cpfieldcaptcha" id="fieldcaptcha'+opt.identifier+'">'+$("#cpcaptchalayer"+opt.identifier).html()+"</div>"),$("#cpcaptchalayer"+opt.identifier).html("")),$("#cp_subbtn"+opt.identifier).html()&&$("#fieldlist"+opt.identifier+" .pb"+i).append('<button type="button" class="pbSubmit">'+$("#cp_subbtn"+opt.identifier).html()+"</button>")),$(".pbSubmit").bind("click",function(){$(this).parents("#fieldlist"+opt.identifier).parents("form").submit()}),$("#fieldlist"+opt.identifier+" .predefinedClick").bind("click",function(){$(this).attr("predefined")==$(this).val()&&$(this).val("")}),$("#fieldlist"+opt.identifier+" .predefinedClick").blur("click",function(){""==$(this).val()&&$(this).val($(this).attr("predefined"))}),e>0){for(var n=0;n<t.length;n++)t[n].showDropdown?$("#"+t[n].name).datepicker({changeMonth:!0,changeYear:!0,yearRange:t[n].dropdownRange,dateFormat:t[n].dformat.replace(/yyyy/g,"yy")}):$("#"+t[n].name).datepicker({dateFormat:t[n].dformat.replace(/yyyy/g,"yy")}),$("#"+t[n].name).datepicker("option","minDate",t[n].minDate),$("#"+t[n].name).datepicker("option","maxDate",t[n].maxDate),$("#"+t[n].name).datepicker("option","defaultDate",t[n].defaultDate);showHideDep(),$.validator.addMethod("dateddmmyyyy",function(e,i){return this.optional(i)||/^(?:[1-9]|0[1-9]|1[0-9]|2[0-9]|3[0-1])[\/\-](?:[1-9]|0[1-9]|1[0-2])[\/\-]\d{4}$/.test(e)}),$.validator.addMethod("datemmddyyyy",function(e,i){return this.optional(i)||/^(?:[1-9]|0[1-9]|1[0-2])[\/\-](?:[1-9]|0[1-9]|1[0-9]|2[0-9]|3[0-1])[\/\-]\d{4}$/.test(e)}),$(".depItemSel,.depItem").bind("change",function(){showHideDep()});try{$("#fbuilder"+opt.identifier).tooltip({show:!1,hide:!1,tooltipClass:"uh-tooltip",position:{my:"left top",at:"left bottom",collision:"none"},items:"[uh]",content:function(){return $(this).attr("uh")}})}catch(e){}}for(e=0;e<items.length;e++)items[e].after_show()};var showSettings={sizeList:new Array({id:"small",name:"Small"},{id:"medium",name:"Medium"},{id:"large",name:"Large"}),layoutList:new Array({id:"one_column",name:"One Column"},{id:"two_column",name:"Two Column"},{id:"three_column",name:"Three Column"},{id:"side_by_side",name:"Side by Side"}),formlayoutList:new Array({id:"top_aligned",name:"Top Aligned"},{id:"left_aligned",name:"Left Aligned"},{id:"right_aligned",name:"Right Aligned"}),showTitle:function(e,i){var t='<label>Field Label</label><textarea class="large" name="sTitle" id="sTitle">'+i+"</textarea>";return"Page Break"==i&&(t=""),"<label>Field Type: "+getNameByIdFromType(e)+"</label><br /><br />"+t},showName:function(e,i){return'<div><label>Short label (optional) [<a class="helpfbuilder" text="The short label is used at title for the column when exporting the form data to CSV files.\n\nIf the short label is empty then, the field label will be used for the CSV file.">help?</a>] :</label><input class="large" name="sShortlabel" id="sShortlabel" value="'+i+'" /></div><div><label>Field tag for the message (optional):</label><input readonly="readonly" class="large" name="sNametag" id="sNametag" value="<%'+e+'%>" /><input style="display:none" readonly="readonly" class="large" name="sName" id="sName" value="'+e+'" /></div>'},showPredefined:function(e,i){return'<div><label>Predefined Value</label><textarea class="large" name="sPredefined" id="sPredefined">'+e+'</textarea><br /><input type="checkbox" name="sPredefinedClick" id="sPredefinedClick" '+(i?"checked":"")+' value="1" > Hide predefined value on click.</div>'},showEqualTo:function(e,i){return'<div><label>Equal to [<a class="helpfbuilder" text="Use this field to create password confirmation field or email confirmation fields.\n\nSpecify this setting ONLY into the confirmation field, not in the original field.">help?</a>]</label><br /><select class="equalTo" name="sEqualTo" id="sEqualTo" dvalue="'+e+'" dname="'+i+'"></select></div>'},showRequired:function(e){return'<div><input type="checkbox" name="sRequired" id="sRequired" '+(e?"checked":"")+"><label>Required</label></div>"},showSize:function(e){for(var i="",t=0;t<this.sizeList.length;t++)i+='<option value="'+this.sizeList[t].id+'" '+(this.sizeList[t].id==e?"selected":"")+">"+this.sizeList[t].name+"</option>";return'<label>Field Size</label><br /><select name="sSize" id="sSize">'+i+"</select>"},showLayout:function(e){for(var i="",t=0;t<this.layoutList.length;t++)i+='<option value="'+this.layoutList[t].id+'" '+(this.layoutList[t].id==e?"selected":"")+">"+this.layoutList[t].name+"</option>";return'<label>Field Layout</label><br /><select name="sLayout" id="sLayout">'+i+"</select>"},showUserhelp:function(e,i){return'<div><label>Instructions for User</label><textarea class="large" name="sUserhelp" id="sUserhelp">'+e+'</textarea><br /><input type="checkbox" name="sUserhelpTooltip" id="sUserhelpTooltip" '+(i?"checked":"")+' value="1" > Show as floating tooltip.</div>'},showCsslayout:function(e){return'<label>Additional CSS Class</label><input class="large" name="sCsslayout" id="sCsslayout" value="'+e+'" />'}},fform=function(){};$.extend(fform.prototype,{title:"Untitled Form",description:"This is my form. Please fill it out. It's awesome!",formlayout:"top_aligned",display:function(){return'<div class="fform" id="field">'+(""!=this.title?"<h1>"+this.title+"</h1>":"")+(""!=this.description?"<span>"+this.description+"</span>":"")+"</div>"},show:function(){var e="";return""!=this.title&&(e+="<h1>"+this.title+"</h1>"),""!=this.description&&(e+="<span>"+this.description+"</span>"),'<div class="fform" id="field">'+e+"</div>"},showAllSettings:function(){for(var e="",i=0;i<showSettings.formlayoutList.length;i++)e+='<option value="'+showSettings.formlayoutList[i].id+'" '+(showSettings.formlayoutList[i].id==this.formlayout?"selected":"")+">"+showSettings.formlayoutList[i].name+"</option>";return'<div><label>Form Name</label><input class="large" name="fTitle" id="fTitle" value="'+htmlEncode(this.title)+'" /></div><div><label>Description</label><textarea class="large" name="fDescription" id="fDescription">'+this.description+'</textarea></div><div><label>Label Placement</label><br /><select name="fLayout" id="fLayout">'+e+"</select></div>"}});var theForm=new fform,ffields=function(){};$.extend(ffields.prototype,{name:"",shortlabel:"",index:-1,ftype:"",userhelp:"",userhelpTooltip:!1,csslayout:"",init:function(){},after_show:function(){},showSpecialData:function(){return void 0!==this.showSpecialDataInstance?this.showSpecialDataInstance():""},showEqualTo:function(){return void 0!==this.equalTo?showSettings.showEqualTo(this.equalTo,this.name):""},showPredefined:function(){return void 0!==this.predefined?showSettings.showPredefined(this.predefined,this.predefinedClick):""},showRequired:function(){return void 0!==this.required?showSettings.showRequired(this.required):""},showSize:function(){return void 0!==this.size?showSettings.showSize(this.size):""},showLayout:function(){return void 0!==this.layout?showSettings.showLayout(this.layout):""},showRange:function(){return void 0!==this.min?this.showRangeIntance():""},showFormat:function(){if(void 0===this.dformat)return"";try{return this.showFormatIntance()}catch(e){return""}},showChoice:function(){return void 0!==this.choices?this.showChoiceIntance():""},showUserhelp:function(){return"fPageBreak"!=this.ftype?showSettings.showUserhelp(this.userhelp,this.userhelpTooltip):""},showCsslayout:function(){return"fPageBreak"!=this.ftype?showSettings.showCsslayout(this.csslayout):""},showAllSettings:function(){return this.showTitle()+this.showName()+this.showSize()+this.showLayout()+this.showFormat()+this.showRange()+this.showRequired()+this.showSpecialData()+this.showEqualTo()+this.showPredefined()+this.showChoice()+this.showUserhelp()+this.showCsslayout()},showTitle:function(){return showSettings.showTitle(this.ftype,this.title)},showName:function(){return"fPageBreak"!=this.ftype?showSettings.showName(this.name,this.shortlabel):""},display:function(){return"Not available yet"},show:function(){return"Not available yet"},toJSON:function(){return str="",$.each(this,function(e,i){"function"!=typeof i&&(""!=str&&(str+=","),str+='"'+e+'":'+i)}),str}});var ftext=function(){};$.extend(ftext.prototype,ffields.prototype,{title:"Untitled",ftype:"ftext",predefined:"",predefinedClick:!1,required:!1,size:"medium",minlength:"",maxlength:"",equalTo:"",display:function(){return'<div class="fields" id="field'+opt.identifier+"-"+this.index+'"><div class="arrow ui-icon ui-icon-play "></div><div class="remove ui-icon ui-icon-trash "></div><label>'+this.title+(this.required?"*":"")+'</label><div class="dfield"><input class="field disabled '+this.size+'" type="text" value="'+htmlEncode(this.predefined)+'"/><span class="uh">'+this.userhelp+'</span></div><div class="clearer"></div></div>'},show:function(){return'<div class="fields '+this.csslayout+'" id="field'+opt.identifier+"-"+this.index+'"><label>'+this.title+(this.required?"*":"")+'</label><div class="dfield"><input id="'+this.name+'" name="'+this.name+'" minlength="'+this.minlength+'" maxlength="'+htmlEncode(this.maxlength)+'" '+(""!=this.equalTo?'equalTo="#'+htmlEncode(this.equalTo+opt.identifier)+'"':"")+' class="field '+this.size+(this.required?" required":"")+'" type="text" value="'+htmlEncode(this.predefined)+'"/><span class="uh">'+this.userhelp+'</span></div><div class="clearer"></div></div>'},showSpecialDataInstance:function(){return'<div class="column"><label>Min length/characters</label><br /><input name="sMinlength" id="sMinlength" value="'+this.minlength+'"></div><div class="column"><label>Max length/characters</label><br /><input name="sMaxlength" id="sMaxlength" value="'+this.maxlength+'"></div><div class="clearer"></div>'}});var facceptance=function(){};$.extend(facceptance.prototype,ffields.prototype,{title:"Accept terms and conditions",ftype:"facceptance",value:"I accept",required:!0,url:"",message:"",display:function(){return'<div class="fields" id="field'+opt.identifier+"-"+this.index+'"><div class="arrow ui-icon ui-icon-play "></div><div class="remove ui-icon ui-icon-trash "></div><div class="dfield"><input class="field" disabled="true" type="checkbox"/> '+this.title+(this.required?"*":"")+'<span class="uh">'+this.userhelp+'</span></div><div class="clearer"></div></div>'},show:function(){var e=this,i="",t=e.title;return/^\s*$/.test(e.url)?/^\s*$/.test(e.message)||(t='<a href="javascript:void(0);" class="cff-open-dlg">'+t+"</a>",i+='<div class="cff-dialog hide"><span class="cff-close-dlg"></span><div class="cff-dialog-content">'+e.message+"</div></div>"):t='<a href="'+htmlEncode($.trim(e.url))+'" target="_blank">'+t+"</a>",'<div class="fields '+e.csslayout+' cff-checkbox-field" id="field'+e.identifier+"-"+e.index+'"><div class="dfield"><div class="one_column"><label><input name="'+e.name+'" id="'+e.name+'" class="field '+(this.required?" required":"")+'" value="'+htmlEncode(e.value)+'" vt="'+htmlEncode(/^\s*$/.test(e.value)?e.title:e.value)+'" type="checkbox" /> <span>'+htmlDecode(t)+(e.required?'<span class="r">*</span>':"")+"</span></label></div>"+i+'</div><div class="clearer"></div></div>'},after_show:function(){$(document).on("click",".cff-open-dlg",function(){var e=$(this).closest(".fields").find(".cff-dialog"),i=e.data("width"),t=e.data("height");e.removeClass("hide"),void 0===i&&(i=Math.min($(this).closest("form").width(),$(window).width(),e.width())),void 0===t&&(t=Math.min($(this).closest("form").height(),$(window).height(),e.height())),e.data("width",i),e.data("height",t),e.css({width:i+"px",height:t+"px","margin-top":-1*t/2+"px","margin-left":-1*i/2+"px"})}),$(document).on("click",".cff-close-dlg",function(){$(this).closest(".cff-dialog").addClass("hide")})},showSpecialDataInstance:function(){return'<div><label>Value</label><input class="large" type="text" name="sValue" id="sValue" value="'+htmlEncode(this.value)+'"></div><div><label>URL to the Consent and Acknowledgement page</label><input class="large" type="text" name="sURL" id="sURL" value="'+htmlEncode(this.url)+'"></div><div><label>- or - enter the Consent and Acknowledgement text</label><textarea class="large" name="sMessage" id="sMessage" style="height:150px;">'+this.message+"</textarea></div>"}});var fpassword=function(){};$.extend(fpassword.prototype,ffields.prototype,{title:"Untitled",ftype:"fpassword",predefined:"",predefinedClick:!1,required:!1,size:"medium",minlength:"",maxlength:"",equalTo:"",display:function(){return'<div class="fields" id="field'+opt.identifier+"-"+this.index+'">Not available in free version<div class="clearer"></div></div>'},show:function(){return'<div class="fields '+this.csslayout+'" id="field'+opt.identifier+"-"+this.index+'">Not available in free version<div class="clearer"></div></div>'},showSpecialDataInstance:function(){return"Not available in free version"}});var femail=function(){};$.extend(femail.prototype,ffields.prototype,{title:"Email",ftype:"femail",predefined:"",predefinedClick:!1,required:!1,size:"medium",equalTo:"",display:function(){return'<div class="fields" id="field'+opt.identifier+"-"+this.index+'"><div class="arrow ui-icon ui-icon-play "></div><div class="remove ui-icon ui-icon-trash "></div><label>'+this.title+(this.required?"*":"")+'</label><div class="dfield"><input class="field disabled '+this.size+'" type="email" value="'+htmlEncode(this.predefined)+'"/><span class="uh">'+this.userhelp+'</span></div><div class="clearer"></div></div>'},show:function(){return'<div class="fields '+this.csslayout+'" id="field'+opt.identifier+"-"+this.index+'"><label>'+this.title+(this.required?"*":"")+'</label><div class="dfield"><input id="'+this.name+'" name="'+this.name+'" '+(""!=this.equalTo?'equalTo="#'+htmlEncode(this.equalTo+opt.identifier)+'"':"")+' class="field email '+this.size+(this.required?" required":"")+'" type="email" value="'+htmlEncode(this.predefined)+'"/><span class="uh">'+this.userhelp+'</span></div><div class="clearer"></div></div>'},showSpecialDataInstance:function(){return""}});var fnumber=function(){};$.extend(fnumber.prototype,ffields.prototype,{title:"Number",ftype:"fnumber",predefined:"",predefinedClick:!1,required:!1,size:"small",min:"",max:"",dformat:"digits",formats:new Array("digits","number"),display:function(){return'<div class="fields" id="field'+opt.identifier+"-"+this.index+'">Not available in free version<div class="clearer"></div></div>'},show:function(){return'<div class="fields '+this.csslayout+'" id="field'+opt.identifier+"-"+this.index+'">Not available in free version<div class="clearer"></div></div>'},showFormatIntance:function(){return"<div>Not available in free version</div>"},showRangeIntance:function(){return"Not available in free version"}});var fdate=function(){};$.extend(fdate.prototype,ffields.prototype,{title:"Date",ftype:"fdate",predefined:"",predefinedClick:!1,size:"medium",required:!1,dformat:"mm/dd/yyyy",showDropdown:!1,dropdownRange:"-10:+10",minDate:"",maxDate:"",defaultDate:"",formats:new Array("mm/dd/yyyy","dd/mm/yyyy"),display:function(){return""},show:function(){return""},showFormatIntance:function(){return"<div>Not available in free version</div>"},showSpecialDataInstance:function(){return"Not available in free version"}});var ftextarea=function(){};$.extend(ftextarea.prototype,ffields.prototype,{title:"Untitled",ftype:"ftextarea",predefined:"",predefinedClick:!1,required:!1,size:"medium",minlength:"",maxlength:"",display:function(){return'<div class="fields" id="field'+opt.identifier+"-"+this.index+'"><div class="arrow ui-icon ui-icon-play "></div><div class="remove ui-icon ui-icon-trash "></div><label>'+this.title+(this.required?"*":"")+'</label><div class="dfield"><textarea class="field disabled '+this.size+'">'+this.predefined+'</textarea><span class="uh">'+this.userhelp+'</span></div><div class="clearer"></div></div>'},show:function(){return'<div class="fields '+this.csslayout+'" id="field'+opt.identifier+"-"+this.index+'"><label>'+this.title+(this.required?"*":"")+'</label><div class="dfield"><textarea id="'+this.name+'" name="'+this.name+'" minlength="'+this.minlength+'" maxlength="'+htmlEncode(this.maxlength)+'" class="field '+this.size+(this.required?" required":"")+'">'+this.predefined+'</textarea><span class="uh">'+this.userhelp+'</span></div><div class="clearer"></div></div>'},showSpecialDataInstance:function(){return'<div class="column"><label>Min length/characters</label><br /><input name="sMinlength" id="sMinlength" value="'+this.minlength+'"></div><div class="column"><label>Max length/characters</label><br /><input name="sMaxlength" id="sMaxlength" value="'+this.maxlength+'"></div><div class="clearer"></div>'}});var ffile=function(){};$.extend(ffile.prototype,ffields.prototype,{title:"Untitled",ftype:"ffile",required:!1,size:"medium",display:function(){return'<div class="fields" id="field'+opt.identifier+"-"+this.index+'">Not available in free version<div class="clearer"></div></div>'},show:function(){return'<div class="fields '+this.csslayout+'" id="field'+opt.identifier+"-"+this.index+'">Not available in free version<div class="clearer"></div></div>'}});var fSectionBreak=function(){};$.extend(fSectionBreak.prototype,ffields.prototype,{title:"Section Break",ftype:"fSectionBreak",userhelp:"A description of the section goes here.",display:function(){return'<div class="fields" id="field'+opt.identifier+"-"+this.index+'">Not available in free version<div class="clearer"></div></div>'},show:function(){return'<div class="fields '+this.csslayout+' section_breaks" id="field'+opt.identifier+"-"+this.index+'">Not available in free version<div class="clearer"></div></div>'}});var fPageBreak=function(){};$.extend(fPageBreak.prototype,ffields.prototype,{title:"Page Break",ftype:"fPageBreak",display:function(){return'<div class="fields" id="field'+opt.identifier+"-"+this.index+'">Not available in free version<div class="clearer"></div></div>'},show:function(){return'<div class="fields '+this.csslayout+' section_breaks" id="field'+opt.identifier+"-"+this.index+'">Not available in free version<div class="clearer"></div></div>'}});var fPhone=function(){};$.extend(fPhone.prototype,ffields.prototype,{title:"Phone",ftype:"fPhone",required:!1,dformat:"### ### ####",predefined:"888 888 8888",display:function(){return'<div class="fields" id="field'+opt.identifier+"-"+this.index+'">Not available in free version<div class="clearer"></div></div>'},show:function(){return'<div class="fields '+this.csslayout+'" id="field'+opt.identifier+"-"+this.index+'">Not available in free version<div class="clearer"></div></div>'},showFormatIntance:function(){return"<div>Not available in free version</div>"}});var fCommentArea=function(){};$.extend(fCommentArea.prototype,ffields.prototype,{title:"Comments here",ftype:"fCommentArea",userhelp:"A description of the section goes here.",display:function(){return'<div class="fields" id="field'+opt.identifier+"-"+this.index+'">Not available in free version<div class="clearer"></div></div>'},show:function(){return'<div class="fields '+this.csslayout+' comment_area" id="field'+opt.identifier+"-"+this.index+'">Not available in free version<div class="clearer"></div></div>'}});var fcheck=function(){};$.extend(fcheck.prototype,ffields.prototype,{title:"Check All That Apply",ftype:"fcheck",layout:"one_column",required:!1,showDep:!1,init:function(){},display:function(){return'<div class="fields" id="field'+opt.identifier+"-"+this.index+'">Not available in free version<div class="clearer"></div></div>'},show:function(){return'<div class="fields '+this.csslayout+'" id="field'+opt.identifier+"-"+this.index+'">Not available in free version<div class="clearer"></div></div>'},showChoiceIntance:function(){return'<div class="choicesSet '+(this.showDep?"show":"hide")+'">Not available in free version<div class="clearer"></div></div>'+str+"</div>"}});var fradio=function(){};$.extend(fradio.prototype,ffields.prototype,{title:"Select a Choice",ftype:"fradio",layout:"one_column",required:!1,choiceSelected:null,showDep:!1,init:function(){},display:function(){return'<div class="fields" id="field'+opt.identifier+"-"+this.index+'"><div class="arrow ui-icon ui-icon-play "></div><div class="remove ui-icon ui-icon-trash "></div><label>'+this.title+(this.required?"*":"")+'</label><div class="dfield">'+str+'<span class="uh">'+this.userhelp+'</span></div><div class="clearer"></div></div>'},show:function(){this.choicesVal=void 0!==this.choicesVal&&null!==this.choicesVal?this.choicesVal:this.choices.slice(0);var e="";if(void 0===this.choicesDep||null===this.choicesDep){this.choicesDep=new Array;for(var i=0;i<this.choices.length;i++)this.choicesDep[i]=new Array}for(i=0;i<this.choices.length;i++){var t="",s="",a=this.choicesDep;if(a[i].length>0){t=" depItem";for(var n=0;n<a[i].length;n++)s+=","+a[i][n]}e+='<div class="'+this.layout+'"><input name="'+this.name+'" id="'+this.name+'" '+(""!=t?'dep="'+s+'"':"")+' class="field depItem group '+(this.required?" required":"")+'" value="'+htmlEncode(this.choicesVal[i])+'" type="radio" i="'+i+'" '+(this.choicesVal[i]==this.choiceSelected?"checked":"")+"/> <span>"+this.choices[i]+"</span></div>"}return'<div class="fields '+this.csslayout+'" id="field'+opt.identifier+"-"+this.index+'"><label>'+this.title+(this.required?"*":"")+'</label><div class="dfield">'+e+'<span class="uh">'+this.userhelp+'</span></div><div class="clearer"></div></div>'},showChoiceIntance:function(){this.choicesVal=void 0!==this.choicesVal&&null!==this.choicesVal?this.choicesVal:this.choices.slice(0);var e=this.choices,i=this.choicesVal;this.choiceSelected;if(void 0===this.choicesDep||null===this.choicesDep){this.choicesDep=new Array;for(var t=0;t<e.length;t++)this.choicesDep[t]=new Array}var s=this.choicesDep,a="";for(t=0;t<e.length;t++){a+='<div class="choicesEdit"><input class="choice_radio" i="'+t+'" type="radio" '+(this.choiceSelected==i[t]?"checked":"")+' name="choice_radio" /><input class="choice_text" i="'+t+'" type="text" name="sChoice'+this.name+'" id="sChoice'+this.name+'" value="'+htmlEncode(e[t])+'"/><input class="choice_value" i="'+t+'" type="text" name="sChoice'+this.name+"V"+t+'" id="sChoice'+this.name+"V"+t+'" value="'+htmlEncode(i[t])+'"/><a class="choice_add ui-icon ui-icon-circle-plus" i="'+t+'" title="Add another choice."></a><a class="choice_remove ui-icon ui-icon-circle-minus" i="'+t+'" title="Delete this choice."></a></div>';for(var n=0;n<s[t].length;n++)a+='<div class="choicesEditDep">If selected show: <select class="dependencies" i="'+t+'" j="'+n+'" dname="'+this.name+'" dvalue="'+s[t][n]+'" ></select><a class="choice_addDep ui-icon ui-icon-circle-plus" i="'+t+'" j="'+n+'" title="Add another dependency."></a><a class="choice_removeDep ui-icon ui-icon-circle-minus" i="'+t+'" j="'+n+'" title="Delete this dependency."></a></div>';0==s[t].length&&(a+='<div class="choicesEditDep">If selected show: <select class="dependencies" i="'+t+'" j="'+s[t].length+'" dname="'+this.name+'" dvalue="" ></select><a class="choice_addDep ui-icon ui-icon-circle-plus" i="'+t+'" j="'+s[t].length+'" title="Add another dependency."></a><a class="choice_removeDep ui-icon ui-icon-circle-minus" i="'+t+'" j="'+s[t].length+'" title="Delete this dependency."></a></div>')}return'<div class="choicesSet '+(this.showDep?"show":"hide")+'"><label>Choices</label> <a class="helpfbuilder dep" text="Dependencies are used to show/hide other fields depending of the option selected in this field.">help?</a> <a href="" class="showHideDependencies">'+(this.showDep?"Hide":"Show")+' Dependencies</a><div><div class="t">Text</div><div class="t">Value</div><div class="clearer"></div></div>'+a+"</div>"}});var fdropdown=function(){};$.extend(fdropdown.prototype,ffields.prototype,{title:"Select a Choice",ftype:"fdropdown",size:"medium",required:!1,choiceSelected:"",showDep:!1,init:function(){},display:function(){return this.choicesVal=void 0!==this.choicesVal&&null!==this.choicesVal?this.choicesVal:this.choices.slice(0),'<div class="fields" id="field'+opt.identifier+"-"+this.index+'">Not available in free version<div class="clearer"></div></div>'},show:function(){return'<div class="fields '+this.csslayout+'" id="field'+opt.identifier+"-"+this.index+'">Not available in free version<div class="clearer"></div></div>'},showChoiceIntance:function(){return'<div class="choicesSet '+(this.showDep?"show":"hide")+'">Not available in free version<div class="clearer"></div></div>'+str+"</div>"}}),opt.pub||$("#fieldlist"+opt.identifier).sortable({start:function(e,i){var t=i.item.index();i.item.data("start_pos",t)},stop:function(e,i){var t=parseInt(i.item.index()),s=parseInt(i.item.data("start_pos")),a=items[s];if(t>s)for(var n=s;n<t;n++)items[n]=items[n+1];else for(n=s;n>t;n--)items[n]=items[n-1];items[t]=a,reloadItems()}}),opt.pub||$("#tabs").tabs({activate:function(e,i){1!=$(this).tabs("option","active")?($(".fields").removeClass("ui-selected"),itemSelected=-2,2==$(this).tabs("option","active")?($(".fform").addClass("ui-selected"),editForm()):$(".fform").removeClass("ui-selected")):($(".fform").removeClass("ui-selected"),itemSelected<0&&$("#tabs-2").html("<b>No Field Selected</b><br />Please click on a field in the form preview on the right to change its properties."))}}),loadtmp=function(p){if((d=$.parseJSON(p))&&2==d.length){items=new Array;for(var i=0;i<d[0].length;i++){var obj=eval("new "+d[0][i].ftype+"();");obj=$.extend(obj,d[0][i]),obj.name=obj.name+opt.identifier,items[items.length]=obj}theForm=new fform,theForm=$.extend(theForm,d[1][0]),opt.pub?reloadItemsPublic():reloadItems()}};var ffunct={getItems:function(){return items},addItem:function(id){var obj=eval("new "+id+"();");obj.init();for(var n=0,i=0;i<items.length;i++)n1=parseInt(items[i].name.replace(/fieldname/g,"")),n1>n&&(n=n1);$.extend(obj,{name:"fieldname"+(n+1)}),items[items.length]=obj,reloadItems()},saveData:function(e){""!=e?$("#"+e).val("["+$.stringifyXX(items,!1)+",["+$.stringifyXX(theForm,!1)+"]]"):$.ajax({type:"POST",url:"process.php?act=save",data:"items="+$.stringifyXX(items,!0)+"&theForm="+$.stringifyXX(theForm,!0),dataType:"json",success:function(e){alert("The form has been saved!!!")}})},loadData:function(e){""!=e?loadtmp($("#"+e).val()):$.ajax({async:!1,url:"process.php?act=load",success:function(e){loadtmp(e.toString())}})},removeItem:removeItem,editItem:editItem};return this.fBuild=ffunct,this};for(var fcount=1,fnum="_"+fcount;10>fcount||eval("typeof cp_contactformtoemail_fbuilder_config"+fnum+" != 'undefined'");){try{var cp_contactformtoemail_fbuilder_config=eval("cp_contactformtoemail_fbuilder_config"+fnum),f=$("#fbuilder"+fnum).CFTEfbuilder($.parseJSON(cp_contactformtoemail_fbuilder_config.obj));f.fBuild.loadData("form_structure"+fnum),$("#cp_contactformtoemail_pform"+fnum).validate({ignore:".ignore",errorElement:"div",errorPlacement:function(e,i){i.hasClass("group")&&(i=i.parent()),e.insertBefore(i),e.addClass("message"),e.css("position","absolute"),e.css("left",0),e.css("top",i.parent().outerHeight(!0))}}),$(document).trigger("showHideDepEvent",fnum)}catch(e){}fcount++,fnum="_"+fcount}}(jQuery)});
|
js/fbuilderf.jquery.original.js
CHANGED
@@ -563,7 +563,7 @@ jQuery(window).on('load', function(){
|
|
563 |
$("#cpcaptchalayer"+opt.identifier).html("");
|
564 |
}
|
565 |
if ($("#cp_subbtn"+opt.identifier).html())
|
566 |
-
bSubmit = '<
|
567 |
}
|
568 |
$(this).html('<fieldset><legend>'+opt.messages.page+' '+(index+1)+' '+opt.messages.of+' '+(page+1)+'</legend>'+code+'<div class="pbPrevious">'+opt.messages.previous+'</div><div class="pbNext">'+opt.messages.next+'</div>'+bSubmit+'<div class="clearer"></div></fieldset>');
|
569 |
});
|
@@ -590,7 +590,7 @@ jQuery(window).on('load', function(){
|
|
590 |
$("#cpcaptchalayer"+opt.identifier).html("");
|
591 |
}
|
592 |
if ($("#cp_subbtn"+opt.identifier).html())
|
593 |
-
$("#fieldlist"+opt.identifier+" .pb"+page).append('<
|
594 |
}
|
595 |
$(".pbSubmit").bind("click", function() {
|
596 |
$(this).parents("#fieldlist"+opt.identifier).parents("form").submit();
|
563 |
$("#cpcaptchalayer"+opt.identifier).html("");
|
564 |
}
|
565 |
if ($("#cp_subbtn"+opt.identifier).html())
|
566 |
+
bSubmit = '<button type="button" class="pbSubmit">'+$("#cp_subbtn"+opt.identifier).html()+'</button>';
|
567 |
}
|
568 |
$(this).html('<fieldset><legend>'+opt.messages.page+' '+(index+1)+' '+opt.messages.of+' '+(page+1)+'</legend>'+code+'<div class="pbPrevious">'+opt.messages.previous+'</div><div class="pbNext">'+opt.messages.next+'</div>'+bSubmit+'<div class="clearer"></div></fieldset>');
|
569 |
});
|
590 |
$("#cpcaptchalayer"+opt.identifier).html("");
|
591 |
}
|
592 |
if ($("#cp_subbtn"+opt.identifier).html())
|
593 |
+
$("#fieldlist"+opt.identifier+" .pb"+page).append('<button type="button" class="pbSubmit">'+$("#cp_subbtn"+opt.identifier).html()+'</button>');
|
594 |
}
|
595 |
$(".pbSubmit").bind("click", function() {
|
596 |
$(this).parents("#fieldlist"+opt.identifier).parents("form").submit();
|