<html><head>
<title>TRAPO® CAR MATS AGENTS</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta content="width=device-width, initial-scale=1.0" name="viewport">
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=0">
<link rel="stylesheet" href="https://formbuilder.hulkapps.com/corepage/css/bootstrap.css">
<link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/sweetalert/1.1.3/sweetalert.min.css">
<link rel="stylesheet" href="//maxcdn.bootstrapcdn.com/font-awesome/4.3.0/css/font-awesome.min.css">
<link rel="stylesheet" href="https://formbuilder.hulkapps.com/corepage/css/bootstrap-datetimepicker.css">
<link rel="stylesheet" href="https://formbuilder.hulkapps.com/corepage/css/styles.css">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.6.3/css/font-awesome.min.css">
<script type="text/javascript" async="" src="https://www.gstatic.com/recaptcha/releases/JPZ52lNx97aD96bjM7KaA0bo/recaptcha__en.js"></script><script type="text/javascript" src="https://formbuilder.hulkapps.com/corepage/js/jquery.min.js"></script>
<script type="text/javascript" src="https://formbuilder.hulkapps.com/corepage/js/bootstrap.min.js"></script>
<script type="text/javascript" src="https://formbuilder.hulkapps.com/corepage/js/moment-with-locales.js"></script>
<script type="text/javascript" src="https://formbuilder.hulkapps.com/corepage/js/bootstrap-datetimepicker.js"></script>
<script type="text/javascript" src="//cdnjs.cloudflare.com/ajax/libs/sweetalert/1.1.3/sweetalert-dev.min.js"></script>
<script async="" type="text/javascript" src="https://www.google.com/recaptcha/api.js" defer=""></script>
<style id="form_builder_css">
.sa-confirm-button-container .confirm {
background-color: #f27474 !important
}
.rc-image-tile-wrapper{transition: auto !important}
.form_generater_form_div{
background: transparent;
max-width: 600px;
border: solid;
border-width: 2px;
border-color: #c7c7c7;
border-radius: 1px;
padding: 35px;
}
input,textarea, select, .image label, .file label, .form-control[disabled], .form-control[readonly] {
background: #fff;
border-radius: 2px;
border: 1px solid #ccc;
}
input:focus, textarea:focus, select:focus, .image label:focus, .file label:focus {
background: #fff;
border: 1px solid #ccc;
}
input, textarea, select, .checkbox-inline label, .checkbox-inline input[type="checkbox"] + label, .radio-inline label, .radio-inline input[type="radio"] + label, .image label,.file label{
color: #333333;
font-size: 12px;
}
.image label, .file label{
line-height: inherit;
}
div.form_submit_div button, div.form_submit_div button:hover{
color : #fff !important;
background: #333333 !important;
border-radius: 2px;
width: 100%;
font-size: 16px;
border:1px solid #333333;
}
.block_label {
color: #333333;
font-size: 14px;
}
input:-moz-placeholder {
color: #333333;
}
input::-webkit-input-placeholder {
color: #333333;
}
.radio, .checkbox-multi, .checkbox {
margin-top: 0px; margin-bottom: 10px;
}
input[type="checkbox"] + label span,input[type="radio"] + label span {
background: #fff;
border: 1px solid #ccc;
border-radius: 2px;
}
input[type="radio"]:checked + label span,input[type="checkbox"]:checked + label span {
background: #333333;
}
input[type="radio"]:checked + label span:after,input[type="checkbox"]:checked + label span:after{
color: #fff;
font-size: 14px;
}
.form_container input[type="radio"] + label span {
border-radius: 50%;
}
.infoMessage, .fileres {
color: #333333;
font-size: 14px;
}
::-webkit-input-placeholder{ color: #333333; }
:-moz-placeholder{color: #333333; }
::-moz-placeholder{color: #333333; }
:-ms-input-placeholder{color: #333333; }
fileres{
text-transform: capitalize;
}
</style>
</head>
<body>
<div id="wizard-validation-form">
<div class="formContainer">
<form action="#" method="post" id="formGeneratorForm">
<div class="form_generater_form_div">
<div class="row">
<div class="col-md-12 clearfix">
<div class="form_title_div"></div>
</div>
<div class="col-md-12 clearfix">
<div class="alert_message" style="display: block;"><div class="alert alert-danger" role="alert"><button type="button" class="close" data-dismiss="alert" aria-label="Close"><span aria-hidden="true">×</span></button>Email is required<br>Phone Number is required<br>Company Name is required<br>Message is required</div></div>
</div>
<div class="col-md-12 form_element clearfix">
<div class="row form_container">
<div class="formElement_0 form-group fadeMe text clearfix col-sm-6 select paymentCount" data-count="0"><label class="fitText block_label" for="form_input_0" style="display: block;">Type</label><select name="Type" class="form-control input0" id="form_input_0"><option value=""> Please Select </option><option value="TRAPO AGENT"> TRAPO AGENT </option><option value="TRAPO PARTNER"> TRAPO PARTNER </option></select> </div>
<div class="formElement_1 form-group fadeMe text clearfix col-sm-6 textfield paymentCount" data-count="1"><label class="fitText block_label" for="form_input_1" style="display: block;">First Name</label><input class="form-control " name="First Name" id="form_input_1" type="text" placeholder=""> </div>
<div class="formElement_2 form-group fadeMe text clearfix col-sm-6 textfield paymentCount" data-count="2"><label class="fitText block_label" for="form_input_2" style="display: block;">Last Name</label><input class="form-control" name="Last Name" id="form_input_2" type="text" placeholder=""> </div>
<div class="formElement_3 form-group fadeMe text clearfix col-sm-6 email paymentCount" data-count="3"><label class="fitText block_label" style="display: block;">Email*</label><input class="form-control required email_confirm error" id="form_input_3" name="Email" type="email" placeholder=""> </div>
<div class="formElement_4 form-group fadeMe text clearfix col-sm-6 textfield paymentCount" data-count="4"><label class="fitText block_label" style="display: block;">Phone Number*</label><input class="form-control required error" name="Phone Number" id="form_input_4" type="text" placeholder=""> </div>
<div class="formElement_5 form-group fadeMe text clearfix col-sm-6 textfield paymentCount" data-count="5"><label class="fitText block_label" style="display: block;">Company Name*</label><input class="form-control required error" name="Company Name" id="form_input_5" type="text" placeholder=""> </div>
<div class="formElement_6 form-group fadeMe text clearfix col-sm-6 textfield paymentCount" data-count="6"><label class="fitText block_label" for="form_input_6" style="display: block;">Website</label><input class="form-control" name="Website" id="form_input_6" type="text" placeholder=""> </div>
<div class="formElement_7 form-group fadeMe text clearfix col-sm-12 textarea paymentCount" data-count="7"><label class="fitText block_label" style="display: block;">Message*</label><textarea class="form-control required error" id="form_input_7" name="Message" data-max="250" data-limiting="false" style="height: 50px" placeholder=""></textarea> </div>
<div class="formElement_8 form-group fadeMe text clearfix col-sm-12 textfield paymentCount" data-count="8"><label class="fitText block_label" for="form_input_8" style="display: block;">Street Address</label><input class="form-control" name="Street Address" id="form_input_8" type="text" placeholder=""> </div>
<div class="formElement_9 form-group fadeMe text clearfix col-sm-12 textfield paymentCount" data-count="9"><label class="fitText block_label" for="form_input_9" style="display: block;">Address Line 2</label><input class="form-control" name="Address Line 2" id="form_input_9" type="text" placeholder=""> </div>
<div class="formElement_10 form-group fadeMe text clearfix col-sm-6 textfield paymentCount" data-count="10"><label class="fitText block_label" for="form_input_10" style="display: block;">City</label><input class="form-control" name="City" id="form_input_10" type="text" placeholder=""> </div>
<div class="formElement_11 form-group fadeMe text clearfix col-sm-6 textfield paymentCount" data-count="11"><label class="fitText block_label" for="form_input_11" style="display: block;">State/Province/Region</label><input class="form-control" name="State/Province/Region" id="form_input_11" type="text" placeholder=""> </div>
<div class="formElement_12 form-group fadeMe text clearfix col-sm-6 textfield paymentCount" data-count="12"><label class="fitText block_label" for="form_input_12" style="display: block;">ZIP/Postal Code</label><input class="form-control" name="ZIP/Postal Code" id="form_input_12" type="text" placeholder=""> </div>
<div class="formElement_13 form-group fadeMe text clearfix col-sm-6 select paymentCount" data-count="13"><label class="fitText block_label" for="form_input_13" style="display: block;">Country</label><select name="Country" class="form-control input13" id="form_input_13"><option value=""> Please Select </option><option value="Afghanistan"> Afghanistan </option><option value="Akrotiri"> Akrotiri </option><option value="Albania"> Albania </option><option value="Algeria"> Algeria </option><option value="American Samoa"> American Samoa </option><option value="Andorra"> Andorra </option><option value="Angola"> Angola </option><option value="Anguilla"> Anguilla </option><option value="Antarctica"> Antarctica </option><option value="Antigua and Barbuda"> Antigua and Barbuda </option><option value="Argentina"> Argentina </option><option value="Armenia"> Armenia </option><option value="Aruba"> Aruba </option><option value="Ashmore and Cartier Islands"> Ashmore and Cartier Islands </option><option value="Australia"> Australia </option><option value="Austria"> Austria </option><option value="Azerbaijan"> Azerbaijan </option><option value="Bahamas, The"> Bahamas, The </option><option value="Bahrain"> Bahrain </option><option value="Bangladesh"> Bangladesh </option><option value="Barbados"> Barbados </option><option value="Bassas da India"> Bassas da India </option><option value="Belarus"> Belarus </option><option value="Belgium"> Belgium </option><option value="Belize"> Belize </option><option value="Benin"> Benin </option><option value="Bermuda"> Bermuda </option><option value="Bhutan"> Bhutan </option><option value="Bolivia"> Bolivia </option><option value="Bosnia and Herzegovina"> Bosnia and Herzegovina </option><option value="Botswana"> Botswana </option><option value="Bouvet Island"> Bouvet Island </option><option value="Brazil"> Brazil </option><option value="British Indian Ocean Territory"> British Indian Ocean Territory </option><option value="British Virgin Islands"> British Virgin Islands </option><option value="Brunei"> Brunei </option><option value="Bulgaria"> Bulgaria </option><option value="Burkina Faso"> Burkina Faso </option><option value="Burma"> Burma </option><option value="Burundi"> Burundi </option><option value="Cambodia"> Cambodia </option><option value="Cameroon"> Cameroon </option><option value="Canada"> Canada </option><option value="Cape Verde"> Cape Verde </option><option value="Cayman Islands"> Cayman Islands </option><option value="Central African Republic"> Central African Republic </option><option value="Chad"> Chad </option><option value="Chile"> Chile </option><option value="China"> China </option><option value="Christmas Island"> Christmas Island </option><option value="Clipperton Island"> Clipperton Island </option><option value="Cocos (Keeling) Islands"> Cocos (Keeling) Islands </option><option value="Colombia"> Colombia </option><option value="Comoros"> Comoros </option><option value="Congo, Democratic Republic of the"> Congo, Democratic Republic of the </option><option value="Congo, Republic of the"> Congo, Republic of the </option><option value="Cook Islands"> Cook Islands </option><option value="Coral Sea Islands"> Coral Sea Islands </option><option value="Costa Rica"> Costa Rica </option><option value="Cote dIvoire"> Cote dIvoire </option><option value="Croatia"> Croatia </option><option value="Cuba"> Cuba </option><option value="Cyprus"> Cyprus </option><option value="Czech Republic"> Czech Republic </option><option value="Denmark"> Denmark </option><option value="Dhekelia"> Dhekelia </option><option value="Djibouti"> Djibouti </option><option value="Dominica"> Dominica </option><option value="Dominican Republic"> Dominican Republic </option><option value="Ecuador"> Ecuador </option><option value="Egypt"> Egypt </option><option value="El Salvador"> El Salvador </option><option value="Equatorial Guinea"> Equatorial Guinea </option><option value="Eritrea"> Eritrea </option><option value="Estonia"> Estonia </option><option value="Ethiopia"> Ethiopia </option><option value="Europa Island"> Europa Island </option><option value="Falkland Islands (Islas Malvinas)"> Falkland Islands (Islas Malvinas) </option><option value="Faroe Islands"> Faroe Islands </option><option value="Fiji"> Fiji </option><option value="Finland"> Finland </option><option value="France"> France </option><option value="French Guiana"> French Guiana </option><option value="French Polynesia"> French Polynesia </option><option value="French Southern and Antarctic Lands"> French Southern and Antarctic Lands </option><option value="Gabon"> Gabon </option><option value="Gambia, The"> Gambia, The </option><option value="Gaza Strip"> Gaza Strip </option><option value="Georgia"> Georgia </option><option value="Germany"> Germany </option><option value="Ghana"> Ghana </option><option value="Gibraltar"> Gibraltar </option><option value="Glorioso Islands"> Glorioso Islands </option><option value="Greece"> Greece </option><option value="Greenland"> Greenland </option><option value="Grenada"> Grenada </option><option value="Guadeloupe"> Guadeloupe </option><option value="Guam"> Guam </option><option value="Guatemala"> Guatemala </option><option value="Guernsey"> Guernsey </option><option value="Guinea"> Guinea </option><option value="Guinea-Bissau"> Guinea-Bissau </option><option value="Guyana"> Guyana </option><option value="Haiti"> Haiti </option><option value="Heard Island and McDonald Islands"> Heard Island and McDonald Islands </option><option value="Holy See (Vatican City)"> Holy See (Vatican City) </option><option value="Honduras"> Honduras </option><option value="Hong Kong"> Hong Kong </option><option value="Hungary"> Hungary </option><option value="Iceland"> Iceland </option><option value="India"> India </option><option value="Indonesia"> Indonesia </option><option value="Iran"> Iran </option><option value="Iraq"> Iraq </option><option value="Ireland"> Ireland </option><option value="Isle of Man"> Isle of Man </option><option value="Israel"> Israel </option><option value="Italy"> Italy </option><option value="Jamaica"> Jamaica </option><option value="Jan Mayen"> Jan Mayen </option><option value="Japan"> Japan </option><option value="Jersey"> Jersey </option><option value="Jordan"> Jordan </option><option value="Juan de Nova Island"> Juan de Nova Island </option><option value="Kazakhstan"> Kazakhstan </option><option value="Kenya"> Kenya </option><option value="Kiribati"> Kiribati </option><option value="Korea, North"> Korea, North </option><option value="Korea, South"> Korea, South </option><option value="Kuwait"> Kuwait </option><option value="Kyrgyzstan"> Kyrgyzstan </option><option value="Laos"> Laos </option><option value="Latvia"> Latvia </option><option value="Lebanon"> Lebanon </option><option value="Lesotho"> Lesotho </option><option value="Liberia"> Liberia </option><option value="Libya"> Libya </option><option value="Liechtenstein"> Liechtenstein </option><option value="Lithuania"> Lithuania </option><option value="Luxembourg"> Luxembourg </option><option value="Macau"> Macau </option><option value="Macedonia"> Macedonia </option><option value="Madagascar"> Madagascar </option><option value="Malawi"> Malawi </option><option value="Malaysia"> Malaysia </option><option value="Maldives"> Maldives </option><option value="Mali"> Mali </option><option value="Malta"> Malta </option><option value="Marshall Islands"> Marshall Islands </option><option value="Martinique"> Martinique </option><option value="Mauritania"> Mauritania </option><option value="Mauritius"> Mauritius </option><option value="Mayotte"> Mayotte </option><option value="Mexico"> Mexico </option><option value="Micronesia, Federated States of"> Micronesia, Federated States of </option><option value="Moldova"> Moldova </option><option value="Monaco"> Monaco </option><option value="Mongolia"> Mongolia </option><option value="Montserrat"> Montserrat </option><option value="Morocco"> Morocco </option><option value="Mozambique"> Mozambique </option><option value="Namibia"> Namibia </option><option value="Nauru"> Nauru </option><option value="Navassa Island"> Navassa Island </option><option value="Nepal"> Nepal </option><option value="Netherlands"> Netherlands </option><option value="Netherlands Antilles"> Netherlands Antilles </option><option value="New Caledonia"> New Caledonia </option><option value="New Zealand"> New Zealand </option><option value="Nicaragua"> Nicaragua </option><option value="Niger"> Niger </option><option value="Nigeria"> Nigeria </option><option value="Niue"> Niue </option><option value="Norfolk Island"> Norfolk Island </option><option value="Northern Mariana Islands"> Northern Mariana Islands </option><option value="Norway"> Norway </option><option value="Oman"> Oman </option><option value="Pakistan"> Pakistan </option><option value="Palau"> Palau </option><option value="Panama"> Panama </option><option value="Papua New Guinea"> Papua New Guinea </option><option value="Paracel Islands"> Paracel Islands </option><option value="Paraguay"> Paraguay </option><option value="Peru"> Peru </option><option value="Philippines"> Philippines </option><option value="Pitcairn Islands"> Pitcairn Islands </option><option value="Poland"> Poland </option><option value="Portugal"> Portugal </option><option value="Puerto Rico"> Puerto Rico </option><option value="Qatar"> Qatar </option><option value="Reunion"> Reunion </option><option value="Romania"> Romania </option><option value="Russia"> Russia </option><option value="Rwanda"> Rwanda </option><option value="Saint Helena"> Saint Helena </option><option value="Saint Kitts and Nevis"> Saint Kitts and Nevis </option><option value="Saint Lucia"> Saint Lucia </option><option value="Saint Pierre and Miquelon"> Saint Pierre and Miquelon </option><option value="Saint Vincent and the Grenadines"> Saint Vincent and the Grenadines </option><option value="Samoa"> Samoa </option><option value="San Marino"> San Marino </option><option value="Sao Tome and Principe"> Sao Tome and Principe </option><option value="Saudi Arabia"> Saudi Arabia </option><option value="Senegal"> Senegal </option><option value="Serbia and Montenegro"> Serbia and Montenegro </option><option value="Seychelles"> Seychelles </option><option value="Sierra Leone"> Sierra Leone </option><option value="Singapore"> Singapore </option><option value="Slovakia"> Slovakia </option><option value="Slovenia"> Slovenia </option><option value="Solomon Islands"> Solomon Islands </option><option value="Somalia"> Somalia </option><option value="South Africa"> South Africa </option><option value="South Georgia and the South Sandwich Islands"> South Georgia and the South Sandwich Islands </option><option value="Spain"> Spain </option><option value="Spratly Islands"> Spratly Islands </option><option value="Sri Lanka"> Sri Lanka </option><option value="Sudan"> Sudan </option><option value="Suriname"> Suriname </option><option value="Svalbard"> Svalbard </option><option value="Swaziland"> Swaziland </option><option value="Sweden"> Sweden </option><option value="Switzerland"> Switzerland </option><option value="Syria"> Syria </option><option value="Taiwan"> Taiwan </option><option value="Tajikistan"> Tajikistan </option><option value="Tanzania"> Tanzania </option><option value="Thailand"> Thailand </option><option value="Timor-Leste"> Timor-Leste </option><option value="Togo"> Togo </option><option value="Tokelau"> Tokelau </option><option value="Tonga"> Tonga </option><option value="Trinidad and Tobago"> Trinidad and Tobago </option><option value="Tromelin Island"> Tromelin Island </option><option value="Tunisia"> Tunisia </option><option value="Turkey"> Turkey </option><option value="Turkmenistan"> Turkmenistan </option><option value="Turks and Caicos Islands"> Turks and Caicos Islands </option><option value="Tuvalu"> Tuvalu </option><option value="Uganda"> Uganda </option><option value="Ukraine"> Ukraine </option><option value="United Arab Emirates"> United Arab Emirates </option><option value="United Kingdom"> United Kingdom </option><option value="United States"> United States </option><option value="Uruguay"> Uruguay </option><option value="Uzbekistan"> Uzbekistan </option><option value="Vanuatu"> Vanuatu </option><option value="Venezuela"> Venezuela </option><option value="Vietnam"> Vietnam </option><option value="Virgin Islands"> Virgin Islands </option><option value="Wake Island"> Wake Island </option><option value="Wallis and Futuna"> Wallis and Futuna </option><option value="West Bank"> West Bank </option><option value="Western Sahara"> Western Sahara </option><option value="Yemen"> Yemen </option><option value="Zambia"> Zambia </option><option value="Zimbabwe"> Zimbabwe </option></select> </div>
</div>
<div class="clearfix"></div>
<div class="form_submit_div text-center">
<button type="submit" class="btn">Submit <span class="price"></span></button>
</div>
</div>
</div>
</div>
</form>
</div>
<div class="after_form_submit" style="display:none;">
<div class="form_generater_form_div text-center"></div>
</div>
</div>
<script type="text/javascript">
jQuery(document).ready(function(){
var deletefile = [];
var formData = {"div_back_gradient_1":"#fff","div_back_gradient_2":"#fff","back_color":"#fff","form_title":"","form_submit":"Submit","after_submit":"clearAndAllow","after_submit_msg":"","captcha_enable":"no","label_style":"blockLabels","input_border_radius":"2","back_type":"transparent","input_back_color":"#fff","input_back_color_hover":"#fff","back_shadow":"none","label_font_clr":"#333333","input_font_clr":"#333333","button_align":"fullBtn","button_clr":"#fff","button_back_clr":"#333333","button_border_radius":"2","form_width":"600px","form_border_size":"2","form_border_clr":"#c7c7c7","form_border_radius":"1","label_font_size":"14","input_font_size":"12","button_font_size":"16","form_padding":"35","input_border_color":"#ccc","input_border_color_hover":"#ccc","btn_border_clr":"#333333","btn_border_size":"1","form_name":"TRAPO® CAR MATS AGENTS","":"enquiry.my@trapo.asia","form_emails":"enquiry.my@trapo.asia","formElements":[{"Conditions":{},"type":"select","position":0,"label":"Type","halfwidth":"yes","values":"TRAPO AGENT\nTRAPO PARTNER","elementCost":{}},{"type":"text","position":1,"label":"First Name","customClass":"","halfwidth":"yes","Conditions":{}},{"type":"text","position":2,"label":"Last Name","halfwidth":"yes","Conditions":{}},{"type":"email","position":3,"label":"Email","required":"yes","email_confirm":"yes","Conditions":{},"halfwidth":"yes"},{"Conditions":{},"type":"text","position":4,"label":"Phone Number","halfwidth":"yes","required":"yes"},{"Conditions":{},"type":"text","position":5,"label":"Company Name","halfwidth":"yes","required":"yes"},{"Conditions":{},"type":"text","position":6,"label":"Website","halfwidth":"yes"},{"type":"textarea","position":7,"label":"Message","required":"yes","Conditions":{}},{"Conditions":{},"type":"text","position":8,"label":"Street Address"},{"Conditions":{},"type":"text","position":9,"label":"Address Line 2","halfwidth":"no"},{"Conditions":{},"type":"text","position":10,"label":"City","halfwidth":"yes"},{"Conditions":{},"type":"text","position":11,"label":"State/Province/Region","halfwidth":"yes"},{"Conditions":{},"type":"text","position":12,"label":"ZIP/Postal Code","halfwidth":"yes"},{"Conditions":{},"type":"select","position":13,"label":"Country","halfwidth":"yes","values":"Afghanistan\nAkrotiri\nAlbania\nAlgeria\nAmerican Samoa\nAndorra\nAngola\nAnguilla\nAntarctica\nAntigua and Barbuda\nArgentina\nArmenia\nAruba\nAshmore and Cartier Islands\nAustralia\nAustria\nAzerbaijan\nBahamas, The\nBahrain\nBangladesh\nBarbados\nBassas da India\nBelarus\nBelgium\nBelize\nBenin\nBermuda\nBhutan\nBolivia\nBosnia and Herzegovina\nBotswana\nBouvet Island\nBrazil\nBritish Indian Ocean Territory\nBritish Virgin Islands\nBrunei\nBulgaria\nBurkina Faso\nBurma\nBurundi\nCambodia\nCameroon\nCanada\nCape Verde\nCayman Islands\nCentral African Republic\nChad\nChile\nChina\nChristmas Island\nClipperton Island\nCocos (Keeling) Islands\nColombia\nComoros\nCongo, Democratic Republic of the\nCongo, Republic of the\nCook Islands\nCoral Sea Islands\nCosta Rica\nCote dIvoire\nCroatia\nCuba\nCyprus\nCzech Republic\nDenmark\nDhekelia\nDjibouti\nDominica\nDominican Republic\nEcuador\nEgypt\nEl Salvador\nEquatorial Guinea\nEritrea\nEstonia\nEthiopia\nEuropa Island\nFalkland Islands (Islas Malvinas)\nFaroe Islands\nFiji\nFinland\nFrance\nFrench Guiana\nFrench Polynesia\nFrench Southern and Antarctic Lands\nGabon\nGambia, The\nGaza Strip\nGeorgia\nGermany\nGhana\nGibraltar\nGlorioso Islands\nGreece\nGreenland\nGrenada\nGuadeloupe\nGuam\nGuatemala\nGuernsey\nGuinea\nGuinea-Bissau\nGuyana\nHaiti\nHeard Island and McDonald Islands\nHoly See (Vatican City)\nHonduras\nHong Kong\nHungary\nIceland\nIndia\nIndonesia\nIran\nIraq\nIreland\nIsle of Man\nIsrael\nItaly\nJamaica\nJan Mayen\nJapan\nJersey\nJordan\nJuan de Nova Island\nKazakhstan\nKenya\nKiribati\nKorea, North\nKorea, South\nKuwait\nKyrgyzstan\nLaos\nLatvia\nLebanon\nLesotho\nLiberia\nLibya\nLiechtenstein\nLithuania\nLuxembourg\nMacau\nMacedonia\nMadagascar\nMalawi\nMalaysia\nMaldives\nMali\nMalta\nMarshall Islands\nMartinique\nMauritania\nMauritius\nMayotte\nMexico\nMicronesia, Federated States of\nMoldova\nMonaco\nMongolia\nMontserrat\nMorocco\nMozambique\nNamibia\nNauru\nNavassa Island\nNepal\nNetherlands\nNetherlands Antilles\nNew Caledonia\nNew Zealand\nNicaragua\nNiger\nNigeria\nNiue\nNorfolk Island\nNorthern Mariana Islands\nNorway\nOman\nPakistan\nPalau\nPanama\nPapua New Guinea\nParacel Islands\nParaguay\nPeru\nPhilippines\nPitcairn Islands\nPoland\nPortugal\nPuerto Rico\nQatar\nReunion\nRomania\nRussia\nRwanda\nSaint Helena\nSaint Kitts and Nevis\nSaint Lucia\nSaint Pierre and Miquelon\nSaint Vincent and the Grenadines\nSamoa\nSan Marino\nSao Tome and Principe\nSaudi Arabia\nSenegal\nSerbia and Montenegro\nSeychelles\nSierra Leone\nSingapore\nSlovakia\nSlovenia\nSolomon Islands\nSomalia\nSouth Africa\nSouth Georgia and the South Sandwich Islands\nSpain\nSpratly Islands\nSri Lanka\nSudan\nSuriname\nSvalbard\nSwaziland\nSweden\nSwitzerland\nSyria\nTaiwan\nTajikistan\nTanzania\nThailand\nTimor-Leste\nTogo\nTokelau\nTonga\nTrinidad and Tobago\nTromelin Island\nTunisia\nTurkey\nTurkmenistan\nTurks and Caicos Islands\nTuvalu\nUganda\nUkraine\nUnited Arab Emirates\nUnited Kingdom\nUnited States\nUruguay\nUzbekistan\nVanuatu\nVenezuela\nVietnam\nVirgin Islands\nWake Island\nWallis and Futuna\nWest Bank\nWestern Sahara\nYemen\nZambia\nZimbabwe","elementCost":{}}]};
if (typeof formData["label_font_family"] !== 'undefined') {
$("head").append("<link href='https://fonts.googleapis.com/css?family=" + formData["label_font_family"] + "' rel='stylesheet' type='text/css'>");
}
if (typeof formData["input_font_family"] !== 'undefined') {
$("head").append("<link href='https://fonts.googleapis.com/css?family=" + formData["input_font_family"] + "' rel='stylesheet' type='text/css'>");
}
var formElementCount = 0;
if((typeof formData['captcha_enable'] !== 'undefined') && (formData['captcha_enable'] == "yes")){
if((typeof formData['captcha_align'] !== 'undefined') && (formData['captcha_align'] == 'center')){
$('.form_generater_form_div .form_captcha_div').css("text-align", "center");
} else if((typeof formData['captcha_align'] !== 'undefined') && (formData['captcha_align'] == 'right')){
$('.form_generater_form_div .form_captcha_div').css("text-align", "right");
} else{
$('.form_generater_form_div .form_captcha_div').css("text-align", "left");
}
}
// Update language captcha
function updateGoogleCaptchaLanguage(selectedLanguage,selectorRecaptcha) {
// Get GoogleCaptcha iframe
var iframeGoogleCaptcha = $(selectorRecaptcha).find('iframe');
// Get language code from iframe
var language = iframeGoogleCaptcha.attr("src").match(/hl=(.*?)&/).pop();
// Get selected language code from drop down
// var selectedLanguage = $('#captcha_lang').val();
// Check if language code of element is not equal by selected language, we need to set new language code
if (language !== selectedLanguage) {
// For setting new language
iframeGoogleCaptcha.attr("src", iframeGoogleCaptcha.attr("src").replace(/hl=(.*?)&/, 'hl=' + selectedLanguage + '&'));
}
}
if((typeof formData['captcha_lang'] !== 'undefined')){
setTimeout(function(){
updateGoogleCaptchaLanguage(formData['captcha_lang'],'.form_captcha_div');
}, 200);
}
if(typeof formData['label_style'] !== 'undefined' && formData['label_style'] != 'blockLabels'){
$(".card_deails_div .form-group").each(function(index){
block_label = $(this).find('label').text();
$(this).find(':input').attr('placeholder', block_label);
$(this).find('label').css("display", "none");
});
}
iframe_resize('no', 'no', 'initial');
if(typeof formData['button_align'] !== 'undefined'){
if(formData['button_align'] == "leftBtn"){
$(".form_generater_form_div div.form_submit_div ").addClass('text-left').removeClass('text-center');
} else if(formData['button_align'] == "centerBtn"){
$(".form_generater_form_div div.form_submit_div ").addClass('text-center');
} else if(formData['button_align'] == "rightBtn"){
$(".form_generater_form_div .form_submit_div ").addClass('text-right').removeClass('text-center');
}
}
paymentDisplay();
$.each(formData['formElements'], function( index, value ) {
var type = value['type'];
var minDate = '';
var maxDate = '';
if(typeof value['minDate'] !== 'undefined'){
minDate = value['minDate'];
}
if(typeof value['maxDate'] !== 'undefined'){
maxDate = value['maxDate'];
}
if(type == "date"){
if(value['datetime'] == "time"){
$('#datetime_'+formElementCount).find(':input').datetimepicker({
format: 'LT',
ignoreReadonly: true,
allowInputToggle: true
});
} else if(value['datetime'] == "date") {
if((minDate != '') && (maxDate != '')){
$('#datetime_'+formElementCount).find(':input').datetimepicker({
format: 'MM/DD/YYYY',
minDate: minDate,
maxDate: maxDate,
ignoreReadonly: true,
allowInputToggle: true
});
} else if((minDate == '') && (maxDate == '')){
$('#datetime_'+formElementCount).find(':input').datetimepicker({
format: 'MM/DD/YYYY',
ignoreReadonly: true,
allowInputToggle: true
});
} else {
if((minDate != '')){
$('#datetime_'+formElementCount).find(':input').datetimepicker({
format: 'MM/DD/YYYY',
minDate: minDate,
ignoreReadonly: true,
allowInputToggle: true
});
} else if(maxDate != '') {
$('#datetime_'+formElementCount).find(':input').datetimepicker({
format: 'MM/DD/YYYY',
maxDate: maxDate,
ignoreReadonly: true,
allowInputToggle: true
});
}
}
} else {
if((minDate != '') && (maxDate != '')){
$('#datetime_'+formElementCount).find(':input').datetimepicker({
minDate: minDate,
maxDate: maxDate,
ignoreReadonly: true,
allowInputToggle: true
});
} else if((minDate == '') && (maxDate == '')){
$('#datetime_'+formElementCount).find(':input').datetimepicker({
ignoreReadonly: true,
allowInputToggle: true
});
} else {
if((minDate != '')){
$('#datetime_'+formElementCount).find(':input').datetimepicker({
minDate: minDate,
ignoreReadonly: true,
allowInputToggle: true
});
} else if(maxDate != '') {
$('#datetime_'+formElementCount).find(':input').datetimepicker({
maxDate: maxDate,
ignoreReadonly: true,
allowInputToggle: true
});
}
}
}
}
if(type == "newdate"){
if((minDate != '') && (maxDate != '')){
$('#newdate_'+formElementCount).find(':input').datetimepicker({
format: 'MM/DD/YYYY',
minDate: minDate,
maxDate: maxDate,
ignoreReadonly: true,
allowInputToggle: true
});
} else if((minDate == '') && (maxDate == '')){
$('#newdate_'+formElementCount).find(':input').datetimepicker({
format: 'MM/DD/YYYY',
ignoreReadonly: true,
allowInputToggle: true
});
} else {
if((minDate != '')){
$('#newdate_'+formElementCount).find(':input').datetimepicker({
format: 'MM/DD/YYYY',
minDate: minDate,
ignoreReadonly: true,
allowInputToggle: true
});
} else if(maxDate != '') {
$('#newdate_'+formElementCount).find(':input').datetimepicker({
format: 'MM/DD/YYYY',
maxDate: maxDate,
ignoreReadonly: true,
allowInputToggle: true
});
}
}
}
if(type == "time"){
$('#time_'+formElementCount).find(':input').datetimepicker({
format: 'LT',
ignoreReadonly: true,
allowInputToggle: true
});
}
if(formData['label_style'] != 'blockLabels'){
$(".formElement_"+formElementCount).each(function(index) {
if($(this).hasClass('dateTime') || $(this).hasClass('textfield') || $(this).hasClass('textarea') || $(this).hasClass('number') || $(this).hasClass('email') || $(this).hasClass('dateTime') || $(this).hasClass('newDate') || $(this).hasClass('Time')){
$(this).find('label').css("display", "none");
$(this).find(':input').attr("placeholder", $(this).find('label').text());
} else if($(this).hasClass('address')){
addressLabelChange('inlineLabels', formElementCount);
} else if($(this).hasClass('select')){
$(this).find('label').css("display", "none");
$(this).find('select > option:first-child').text($(this).find('label').text());
}
if($(this).hasClass('dateTime')){
$(this).find('label').css("display", "none");
$(this).find(':input').attr("placeholder", $(this).find('label').text());
}
});
} else {
elementHolder = '';
if(typeof value['placeholder'] !== 'undefined'){
elementHolder = value['placeholder'];
}
$(".formElement_"+formElementCount).each(function(index) {
if($(this).hasClass('textfield') || $(this).hasClass('textarea') || $(this).hasClass('number') || $(this).hasClass('email')){
$(this).find('label').css("display", "block");
$(this).find(':input').attr("placeholder", elementHolder);
} else if($(this).hasClass('address')){
addressLabelChange('blockLabels', formElementCount);
}
if($(this).hasClass('select')){
var elementHolder = (elementHolder == "") ? "Please Select" : elementHolder;
$(this).find('label').css("display", "block");
$(this).find('select > option:first-child').text(elementHolder);
}
});
}
formElementCount++;
});
$(document).on('click', '.alert_message .alert.alert-danger span', function(){
$(".alert_message").css("display", "none");
iframe_resize('no', 'no', 'error');
});
$('#stripePayment').change(function(){
paymentDisplay();
});
iframe_resize('no', 'no', 'initial');
$(document).on('click', '.form_submit_div .btn', function(e) {
e.preventDefault();
$('.form_submit_div .btn').prop('disabled',true);
$('.error').removeClass('error');
var captch_check = 1;
if(formData['captcha_enable'] == 'yes'){
var captcha_response = grecaptcha.getResponse();
if(captcha_response.length == 0){
captch_check = 0;
}
}
if(captch_check != 1){
$(".alert_message").html('<div class="alert alert-danger" role="alert"><button type="button" class="close" data-dismiss="alert" aria-label="Close"><span aria-hidden="true">×</span></button> '+ "Please provide valid captcha response" + '</div>').css("display", "block");
iframe_resize('yes', 'no', 'error');
$('.form_submit_div .btn').prop('disabled',false);
} else {
var validate = 1;
var confirmationMail = '';
var email_check = '';
var filters = [];
var validMessage = '';
$(".form_container div[class^='formElement']").each(function(){
if(!$(this).attr("id")){
if(formData['formElements'][$(this).data('count')]['required'] == 'yes'){
var required_message = " is required";
if($(this).hasClass('radio')){
if(!$(this).find("input:checked").val()){
validate = 0;
filters.push($(this).find(":input").attr('name') + required_message);
$("input[name='"+$(this).find('.block_label').text() +"']");
}
} else if($(this).hasClass('checkbox')){
if(!$(this).find(":input").is(':checked')){
validate = 0;
filters.push($(this).find(":input").attr('name') + required_message);
$(this).find(":input").addClass('error');
}
} else if($(this).hasClass('checkbox-multi')){
if($(this).find(".checkboxmulti_"+$(this).data('count')+":checkbox:checked").length <= 0){
validate = 0;
filters.push($(this).find(':input').attr('name') + required_message);
}
} else if($(this).hasClass('select')){
if($(this).find('select').val() == ''){
validate = 0;
filters.push($(this).find(":input").attr('name') + required_message);
$(this).find('select').addClass('error');
}
} else if($(this).hasClass('dateTime')){
if($(this).find(':input').val().trim() == ''){
validate = 0;
filters.push($(this).find(":input").attr('name') + required_message);
$(this).find(':input').addClass('error');
}
} else if($(this).hasClass('file')){
if(typeof fileuploaded["fileupload_"+$(this).data('count')] == 'undefined'){
validate = 0;
filters.push($(this).find(":input").attr('name') + required_message);
$(this).find('label').addClass('error');
}
if(typeof fileuploaded["fileupload_"+$(this).data('count')] !== 'undefined' && fileuploaded["fileupload_"+$(this).data('count')]['upload_type'] == 'multiple' && fileuploaded["fileupload_"+$(this).data('count')]['files'].length <= 0) {
validate = 0;
filters.push($(this).find(":input").attr('name') + required_message);
$(this).find('label').addClass('error');
}
} else if($(this).hasClass('image')){
if(typeof fileuploaded["imageupload_"+$(this).data('count')] == 'undefined'){
validate = 0;
filters.push($(this).find(":input").attr('name') + required_message);
$(this).find('label').addClass('error');
}
if(typeof fileuploaded["imageupload_"+$(this).data('count')] !== 'undefined' && fileuploaded["imageupload_"+$(this).data('count')]['upload_type'] == 'multiple' && fileuploaded["imageupload_"+$(this).data('count')]['images'].length <= 0) {
validate = 0;
filters.push($(this).find(":input").attr('name') + required_message);
$(this).find('label').addClass('error');
}
} else if($(this).hasClass('address')){
field_name = formData['formElements'][$(this).data('count')]['label'];
$(this).find(':input.required').each(function(){
if($(this).val().trim() == ''){
validate = 0;
sub_name = $(this).closest('.form-group').find('.block_label').text();
filters.push(field_name + ' - ' + sub_name + required_message);
$(this).addClass('error');
}
});
} else if($(this).hasClass('raw_html')){
//Don't Do anything, these are only for display
} else {
if($(this).find(':input').val().trim() == ''){
validate = 0;
filters.push($(this).find(":input").attr('name') + required_message);
$(this).find(':input').addClass('error');
}
}
}
if($(this).hasClass('email')){
if($(this).find(':input').val() != ""){
var cur_email_value = $(this).find(':input').val().toLowerCase();
if(!isEmail(cur_email_value)){
validate = 0;
filters.push("Provide valid email format");
validMessage = "Provide valid email format";
$(this).find(':input').addClass('error');
} else {
var blk_email = "";
if(blk_email != ''){
blocked_emails = blk_email.split(',');
$.each(blocked_emails, function( index, value ) {
cDom = value.trim();
var n = cur_email_value.endsWith("@" + cDom);
var m = cur_email_value.endsWith("." + cDom);
var last = cDom.substring(cDom.lastIndexOf("@") + 1, cDom.length);
if(n == true || m == true){
validate = 0;
validMessage = "This form does not accept addresses from " + last;
filters.push(validMessage);
}
});
}
if(email_check != ''){
email_check = email_check + ',' + cur_email_value;
} else {
email_check = cur_email_value;
}
email_check = cur_email_value;
if($(this).find(':input').hasClass('email_confirm')){
if(confirmationMail != ''){
confirmationMail = confirmationMail + ',' + cur_email_value;
} else {
confirmationMail = cur_email_value;
}
}
}
}
}
if($(this).find(':input').hasClass('url')){
if($(this).find(':input').val() != ""){
if(!validateUrl($(this).find(':input').val())){
validate = 0;
filters.push("Provide valid URL");
validMessage = "Provide valid URL";
$(this).find(':input').addClass('error');
}
}
}
if($(this).hasClass('number')){
var number_val = $(this).find(':input').val();
if(number_val != ""){
if(isNaN(parseInt(number_val))) {
validate = 0;
filters.push("Images allowed "+ $(this).find(':input').attr('name'));
validMessage = "Images allowed "+ $(this).find(':input').attr('name');
$(this).find(':input').addClass('error');
} else{
if(typeof formData['formElements'][$(this).data('count')]['maxNumber'] !== 'undefined'){
if(parseInt(number_val) > parseInt(formData['formElements'][$(this).data('count')]['maxNumber'])){
validate = 0;
validMessage = $(this).find(':input').attr('name') + " must be less than " + formData['formElements'][$(this).data('count')]['maxNumber'].toString();
filters.push($(this).find(':input').attr('name') + " must be less than " + formData['formElements'][$(this).data('count')]['maxNumber'].toString());
$(this).find(':input').addClass('error');
}
}
if(typeof formData['formElements'][$(this).data('count')]['minNumber'] !== 'undefined'){
if(parseInt(number_val) < parseInt(formData['formElements'][$(this).data('count')]['minNumber'])){
validate = 0;
validMessage = $(this).find(':input').attr('name') + " must be more than "+ formData['formElements'][$(this).data('count')]['minNumber'].toString();
filters.push($(this).find(':input').attr('name') + " must be more than "+ formData['formElements'][$(this).data('count')]['minNumber'].toString());
$(this).find(':input').addClass('error');
}
}
}
}
}
filters = $.unique(filters);
}
});
stripeToken = '';
if(validate != 1){
if(filters.length > 0){
$(".alert_message").html('<div class="alert alert-danger" role="alert"><button type="button" class="close" data-dismiss="alert" aria-label="Close"><span aria-hidden="true">×</span></button>'+filters.join('<br/>')+'</div>').css("display", "block");
} else if(validMessage != ''){
$(".alert_message").html('<div class="alert alert-danger" role="alert"><button type="button" class="close" data-dismiss="alert" aria-label="Close"><span aria-hidden="true">×</span></button>'+validMessage+'</div>').css("display", "block");
} else {
$(".alert_message").html('<div class="alert alert-danger" role="alert"><button type="button" class="close" data-dismiss="alert" aria-label="Close"><span aria-hidden="true">×</span>button> ' + "Please provide valid data" + ' </div>').css("display", "block");
}
$('html, body').animate({scrollTop: $('#wizard-validation-form').offset().top }, 'slow');
iframe_resize('yes', 'no', 'error');
$('.form_submit_div .btn').prop('disabled',false);
} else {
swal({
title: "<div class='loader' style='width:100px;height:100px;'></div> <h4> " + "Processing..." +" </h4>",
html: true,
showConfirmButton: false
});
iframe_resize('yes', 'no', 'success');
$('html, body').animate({scrollTop: $('#wizard-validation-form').offset().top }, 'slow');
var formResponse = {};
var additional_price = 0.00;
$(".form_container div[class^='formElement']").each(function(){
if((!$(this).attr("id")) && (!$(this).hasClass('label')) && (!$(this).hasClass('lineBreak')) && (!$(this).hasClass('space'))){
eCount = $(this).data('count');
fElement = formData['formElements'][eCount];
if($(this).hasClass('radio')){
submit_value = $(this).find("input:checked").val();
} else if($(this).hasClass('checkbox')){
if(!$(this).find("input").is(':checked')){
submit_value = "Off";
} else {
submit_value = "On";
}
} else if($(this).hasClass('checkbox-multi')){
var checkValues = [];
$.each($("input[name='"+fElement['label']+"']:checked"), function(){
checkValues.push($(this).val());
});
submit_value = checkValues.join(", ");
} else if($(this).hasClass('select')){
submit_value = $(this).find('select').val();
} else if($(this).hasClass('dateTime')){
submit_value = $(this).find(':input').val();
} else if($(this).hasClass('file')){
if(typeof fileuploaded["fileupload_"+eCount] !== 'undefined'){
if(fileuploaded["fileupload_"+eCount]['upload_type'] == 'multiple'){
formResponse[formData['formElements'][eCount]['label']] = fileuploaded["fileupload_"+eCount];
} else {
formResponse[formData['formElements'][eCount]['label']] = fileuploaded["fileupload_"+eCount];
}
} else {
formResponse[formData['formElements'][eCount]['label']] = '';
}
} else if($(this).hasClass('image')){
if(typeof fileuploaded["imageupload_"+eCount] !== 'undefined'){
if(fileuploaded["imageupload_"+eCount]['upload_type'] == 'multiple'){
formResponse[formData['formElements'][eCount]['label']] = fileuploaded["imageupload_"+eCount];
} else {
formResponse[formData['formElements'][eCount]['label']] = fileuploaded["imageupload_"+eCount];
}
} else {
formResponse[formData['formElements'][eCount]['label']] = '';
}
} else if($(this).hasClass('address')){
var address_array = $(this).find(':input').map(function(){
var obj = {};
obj[ this.name ] = $(this).val();
return obj;
}).get();
formResponse[fElement['label']] = address_array;
} else {
submit_value = $(this).find(':input').val();
}
if(typeof submit_value !== 'undefined'){
if(typeof formResponse[fElement['label']] !== 'undefined'){
fsArr = formResponse[fElement['label']];
if($.isArray(fsArr)){
fsArr.push(submit_value);
} else {
old_value = formResponse[fElement['label']];
formResponse[fElement['label']] = [old_value];
formResponse[fElement['label']].push(submit_value);
}
} else {
formResponse[formData['formElements'][eCount]['label']] = submit_value;
}
}
submit_value = undefined;
}
});
var payment_details = {};
var formResponseCount = 2;
/*$.each(formResponse, function(index, value) {
if(jQuery.type( value ) === "object"){
console.log(value, value.size());
} else {
if(value != 'undefined' && value.trim() != ''){
formResponseCount++;
}
}
})*/
if(formResponseCount <= 0){
swal.close();
$("#formGeneratorForm input, #formGeneratorForm textarea").first().focus();
$('.form_submit_div .btn').prop('disabled',false);
iframe_resize('yes', 'no', 'error');
return false;
} else {
$.ajax({
type:"POST",
url: "/ajaxcall/formresponse",
data: { form_uuid: "3Qe0lWb-kak2T1yNyLscsw", formResponse: JSON.stringify(formResponse), confirmationMail: confirmationMail, payment_details: payment_details, is_pro: "false" },
success:function(data){
swal.close();
$('.error').removeClass('error');
// $('html, body').animate({ scrollTop: $('#wizard-validation-form').offset().top }, 'slow');
$('span.fileres').text('');
$('#stripeToken').val('');
if(typeof data.charge_failed !== 'undefined'){
$(".alert_message").html('<div class="alert alert-danger" role="alert"><button type="button" class="close" data-dismiss="alert" aria-label="Close"><span aria-hidden="true">×</span></button>'+ data.message +'</div>').css("display", "block");
$('.form_submit_div .btn').prop('disabled',false);
} else {
window.onbeforeunload = null;
if ( window.location !== window.parent.location ) {
if(formData['after_submit'] == 'clearAndPrevent'){
$(".alert_message").html('<div class="alert alert-success" role="alert"><button type="button" class="close" data-dismiss="alert" aria-label="Close"><span aria-hidden="true">×</span></button>'+"Thank you! The form was submitted successfully."+'</div>').css("display", "block");
iframe_resize('no', 'no', 'success');
$(".alert_message .alert").fadeOut(5000, function(){
$(this).remove();
$(".alert_message").css("display", "none");
iframe_resize('yes', 'no', 'success');
});
$('#formGeneratorForm')[0].reset();
$('.form_submit_div .btn').prop('disabled',true);
iframe_resize('yes', 'no', 'success');
} else if(formData['after_submit'] == 'clearAndAllow'){
var rlurl = document.URL+'&form_sbmt=yes';
window.location.replace(rlurl);
} else if(formData['after_submit'] == 'redirect'){
if(typeof formData['after_submit_url'] !== 'undefined'){
if(typeof formData['openinnewtab'] !== 'undefined' && formData['openinnewtab'] == 'yes'){
var redirectURL = formData['after_submit_url'];
if(redirectURL == ''){
location.reload();
} else{
window.open(redirectURL, '_blank');
$(".formContainer").css("display", "none");
$(".formContainer").html('');
$(".after_form_submit .form_generater_form_div").html(formData['after_submit_msg']);
$(".after_form_submit").css("display", "block");
iframe_resize('yes', 'no', 'success');
}
} else {
var redirectURL = formData['after_submit_url'];
if(redirectURL == ''){
location.reload();
} else{
window.top.location.href = redirectURL;
}
}
} else{
location.reload();
}
} else if(formData['after_submit'] == 'hideAndmessage'){
$(".formContainer").css("display", "none");
$(".formContainer").html('');
$(".after_form_submit .form_generater_form_div").html(formData['after_submit_msg']);
$(".after_form_submit").css("display", "block");
iframe_resize('yes', 'no', 'success');
} else if(formData['after_submit'] == 'responses'){
var formResponse = jQuery.parseJSON(data['user_response']);
var htmlrender = '<style type="text/css">.after_form_submit .form_generater_form_div table{border: 1px solid #ccc;}'+
'.after_form_submit .form_generater_form_div tr{ border-bottom: 1px solid #ccc; }'+
'.after_form_submit .form_generater_form_div tr:nth-child(2n) { background: #ededed; }'+
'.after_form_submit .form_generater_form_div td {padding: 6px 5px; }'+
'</style>'+
'<h3> ' + "Your response" + ' </h3>'+
'<table class="question_content" style="background-color: #fdfdfd;" cellpadding="15" border="1" cellspacing="0" width="100%" border-collapse="collapse">';
$.each(formResponse, function(index, value){
htmlrender = htmlrender + '<tr><td><b>'+index+'</b></td><td>';
if(typeof value != 'string') {
if(value['type'] == 'image'){
if(value['upload_type'] == "multiple"){
$.each(value['images'], function(im_index, im_value){
htmlrender = htmlrender + '<a href="'+ im_value["url"]+'" target="_blank"><img src="'+ im_value["url"]+'" alt="'+index+'" width="150"></a>';
});
} else {
htmlrender = htmlrender + '<a href="'+ value["url"]+'" target="_blank"><img src="'+ value["url"]+'" alt="'+index+'" width="150" alt="image"></a>';
}
} else if(value['type'] == 'file'){
if(value['upload_type'] == "multiple"){
$.each(value['files'], function(im_index, im_value){
htmlrender = htmlrender + '<br/><a href="'+ im_value["url"]+'" target="_blank" style="margin-bottom: 10px;"> ' + "Download file" + '</a>';
});
} else {
htmlrender = htmlrender + '<a href="'+ value["url"]+'" target="_blank">' + "Download file" + '</a>';
}
} else if(typeof value["url"] !== 'undefined'){
htmlrender = htmlrender + ' <a href="'+ value["url"]+'" class="btn btn-default" target="_blank">' + "Download file" + '</a>';
} else {
$.each(value, function(index, address_value){
$.each(address_value, function(im_index, im_value){
if(im_value.trim() != ''){
htmlrender = htmlrender + im_index + ': ' + im_value + '</br>';
}
});
});
}
} else {
htmlrender = htmlrender + ' ' +value.toString();
}
htmlrender = htmlrender + '</td></tr>';
});
htmlrender = htmlrender + '</table>';
$(".formContainer").css("display", "none");
$(".formContainer").html('');
$(".after_form_submit .form_generater_form_div").html(htmlrender);
$(".after_form_submit").css("display", "block");
iframe_resize('yes', 'no', 'success');
}
} else {
if(formData['after_submit'] == 'clearAndPrevent' || formData['after_submit'] == 'redirect'){
$(".alert_message").html('<div class="alert alert-success" role="alert"><button type="button" class="close" data-dismiss="alert" aria-label="Close"><span aria-hidden="true">×</span></button>'+"Thank you! The form was submitted successfully."+'</div>').css("display", "block");
iframe_resize('no', 'no', 'success');
$(".alert_message .alert").fadeOut(5000, function(){
$(this).remove();
$(".alert_message").css("display", "none");
iframe_resize('yes', 'no', 'success');
});
$('#formGeneratorForm')[0].reset();
$('.form_submit_div .btn').prop('disabled',true);
iframe_resize('yes', 'no', 'success');
} else if(formData['after_submit'] == 'clearAndAllow'){
var rlurl = document.URL+'&form_sbmt=yes';
window.location.replace(rlurl);
$('.form_submit_div .btn').prop('disabled',false);
iframe_resize('yes', 'no', 'success');
} else if(formData['after_submit'] == 'hideAndmessage'){
$(".formContainer").css("display", "none");
$(".formContainer").html('');
$(".after_form_submit .form_generater_form_div").html(formData['after_submit_msg']);
$(".after_form_submit").css("display", "block");
iframe_resize('yes', 'no', 'success');
} else if(formData['after_submit'] == 'responses'){
var formResponse = jQuery.parseJSON(data['user_response']);
var htmlrender = '<style type="text/css">.after_form_submit .form_generater_form_div table{border: 1px solid #ccc;}'+
'.after_form_submit .form_generater_form_div tr{ border-bottom: 1px solid #ccc; }'+
'.after_form_submit .form_generater_form_div tr:nth-child(2n) { background: #ededed; }'+
'.after_form_submit .form_generater_form_div td {padding: 6px 5px; }'+
'</style>'+
'<h3> ' + "Your response" + ' </h3>'+
'<table class="question_content" style="background-color: #fdfdfd;" cellpadding="15" border="1" cellspacing="0" width="100%" border-collapse="collapse">';
$.each(formResponse, function(index, value){
htmlrender = htmlrender + '<tr><td><b>'+index+'</b></td><td>';
if(typeof value != 'string') {
if(value['type'] == 'image'){
if(value['upload_type'] == "multiple"){
$.each(value['images'], function(im_index, im_value){
htmlrender = htmlrender + '<a href="'+ im_value["url"]+'" target="_blank"><img src="'+ im_value["url"]+'" alt="'+index+'" width="150"></a>';
});
} else {
htmlrender = htmlrender + '<a href="'+ value["url"]+'" target="_blank"><img src="'+ value["url"]+'" alt="'+index+'" width="150"></a>';
}
} else if(typeof value["url"] !== 'undefined'){
htmlrender = htmlrender + ' <a href="'+ value["url"]+'" class="btn btn-default" target="_blank">' + "Download file" + '</a>';
} else {
$.each(value, function(index, address_value){
$.each(address_value, function(im_index, im_value){
if(im_value.trim() != ''){
htmlrender = htmlrender + im_index + ': ' + im_value + '</br>';
}
});
});
}
} else {
htmlrender = htmlrender + ' ' +value.toString();
}
htmlrender = htmlrender + '</td></tr>';
});
htmlrender = htmlrender + '</table>';
$(".formContainer").css("display", "none");
$(".formContainer").html('');
$(".after_form_submit .form_generater_form_div").html(htmlrender);
$(".after_form_submit").css("display", "block");
iframe_resize('yes', 'no', 'success');
}
}
var fileuploaded = {};
var htmlrender = '';
var formResponse = {};
}
},
error:function(data){
swal.close();
$(".alert_message").html('<div class="alert alert-danger" role="alert"><button type="button" class="close" data-dismiss="alert" aria-label="Close"><span aria-hidden="true">×</span></button>'+ "Error occur.Please try again after sometime." +'</div>').css("display", "block");
$('.form_submit_div .btn').prop('disabled',false);
iframe_resize('yes', 'no', 'error');
}
});
}
}
}
return false;
});
function isEmail(email) {
var regex = /^([a-zA-Z0-9_.+-])+\@(([a-zA-Z0-9-])+\.)+([a-zA-Z0-9]{2,4})+$/;
return regex.test(email);
}
function validateUrl(url) {
var urlregex = new RegExp("^(http:\/\/|https:\/\/|www.){1}([0-9A-Za-z]+\.)");
return urlregex.test(url);
}
var fileuploaded = {};
$('.dropdown-toggle').dropdown();
var width = $(window).width();
$(window).resize(function(){
if($(this).width() != width){
width = $(this).width();
iframe_resize('no', 'no', 'initial');
}
scaleCaptcha();
});
scaleCaptcha();
function scaleCaptcha(elementWidth) {
if ($(window).width() < 420) {
var reCaptchaWidth = 304;
var containerWidth = $('.form_captcha_div').width();
if (reCaptchaWidth > containerWidth) {
var captchaScale = containerWidth / reCaptchaWidth;
$('.g-recaptcha').css({
'transform': 'scale(' + captchaScale + ')',
'transform-origin': '0 0',
'-ms-transform-origin': '0 0',
' -webkit-transform-origin': '0 0'
});
} else {
$('.g-recaptcha').css({
'transform': 'scale(1)'
});
}
} else {
$('.g-recaptcha').css({
'transform': 'scale(1)'
});
}
}
$(document).on('click', '#formGeneratorForm .form_generater_form_div a[target!="_parent"]', function(e){
e.preventDefault();
var redirectURL = $(this).attr('href');
window.open(redirectURL, '_blank');
});
$('[data-toggle="tooltip"]').tooltip();
$('.paymentCount :input').change(function(){
paymentDisplay();
return false;
});
function paymentDisplay(){
var selected_price = payment_calculation(),
display_price = 'no',
currency_select = '$';
if((typeof formData['payment_integration'] != 'undefined') && (typeof formData['payment_integration']['payment_currency_symbol'] != 'undefined')){
currency_select = formData['payment_integration']['payment_currency_symbol'];
}
if((typeof formData['payment_integration'] != 'undefined') && (typeof formData['payment_integration']['show_price'] != 'undefined')){
display_price = formData['payment_integration']['show_price'];
}
if (!isNaN(selected_price)) {
if(display_price == 'yes'){
$('.form_submit_div span.price').text('(' +currency_select + '' + selected_price + ')');
} else {
$('.form_submit_div span.price').text('');
}
}
}
function conditionalHide(division_id){
if($("."+division_id).hasClass('checkbox-multi')){
$("."+division_id + ' input[type=checkbox]').prop( "checked", false).trigger('change');
} else if($("."+division_id).hasClass('checkbox')){
$("."+division_id + ' input[type=checkbox]').prop( "checked", false).trigger('change');
} else if($("."+division_id).hasClass('radio')){
$("."+division_id + ' input[type=radio]').removeAttr('checked').trigger('change');
} else if($("."+division_id).hasClass('select')){
$("."+division_id + ' select').val('').trigger('change');
}
}
function addressLabelChange(label_style, formElementCount){
if(label_style == 'inlineLabels'){
$('.formElement_'+formElementCount+' :input').each(function(){
$(this).closest('.form-group').find('label').css("display", 'none');
ship_label = $(this).closest('.form-group').find('label').text();
if(ship_label == 'Country'){
$(this).find('option:first-child').text(ship_label);
} else{
$(this).attr('placeholder', ship_label);
}
});
} else {
$('.formElement_'+formElementCount+' :input').each(function(){
$(this).closest('.form-group').find('label').css("display", 'block');
ship_label = $(this).closest('.form-group').find('label').text();
if(ship_label == 'Country'){
$(this).find('option:first-child').text('- Country -');
} else{
$(this).attr('placeholder', '');
}
});
}
}
$('.payment_element').change(function(){
var value_filled = 1;
$(".payment_element").each(function(index) {
if($(this).val().trim() == ''){
value_filled = 0;
}
});
if(value_filled == 1){
swal({
title: "<div class='loader' style='width:100px;height:100px;'></div> <h4> " + "Processing..." +" </h4>",
html: true,
showConfirmButton: false
});
Stripe.card.createToken($('#formGeneratorForm'), stripeResponseHandler);
}
});
function payment_calculation(){
var additional_price = 0.00;
$(".form_container div[class^='formElement']").each(function(){
if((!$(this).attr("id")) && ($(this).hasClass('radio') || $(this).hasClass('checkbox-multi') || $(this).hasClass('select'))){
eCount = $(this).data('count');
if($(this).hasClass('radio')){
var select_value = $(this).find("input:checked").val();
if(typeof formData['formElements'][eCount]['elementCost'] !== 'undefined' && typeof formData['formElements'][eCount]['elementCost'][select_value] !== 'undefined'){
additional_price += parseFloat(formData['formElements'][eCount]['elementCost'][select_value]);
}
} else if($(this).hasClass('checkbox-multi')){
$.each($("input[name='"+formData['formElements'][eCount]['label']+"']:checked"), function(){
if(typeof formData['formElements'][eCount]['elementCost'] !== 'undefined' && typeof formData['formElements'][eCount]['elementCost'][$(this).val()] != 'undefined'){
additional_price += parseFloat(formData['formElements'][eCount]['elementCost'][$(this).val()]);
}
});
} else if($(this).hasClass('select')){
var select_value = $(this).find('select').val();
if(typeof formData['formElements'][eCount]['elementCost'] !== 'undefined' && typeof formData['formElements'][eCount]['elementCost'][select_value] != 'undefined'){
additional_price += parseFloat(formData['formElements'][eCount]['elementCost'][select_value]);
}
}
}
});
var stripePayment = 0.00;
if(typeof formData['payment_integration'] !== 'undefined' && typeof formData['payment_integration']['payment_cost'] !== 'undefined'){
stripePayment = parseFloat(formData['payment_integration']['payment_cost']);
if(typeof formData['payment_integration']['price_change'] !== 'undefined' && formData['payment_integration']['price_change'] == 'yes' ){
if (typeof $('#stripePayment').val() !== 'undefined'){
stripePayment = parseFloat($('#stripePayment').val());
}
}
}
var combined_payment = stripePayment + additional_price;
return combined_payment.toFixed(2);
}
window.onbeforeunload = function() {
$.each(fileuploaded,function(i,val){
$.each(val,function(img,img_val){
if(img == 'id'){
$.ajax({
url: '/ajaxcall/imagedelete',
data: {image_id: val.id },
success: function(data){
}
});
}
if(img == 'images' || img == 'files'){
$.each(img_val,function(img_arr_i,img_arr_val){
image_id = img_arr_val.id;
$.ajax({
url: '/ajaxcall/imagedelete',
data: {image_id: image_id },
success: function(data){
}
});
});
}
});
});
};
/****************** Add More Element Logic ******************/
$(document).on('click , dblclick', '.add_new', function(e) {
curele = $(this).attr('data-elementcount');
ele_len = $(this).closest('.add_more_element').find('.form-group').length;
if(ele_len == 1){
$('.formElement_'+curele+':first').prepend('<span class="field-close" data-elementcount="'+curele+'"></span>')
}
duplicate_html = $('.formElement_'+curele+':first').clone();
$(this).closest('.add_more_element').find('.element_holder').append(duplicate_html).html();
iframe_resize('no', 'no', 'initial');
});
$(document).on('click', '.add_more_element .field-close', function(){
ele_len = $(this).closest('.element_holder').find('.form-group').length;
curele = $(this).attr('data-elementcount');
if(ele_len > 1){
$(this).closest('.form-group').remove();
}
if(ele_len == 2){
$('.formElement_'+curele+':first').find('.field-close').remove();
}
iframe_resize('no', 'no', 'initial');
});
iframe_resize('no', 'no', 'initial');
// if((typeof formData['captcha_lang'] !== 'undefined')){
// window.innerWidth = 512;
// setTimeout(function(){
// updateGoogleCaptchaLanguage(formData['captcha_lang'],'.form_captcha_div');
// }, 200);
// }
});
function iframe_resize(scrVal, scrl_bottom, scroll_action){
var scroll_to = false;
if(scrVal == 'yes'){
scroll_to = true;
}
if(scroll_action == 'error'){
}
if(scroll_action == 'success'){
}
if ( window.location !== window.parent.location ) {
var parenturl = (window.location != window.parent.location) ? document.referrer : document.location;
var urlArray = document.referrer.split('/');
if(urlArray.count > 3){
urlArray.pop();
urlArray.pop();
}
var url = urlArray.join('/');
var body = document.body,
height = Math.max(body.offsetHeight, body.scrollHeight);
if (parent.postMessage) {
parent.postMessage({formid: "3Qe0lWb-kak2T1yNyLscsw", height: height + 30, scroll_to: scroll_to, scrl_bottom: scrl_bottom }, url);
}
} else {
if(scroll_to){
$('html, body').animate({ scrollTop: $('#wizard-validation-form').offset().top }, 'slow');
}
}
}
function onSubmit(token) {
if (window.innerWidth < 1200 ) {
var destElementOffset = window.innerWidth;
iframe_resize('yes', 'yes', 'error')
}
}
// Update language captcha
// function updateGoogleCaptchaLanguage(selectedLanguage,selectorRecaptcha) {
// // Get GoogleCaptcha iframe
// var iframeGoogleCaptcha = $(selectorRecaptcha).find('iframe');
// // Get language code from iframe
// var language = iframeGoogleCaptcha.attr("src").match(/hl=(.*?)&/).pop();
// // Get selected language code from drop down
// // var selectedLanguage = $('#captcha_lang').val();
// // Check if language code of element is not equal by selected language, we need to set new language code
// if (language !== selectedLanguage) {
// // For setting new language
// iframeGoogleCaptcha.attr("src", iframeGoogleCaptcha.attr("src").replace(/hl=(.*?)&/, 'hl=' + selectedLanguage + '&'));
// }
// }
</script>
<style id="advance_css_text">
.sweet-alert[data-has-confirm-button=false][data-has-cancel-button=false] {
padding-bottom: 17px;
}
</style>
</body></html><html><head>
<title>TRAPO® CAR MATS AGENTS</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta content="width=device-width, initial-scale=1.0" name="viewport">
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=0">
<link rel="stylesheet" href="https://formbuilder.hulkapps.com/corepage/css/bootstrap.css">
<link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/sweetalert/1.1.3/sweetalert.min.css">
<link rel="stylesheet" href="//maxcdn.bootstrapcdn.com/font-awesome/4.3.0/css/font-awesome.min.css">
<link rel="stylesheet" href="https://formbuilder.hulkapps.com/corepage/css/bootstrap-datetimepicker.css">
<link rel="stylesheet" href="https://formbuilder.hulkapps.com/corepage/css/styles.css">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.6.3/css/font-awesome.min.css">
<script type="text/javascript" async="" src="https://www.gstatic.com/recaptcha/releases/JPZ52lNx97aD96bjM7KaA0bo/recaptcha__en.js"></script><script type="text/javascript" src="https://formbuilder.hulkapps.com/corepage/js/jquery.min.js"></script>
<script type="text/javascript" src="https://formbuilder.hulkapps.com/corepage/js/bootstrap.min.js"></script>
<script type="text/javascript" src="https://formbuilder.hulkapps.com/corepage/js/moment-with-locales.js"></script>
<script type="text/javascript" src="https://formbuilder.hulkapps.com/corepage/js/bootstrap-datetimepicker.js"></script>
<script type="text/javascript" src="//cdnjs.cloudflare.com/ajax/libs/sweetalert/1.1.3/sweetalert-dev.min.js"></script>
<script async="" type="text/javascript" src="https://www.google.com/recaptcha/api.js" defer=""></script>
<style id="form_builder_css">
.sa-confirm-button-container .confirm {
background-color: #f27474 !important
}
.rc-image-tile-wrapper{transition: auto !important}
.form_generater_form_div{
background: transparent;
max-width: 600px;
border: solid;
border-width: 2px;
border-color: #c7c7c7;
border-radius: 1px;
padding: 35px;
}
input,textarea, select, .image label, .file label, .form-control[disabled], .form-control[readonly] {
background: #fff;
border-radius: 2px;
border: 1px solid #ccc;
}
input:focus, textarea:focus, select:focus, .image label:focus, .file label:focus {
background: #fff;
border: 1px solid #ccc;
}
input, textarea, select, .checkbox-inline label, .checkbox-inline input[type="checkbox"] + label, .radio-inline label, .radio-inline input[type="radio"] + label, .image label,.file label{
color: #333333;
font-size: 12px;
}
.image label, .file label{
line-height: inherit;
}
div.form_submit_div button, div.form_submit_div button:hover{
color : #fff !important;
background: #333333 !important;
border-radius: 2px;
width: 100%;
font-size: 16px;
border:1px solid #333333;
}
.block_label {
color: #333333;
font-size: 14px;
}
input:-moz-placeholder {
color: #333333;
}
input::-webkit-input-placeholder {
color: #333333;
}
.radio, .checkbox-multi, .checkbox {
margin-top: 0px; margin-bottom: 10px;
}
input[type="checkbox"] + label span,input[type="radio"] + label span {
background: #fff;
border: 1px solid #ccc;
border-radius: 2px;
}
input[type="radio"]:checked + label span,input[type="checkbox"]:checked + label span {
background: #333333;
}
input[type="radio"]:checked + label span:after,input[type="checkbox"]:checked + label span:after{
color: #fff;
font-size: 14px;
}
.form_container input[type="radio"] + label span {
border-radius: 50%;
}
.infoMessage, .fileres {
color: #333333;
font-size: 14px;
}
::-webkit-input-placeholder{ color: #333333; }
:-moz-placeholder{color: #333333; }
::-moz-placeholder{color: #333333; }
:-ms-input-placeholder{color: #333333; }
fileres{
text-transform: capitalize;
}
</style>
</head>
<body>
<div id="wizard-validation-form">
<div class="formContainer">
<form action="#" method="post" id="formGeneratorForm">
<div class="form_generater_form_div">
<div class="row">
<div class="col-md-12 clearfix">
<div class="form_title_div"></div>
</div>
<div class="col-md-12 clearfix">
<div class="alert_message" style="display: block;"><div class="alert alert-danger" role="alert"><button type="button" class="close" data-dismiss="alert" aria-label="Close"><span aria-hidden="true">×</span></button>Email is required<br>Phone Number is required<br>Company Name is required<br>Message is required</div></div>
</div>
<div class="col-md-12 form_element clearfix">
<div class="row form_container">
<div class="formElement_0 form-group fadeMe text clearfix col-sm-6 select paymentCount" data-count="0"><label class="fitText block_label" for="form_input_0" style="display: block;">Type</label><select name="Type" class="form-control input0" id="form_input_0"><option value=""> Please Select </option><option value="TRAPO AGENT"> TRAPO AGENT </option><option value="TRAPO PARTNER"> TRAPO PARTNER </option></select> </div>
<div class="formElement_1 form-group fadeMe text clearfix col-sm-6 textfield paymentCount" data-count="1"><label class="fitText block_label" for="form_input_1" style="display: block;">First Name</label><input class="form-control " name="First Name" id="form_input_1" type="text" placeholder=""> </div>
<div class="formElement_2 form-group fadeMe text clearfix col-sm-6 textfield paymentCount" data-count="2"><label class="fitText block_label" for="form_input_2" style="display: block;">Last Name</label><input class="form-control" name="Last Name" id="form_input_2" type="text" placeholder=""> </div>
<div class="formElement_3 form-group fadeMe text clearfix col-sm-6 email paymentCount" data-count="3"><label class="fitText block_label" style="display: block;">Email*</label><input class="form-control required email_confirm error" id="form_input_3" name="Email" type="email" placeholder=""> </div>
<div class="formElement_4 form-group fadeMe text clearfix col-sm-6 textfield paymentCount" data-count="4"><label class="fitText block_label" style="display: block;">Phone Number*</label><input class="form-control required error" name="Phone Number" id="form_input_4" type="text" placeholder=""> </div>
<div class="formElement_5 form-group fadeMe text clearfix col-sm-6 textfield paymentCount" data-count="5"><label class="fitText block_label" style="display: block;">Company Name*</label><input class="form-control required error" name="Company Name" id="form_input_5" type="text" placeholder=""> </div>
<div class="formElement_6 form-group fadeMe text clearfix col-sm-6 textfield paymentCount" data-count="6"><label class="fitText block_label" for="form_input_6" style="display: block;">Website</label><input class="form-control" name="Website" id="form_input_6" type="text" placeholder=""> </div>
<div class="formElement_7 form-group fadeMe text clearfix col-sm-12 textarea paymentCount" data-count="7"><label class="fitText block_label" style="display: block;">Message*</label><textarea class="form-control required error" id="form_input_7" name="Message" data-max="250" data-limiting="false" style="height: 50px" placeholder=""></textarea> </div>
<div class="formElement_8 form-group fadeMe text clearfix col-sm-12 textfield paymentCount" data-count="8"><label class="fitText block_label" for="form_input_8" style="display: block;">Street Address</label><input class="form-control" name="Street Address" id="form_input_8" type="text" placeholder=""> </div>
<div class="formElement_9 form-group fadeMe text clearfix col-sm-12 textfield paymentCount" data-count="9"><label class="fitText block_label" for="form_input_9" style="display: block;">Address Line 2</label><input class="form-control" name="Address Line 2" id="form_input_9" type="text" placeholder=""> </div>
<div class="formElement_10 form-group fadeMe text clearfix col-sm-6 textfield paymentCount" data-count="10"><label class="fitText block_label" for="form_input_10" style="display: block;">City</label><input class="form-control" name="City" id="form_input_10" type="text" placeholder=""> </div>
<div class="formElement_11 form-group fadeMe text clearfix col-sm-6 textfield paymentCount" data-count="11"><label class="fitText block_label" for="form_input_11" style="display: block;">State/Province/Region</label><input class="form-control" name="State/Province/Region" id="form_input_11" type="text" placeholder=""> </div>
<div class="formElement_12 form-group fadeMe text clearfix col-sm-6 textfield paymentCount" data-count="12"><label class="fitText block_label" for="form_input_12" style="display: block;">ZIP/Postal Code</label><input class="form-control" name="ZIP/Postal Code" id="form_input_12" type="text" placeholder=""> </div>
<div class="formElement_13 form-group fadeMe text clearfix col-sm-6 select paymentCount" data-count="13"><label class="fitText block_label" for="form_input_13" style="display: block;">Country</label><select name="Country" class="form-control input13" id="form_input_13"><option value=""> Please Select </option><option value="Afghanistan"> Afghanistan </option><option value="Akrotiri"> Akrotiri </option><option value="Albania"> Albania </option><option value="Algeria"> Algeria </option><option value="American Samoa"> American Samoa </option><option value="Andorra"> Andorra </option><option value="Angola"> Angola </option><option value="Anguilla"> Anguilla </option><option value="Antarctica"> Antarctica </option><option value="Antigua and Barbuda"> Antigua and Barbuda </option><option value="Argentina"> Argentina </option><option value="Armenia"> Armenia </option><option value="Aruba"> Aruba </option><option value="Ashmore and Cartier Islands"> Ashmore and Cartier Islands </option><option value="Australia"> Australia </option><option value="Austria"> Austria </option><option value="Azerbaijan"> Azerbaijan </option><option value="Bahamas, The"> Bahamas, The </option><option value="Bahrain"> Bahrain </option><option value="Bangladesh"> Bangladesh </option><option value="Barbados"> Barbados </option><option value="Bassas da India"> Bassas da India </option><option value="Belarus"> Belarus </option><option value="Belgium"> Belgium </option><option value="Belize"> Belize </option><option value="Benin"> Benin </option><option value="Bermuda"> Bermuda </option><option value="Bhutan"> Bhutan </option><option value="Bolivia"> Bolivia </option><option value="Bosnia and Herzegovina"> Bosnia and Herzegovina </option><option value="Botswana"> Botswana </option><option value="Bouvet Island"> Bouvet Island </option><option value="Brazil"> Brazil </option><option value="British Indian Ocean Territory"> British Indian Ocean Territory </option><option value="British Virgin Islands"> British Virgin Islands </option><option value="Brunei"> Brunei </option><option value="Bulgaria"> Bulgaria </option><option value="Burkina Faso"> Burkina Faso </option><option value="Burma"> Burma </option><option value="Burundi"> Burundi </option><option value="Cambodia"> Cambodia </option><option value="Cameroon"> Cameroon </option><option value="Canada"> Canada </option><option value="Cape Verde"> Cape Verde </option><option value="Cayman Islands"> Cayman Islands </option><option value="Central African Republic"> Central African Republic </option><option value="Chad"> Chad </option><option value="Chile"> Chile </option><option value="China"> China </option><option value="Christmas Island"> Christmas Island </option><option value="Clipperton Island"> Clipperton Island </option><option value="Cocos (Keeling) Islands"> Cocos (Keeling) Islands </option><option value="Colombia"> Colombia </option><option value="Comoros"> Comoros </option><option value="Congo, Democratic Republic of the"> Congo, Democratic Republic of the </option><option value="Congo, Republic of the"> Congo, Republic of the </option><option value="Cook Islands"> Cook Islands </option><option value="Coral Sea Islands"> Coral Sea Islands </option><option value="Costa Rica"> Costa Rica </option><option value="Cote dIvoire"> Cote dIvoire </option><option value="Croatia"> Croatia </option><option value="Cuba"> Cuba </option><option value="Cyprus"> Cyprus </option><option value="Czech Republic"> Czech Republic </option><option value="Denmark"> Denmark </option><option value="Dhekelia"> Dhekelia </option><option value="Djibouti"> Djibouti </option><option value="Dominica"> Dominica </option><option value="Dominican Republic"> Dominican Republic </option><option value="Ecuador"> Ecuador </option><option value="Egypt"> Egypt </option><option value="El Salvador"> El Salvador </option><option value="Equatorial Guinea"> Equatorial Guinea </option><option value="Eritrea"> Eritrea </option><option value="Estonia"> Estonia </option><option value="Ethiopia"> Ethiopia </option><option value="Europa Island"> Europa Island </option><option value="Falkland Islands (Islas Malvinas)"> Falkland Islands (Islas Malvinas) </option><option value="Faroe Islands"> Faroe Islands </option><option value="Fiji"> Fiji </option><option value="Finland"> Finland </option><option value="France"> France </option><option value="French Guiana"> French Guiana </option><option value="French Polynesia"> French Polynesia </option><option value="French Southern and Antarctic Lands"> French Southern and Antarctic Lands </option><option value="Gabon"> Gabon </option><option value="Gambia, The"> Gambia, The </option><option value="Gaza Strip"> Gaza Strip </option><option value="Georgia"> Georgia </option><option value="Germany"> Germany </option><option value="Ghana"> Ghana </option><option value="Gibraltar"> Gibraltar </option><option value="Glorioso Islands"> Glorioso Islands </option><option value="Greece"> Greece </option><option value="Greenland"> Greenland </option><option value="Grenada"> Grenada </option><option value="Guadeloupe"> Guadeloupe </option><option value="Guam"> Guam </option><option value="Guatemala"> Guatemala </option><option value="Guernsey"> Guernsey </option><option value="Guinea"> Guinea </option><option value="Guinea-Bissau"> Guinea-Bissau </option><option value="Guyana"> Guyana </option><option value="Haiti"> Haiti </option><option value="Heard Island and McDonald Islands"> Heard Island and McDonald Islands </option><option value="Holy See (Vatican City)"> Holy See (Vatican City) </option><option value="Honduras"> Honduras </option><option value="Hong Kong"> Hong Kong </option><option value="Hungary"> Hungary </option><option value="Iceland"> Iceland </option><option value="India"> India </option><option value="Indonesia"> Indonesia </option><option value="Iran"> Iran </option><option value="Iraq"> Iraq </option><option value="Ireland"> Ireland </option><option value="Isle of Man"> Isle of Man </option><option value="Israel"> Israel </option><option value="Italy"> Italy </option><option value="Jamaica"> Jamaica </option><option value="Jan Mayen"> Jan Mayen </option><option value="Japan"> Japan </option><option value="Jersey"> Jersey </option><option value="Jordan"> Jordan </option><option value="Juan de Nova Island"> Juan de Nova Island </option><option value="Kazakhstan"> Kazakhstan </option><option value="Kenya"> Kenya </option><option value="Kiribati"> Kiribati </option><option value="Korea, North"> Korea, North </option><option value="Korea, South"> Korea, South </option><option value="Kuwait"> Kuwait </option><option value="Kyrgyzstan"> Kyrgyzstan </option><option value="Laos"> Laos </option><option value="Latvia"> Latvia </option><option value="Lebanon"> Lebanon </option><option value="Lesotho"> Lesotho </option><option value="Liberia"> Liberia </option><option value="Libya"> Libya </option><option value="Liechtenstein"> Liechtenstein </option><option value="Lithuania"> Lithuania </option><option value="Luxembourg"> Luxembourg </option><option value="Macau"> Macau </option><option value="Macedonia"> Macedonia </option><option value="Madagascar"> Madagascar </option><option value="Malawi"> Malawi </option><option value="Malaysia"> Malaysia </option><option value="Maldives"> Maldives </option><option value="Mali"> Mali </option><option value="Malta"> Malta </option><option value="Marshall Islands"> Marshall Islands </option><option value="Martinique"> Martinique </option><option value="Mauritania"> Mauritania </option><option value="Mauritius"> Mauritius </option><option value="Mayotte"> Mayotte </option><option value="Mexico"> Mexico </option><option value="Micronesia, Federated States of"> Micronesia, Federated States of </option><option value="Moldova"> Moldova </option><option value="Monaco"> Monaco </option><option value="Mongolia"> Mongolia </option><option value="Montserrat"> Montserrat </option><option value="Morocco"> Morocco </option><option value="Mozambique"> Mozambique </option><option value="Namibia"> Namibia </option><option value="Nauru"> Nauru </option><option value="Navassa Island"> Navassa Island </option><option value="Nepal"> Nepal </option><option value="Netherlands"> Netherlands </option><option value="Netherlands Antilles"> Netherlands Antilles </option><option value="New Caledonia"> New Caledonia </option><option value="New Zealand"> New Zealand </option><option value="Nicaragua"> Nicaragua </option><option value="Niger"> Niger </option><option value="Nigeria"> Nigeria </option><option value="Niue"> Niue </option><option value="Norfolk Island"> Norfolk Island </option><option value="Northern Mariana Islands"> Northern Mariana Islands </option><option value="Norway"> Norway </option><option value="Oman"> Oman </option><option value="Pakistan"> Pakistan </option><option value="Palau"> Palau </option><option value="Panama"> Panama </option><option value="Papua New Guinea"> Papua New Guinea </option><option value="Paracel Islands"> Paracel Islands </option><option value="Paraguay"> Paraguay </option><option value="Peru"> Peru </option><option value="Philippines"> Philippines </option><option value="Pitcairn Islands"> Pitcairn Islands </option><option value="Poland"> Poland </option><option value="Portugal"> Portugal </option><option value="Puerto Rico"> Puerto Rico </option><option value="Qatar"> Qatar </option><option value="Reunion"> Reunion </option><option value="Romania"> Romania </option><option value="Russia"> Russia </option><option value="Rwanda"> Rwanda </option><option value="Saint Helena"> Saint Helena </option><option value="Saint Kitts and Nevis"> Saint Kitts and Nevis </option><option value="Saint Lucia"> Saint Lucia </option><option value="Saint Pierre and Miquelon"> Saint Pierre and Miquelon </option><option value="Saint Vincent and the Grenadines"> Saint Vincent and the Grenadines </option><option value="Samoa"> Samoa </option><option value="San Marino"> San Marino </option><option value="Sao Tome and Principe"> Sao Tome and Principe </option><option value="Saudi Arabia"> Saudi Arabia </option><option value="Senegal"> Senegal </option><option value="Serbia and Montenegro"> Serbia and Montenegro </option><option value="Seychelles"> Seychelles </option><option value="Sierra Leone"> Sierra Leone </option><option value="Singapore"> Singapore </option><option value="Slovakia"> Slovakia </option><option value="Slovenia"> Slovenia </option><option value="Solomon Islands"> Solomon Islands </option><option value="Somalia"> Somalia </option><option value="South Africa"> South Africa </option><option value="South Georgia and the South Sandwich Islands"> South Georgia and the South Sandwich Islands </option><option value="Spain"> Spain </option><option value="Spratly Islands"> Spratly Islands </option><option value="Sri Lanka"> Sri Lanka </option><option value="Sudan"> Sudan </option><option value="Suriname"> Suriname </option><option value="Svalbard"> Svalbard </option><option value="Swaziland"> Swaziland </option><option value="Sweden"> Sweden </option><option value="Switzerland"> Switzerland </option><option value="Syria"> Syria </option><option value="Taiwan"> Taiwan </option><option value="Tajikistan"> Tajikistan </option><option value="Tanzania"> Tanzania </option><option value="Thailand"> Thailand </option><option value="Timor-Leste"> Timor-Leste </option><option value="Togo"> Togo </option><option value="Tokelau"> Tokelau </option><option value="Tonga"> Tonga </option><option value="Trinidad and Tobago"> Trinidad and Tobago </option><option value="Tromelin Island"> Tromelin Island </option><option value="Tunisia"> Tunisia </option><option value="Turkey"> Turkey </option><option value="Turkmenistan"> Turkmenistan </option><option value="Turks and Caicos Islands"> Turks and Caicos Islands </option><option value="Tuvalu"> Tuvalu </option><option value="Uganda"> Uganda </option><option value="Ukraine"> Ukraine </option><option value="United Arab Emirates"> United Arab Emirates </option><option value="United Kingdom"> United Kingdom </option><option value="United States"> United States </option><option value="Uruguay"> Uruguay </option><option value="Uzbekistan"> Uzbekistan </option><option value="Vanuatu"> Vanuatu </option><option value="Venezuela"> Venezuela </option><option value="Vietnam"> Vietnam </option><option value="Virgin Islands"> Virgin Islands </option><option value="Wake Island"> Wake Island </option><option value="Wallis and Futuna"> Wallis and Futuna </option><option value="West Bank"> West Bank </option><option value="Western Sahara"> Western Sahara </option><option value="Yemen"> Yemen </option><option value="Zambia"> Zambia </option><option value="Zimbabwe"> Zimbabwe </option></select> </div>
</div>
<div class="clearfix"></div>
<div class="form_submit_div text-center">
<button type="submit" class="btn">Submit <span class="price"></span></button>
</div>
</div>
</div>
</div>
</form>
</div>
<div class="after_form_submit" style="display:none;">
<div class="form_generater_form_div text-center"></div>
</div>
</div>
<script type="text/javascript">
jQuery(document).ready(function(){
var deletefile = [];
var formData = {"div_back_gradient_1":"#fff","div_back_gradient_2":"#fff","back_color":"#fff","form_title":"","form_submit":"Submit","after_submit":"clearAndAllow","after_submit_msg":"","captcha_enable":"no","label_style":"blockLabels","input_border_radius":"2","back_type":"transparent","input_back_color":"#fff","input_back_color_hover":"#fff","back_shadow":"none","label_font_clr":"#333333","input_font_clr":"#333333","button_align":"fullBtn","button_clr":"#fff","button_back_clr":"#333333","button_border_radius":"2","form_width":"600px","form_border_size":"2","form_border_clr":"#c7c7c7","form_border_radius":"1","label_font_size":"14","input_font_size":"12","button_font_size":"16","form_padding":"35","input_border_color":"#ccc","input_border_color_hover":"#ccc","btn_border_clr":"#333333","btn_border_size":"1","form_name":"TRAPO® CAR MATS AGENTS","":"enquiry.my@trapo.asia","form_emails":"enquiry.my@trapo.asia","formElements":[{"Conditions":{},"type":"select","position":0,"label":"Type","halfwidth":"yes","values":"TRAPO AGENT\nTRAPO PARTNER","elementCost":{}},{"type":"text","position":1,"label":"First Name","customClass":"","halfwidth":"yes","Conditions":{}},{"type":"text","position":2,"label":"Last Name","halfwidth":"yes","Conditions":{}},{"type":"email","position":3,"label":"Email","required":"yes","email_confirm":"yes","Conditions":{},"halfwidth":"yes"},{"Conditions":{},"type":"text","position":4,"label":"Phone Number","halfwidth":"yes","required":"yes"},{"Conditions":{},"type":"text","position":5,"label":"Company Name","halfwidth":"yes","required":"yes"},{"Conditions":{},"type":"text","position":6,"label":"Website","halfwidth":"yes"},{"type":"textarea","position":7,"label":"Message","required":"yes","Conditions":{}},{"Conditions":{},"type":"text","position":8,"label":"Street Address"},{"Conditions":{},"type":"text","position":9,"label":"Address Line 2","halfwidth":"no"},{"Conditions":{},"type":"text","position":10,"label":"City","halfwidth":"yes"},{"Conditions":{},"type":"text","position":11,"label":"State/Province/Region","halfwidth":"yes"},{"Conditions":{},"type":"text","position":12,"label":"ZIP/Postal Code","halfwidth":"yes"},{"Conditions":{},"type":"select","position":13,"label":"Country","halfwidth":"yes","values":"Afghanistan\nAkrotiri\nAlbania\nAlgeria\nAmerican Samoa\nAndorra\nAngola\nAnguilla\nAntarctica\nAntigua and Barbuda\nArgentina\nArmenia\nAruba\nAshmore and Cartier Islands\nAustralia\nAustria\nAzerbaijan\nBahamas, The\nBahrain\nBangladesh\nBarbados\nBassas da India\nBelarus\nBelgium\nBelize\nBenin\nBermuda\nBhutan\nBolivia\nBosnia and Herzegovina\nBotswana\nBouvet Island\nBrazil\nBritish Indian Ocean Territory\nBritish Virgin Islands\nBrunei\nBulgaria\nBurkina Faso\nBurma\nBurundi\nCambodia\nCameroon\nCanada\nCape Verde\nCayman Islands\nCentral African Republic\nChad\nChile\nChina\nChristmas Island\nClipperton Island\nCocos (Keeling) Islands\nColombia\nComoros\nCongo, Democratic Republic of the\nCongo, Republic of the\nCook Islands\nCoral Sea Islands\nCosta Rica\nCote dIvoire\nCroatia\nCuba\nCyprus\nCzech Republic\nDenmark\nDhekelia\nDjibouti\nDominica\nDominican Republic\nEcuador\nEgypt\nEl Salvador\nEquatorial Guinea\nEritrea\nEstonia\nEthiopia\nEuropa Island\nFalkland Islands (Islas Malvinas)\nFaroe Islands\nFiji\nFinland\nFrance\nFrench Guiana\nFrench Polynesia\nFrench Southern and Antarctic Lands\nGabon\nGambia, The\nGaza Strip\nGeorgia\nGermany\nGhana\nGibraltar\nGlorioso Islands\nGreece\nGreenland\nGrenada\nGuadeloupe\nGuam\nGuatemala\nGuernsey\nGuinea\nGuinea-Bissau\nGuyana\nHaiti\nHeard Island and McDonald Islands\nHoly See (Vatican City)\nHonduras\nHong Kong\nHungary\nIceland\nIndia\nIndonesia\nIran\nIraq\nIreland\nIsle of Man\nIsrael\nItaly\nJamaica\nJan Mayen\nJapan\nJersey\nJordan\nJuan de Nova Island\nKazakhstan\nKenya\nKiribati\nKorea, North\nKorea, South\nKuwait\nKyrgyzstan\nLaos\nLatvia\nLebanon\nLesotho\nLiberia\nLibya\nLiechtenstein\nLithuania\nLuxembourg\nMacau\nMacedonia\nMadagascar\nMalawi\nMalaysia\nMaldives\nMali\nMalta\nMarshall Islands\nMartinique\nMauritania\nMauritius\nMayotte\nMexico\nMicronesia, Federated States of\nMoldova\nMonaco\nMongolia\nMontserrat\nMorocco\nMozambique\nNamibia\nNauru\nNavassa Island\nNepal\nNetherlands\nNetherlands Antilles\nNew Caledonia\nNew Zealand\nNicaragua\nNiger\nNigeria\nNiue\nNorfolk Island\nNorthern Mariana Islands\nNorway\nOman\nPakistan\nPalau\nPanama\nPapua New Guinea\nParacel Islands\nParaguay\nPeru\nPhilippines\nPitcairn Islands\nPoland\nPortugal\nPuerto Rico\nQatar\nReunion\nRomania\nRussia\nRwanda\nSaint Helena\nSaint Kitts and Nevis\nSaint Lucia\nSaint Pierre and Miquelon\nSaint Vincent and the Grenadines\nSamoa\nSan Marino\nSao Tome and Principe\nSaudi Arabia\nSenegal\nSerbia and Montenegro\nSeychelles\nSierra Leone\nSingapore\nSlovakia\nSlovenia\nSolomon Islands\nSomalia\nSouth Africa\nSouth Georgia and the South Sandwich Islands\nSpain\nSpratly Islands\nSri Lanka\nSudan\nSuriname\nSvalbard\nSwaziland\nSweden\nSwitzerland\nSyria\nTaiwan\nTajikistan\nTanzania\nThailand\nTimor-Leste\nTogo\nTokelau\nTonga\nTrinidad and Tobago\nTromelin Island\nTunisia\nTurkey\nTurkmenistan\nTurks and Caicos Islands\nTuvalu\nUganda\nUkraine\nUnited Arab Emirates\nUnited Kingdom\nUnited States\nUruguay\nUzbekistan\nVanuatu\nVenezuela\nVietnam\nVirgin Islands\nWake Island\nWallis and Futuna\nWest Bank\nWestern Sahara\nYemen\nZambia\nZimbabwe","elementCost":{}}]};
if (typeof formData["label_font_family"] !== 'undefined') {
$("head").append("<link href='https://fonts.googleapis.com/css?family=" + formData["label_font_family"] + "' rel='stylesheet' type='text/css'>");
}
if (typeof formData["input_font_family"] !== 'undefined') {
$("head").append("<link href='https://fonts.googleapis.com/css?family=" + formData["input_font_family"] + "' rel='stylesheet' type='text/css'>");
}
var formElementCount = 0;
if((typeof formData['captcha_enable'] !== 'undefined') && (formData['captcha_enable'] == "yes")){
if((typeof formData['captcha_align'] !== 'undefined') && (formData['captcha_align'] == 'center')){
$('.form_generater_form_div .form_captcha_div').css("text-align", "center");
} else if((typeof formData['captcha_align'] !== 'undefined') && (formData['captcha_align'] == 'right')){
$('.form_generater_form_div .form_captcha_div').css("text-align", "right");
} else{
$('.form_generater_form_div .form_captcha_div').css("text-align", "left");
}
}
// Update language captcha
function updateGoogleCaptchaLanguage(selectedLanguage,selectorRecaptcha) {
// Get GoogleCaptcha iframe
var iframeGoogleCaptcha = $(selectorRecaptcha).find('iframe');
// Get language code from iframe
var language = iframeGoogleCaptcha.attr("src").match(/hl=(.*?)&/).pop();
// Get selected language code from drop down
// var selectedLanguage = $('#captcha_lang').val();
// Check if language code of element is not equal by selected language, we need to set new language code
if (language !== selectedLanguage) {
// For setting new language
iframeGoogleCaptcha.attr("src", iframeGoogleCaptcha.attr("src").replace(/hl=(.*?)&/, 'hl=' + selectedLanguage + '&'));
}
}
if((typeof formData['captcha_lang'] !== 'undefined')){
setTimeout(function(){
updateGoogleCaptchaLanguage(formData['captcha_lang'],'.form_captcha_div');
}, 200);
}
if(typeof formData['label_style'] !== 'undefined' && formData['label_style'] != 'blockLabels'){
$(".card_deails_div .form-group").each(function(index){
block_label = $(this).find('label').text();
$(this).find(':input').attr('placeholder', block_label);
$(this).find('label').css("display", "none");
});
}
iframe_resize('no', 'no', 'initial');
if(typeof formData['button_align'] !== 'undefined'){
if(formData['button_align'] == "leftBtn"){
$(".form_generater_form_div div.form_submit_div ").addClass('text-left').removeClass('text-center');
} else if(formData['button_align'] == "centerBtn"){
$(".form_generater_form_div div.form_submit_div ").addClass('text-center');
} else if(formData['button_align'] == "rightBtn"){
$(".form_generater_form_div .form_submit_div ").addClass('text-right').removeClass('text-center');
}
}
paymentDisplay();
$.each(formData['formElements'], function( index, value ) {
var type = value['type'];
var minDate = '';
var maxDate = '';
if(typeof value['minDate'] !== 'undefined'){
minDate = value['minDate'];
}
if(typeof value['maxDate'] !== 'undefined'){
maxDate = value['maxDate'];
}
if(type == "date"){
if(value['datetime'] == "time"){
$('#datetime_'+formElementCount).find(':input').datetimepicker({
format: 'LT',
ignoreReadonly: true,
allowInputToggle: true
});
} else if(value['datetime'] == "date") {
if((minDate != '') && (maxDate != '')){
$('#datetime_'+formElementCount).find(':input').datetimepicker({
format: 'MM/DD/YYYY',
minDate: minDate,
maxDate: maxDate,
ignoreReadonly: true,
allowInputToggle: true
});
} else if((minDate == '') && (maxDate == '')){
$('#datetime_'+formElementCount).find(':input').datetimepicker({
format: 'MM/DD/YYYY',
ignoreReadonly: true,
allowInputToggle: true
});
} else {
if((minDate != '')){
$('#datetime_'+formElementCount).find(':input').datetimepicker({
format: 'MM/DD/YYYY',
minDate: minDate,
ignoreReadonly: true,
allowInputToggle: true
});
} else if(maxDate != '') {
$('#datetime_'+formElementCount).find(':input').datetimepicker({
format: 'MM/DD/YYYY',
maxDate: maxDate,
ignoreReadonly: true,
allowInputToggle: true
});
}
}
} else {
if((minDate != '') && (maxDate != '')){
$('#datetime_'+formElementCount).find(':input').datetimepicker({
minDate: minDate,
maxDate: maxDate,
ignoreReadonly: true,
allowInputToggle: true
});
} else if((minDate == '') && (maxDate == '')){
$('#datetime_'+formElementCount).find(':input').datetimepicker({
ignoreReadonly: true,
allowInputToggle: true
});
} else {
if((minDate != '')){
$('#datetime_'+formElementCount).find(':input').datetimepicker({
minDate: minDate,
ignoreReadonly: true,
allowInputToggle: true
});
} else if(maxDate != '') {
$('#datetime_'+formElementCount).find(':input').datetimepicker({
maxDate: maxDate,
ignoreReadonly: true,
allowInputToggle: true
});
}
}
}
}
if(type == "newdate"){
if((minDate != '') && (maxDate != '')){
$('#newdate_'+formElementCount).find(':input').datetimepicker({
format: 'MM/DD/YYYY',
minDate: minDate,
maxDate: maxDate,
ignoreReadonly: true,
allowInputToggle: true
});
} else if((minDate == '') && (maxDate == '')){
$('#newdate_'+formElementCount).find(':input').datetimepicker({
format: 'MM/DD/YYYY',
ignoreReadonly: true,
allowInputToggle: true
});
} else {
if((minDate != '')){
$('#newdate_'+formElementCount).find(':input').datetimepicker({
format: 'MM/DD/YYYY',
minDate: minDate,
ignoreReadonly: true,
allowInputToggle: true
});
} else if(maxDate != '') {
$('#newdate_'+formElementCount).find(':input').datetimepicker({
format: 'MM/DD/YYYY',
maxDate: maxDate,
ignoreReadonly: true,
allowInputToggle: true
});
}
}
}
if(type == "time"){
$('#time_'+formElementCount).find(':input').datetimepicker({
format: 'LT',
ignoreReadonly: true,
allowInputToggle: true
});
}
if(formData['label_style'] != 'blockLabels'){
$(".formElement_"+formElementCount).each(function(index) {
if($(this).hasClass('dateTime') || $(this).hasClass('textfield') || $(this).hasClass('textarea') || $(this).hasClass('number') || $(this).hasClass('email') || $(this).hasClass('dateTime') || $(this).hasClass('newDate') || $(this).hasClass('Time')){
$(this).find('label').css("display", "none");
$(this).find(':input').attr("placeholder", $(this).find('label').text());
} else if($(this).hasClass('address')){
addressLabelChange('inlineLabels', formElementCount);
} else if($(this).hasClass('select')){
$(this).find('label').css("display", "none");
$(this).find('select > option:first-child').text($(this).find('label').text());
}
if($(this).hasClass('dateTime')){
$(this).find('label').css("display", "none");
$(this).find(':input').attr("placeholder", $(this).find('label').text());
}
});
} else {
elementHolder = '';
if(typeof value['placeholder'] !== 'undefined'){
elementHolder = value['placeholder'];
}
$(".formElement_"+formElementCount).each(function(index) {
if($(this).hasClass('textfield') || $(this).hasClass('textarea') || $(this).hasClass('number') || $(this).hasClass('email')){
$(this).find('label').css("display", "block");
$(this).find(':input').attr("placeholder", elementHolder);
} else if($(this).hasClass('address')){
addressLabelChange('blockLabels', formElementCount);
}
if($(this).hasClass('select')){
var elementHolder = (elementHolder == "") ? "Please Select" : elementHolder;
$(this).find('label').css("display", "block");
$(this).find('select > option:first-child').text(elementHolder);
}
});
}
formElementCount++;
});
$(document).on('click', '.alert_message .alert.alert-danger span', function(){
$(".alert_message").css("display", "none");
iframe_resize('no', 'no', 'error');
});
$('#stripePayment').change(function(){
paymentDisplay();
});
iframe_resize('no', 'no', 'initial');
$(document).on('click', '.form_submit_div .btn', function(e) {
e.preventDefault();
$('.form_submit_div .btn').prop('disabled',true);
$('.error').removeClass('error');
var captch_check = 1;
if(formData['captcha_enable'] == 'yes'){
var captcha_response = grecaptcha.getResponse();
if(captcha_response.length == 0){
captch_check = 0;
}
}
if(captch_check != 1){
$(".alert_message").html('<div class="alert alert-danger" role="alert"><button type="button" class="close" data-dismiss="alert" aria-label="Close"><span aria-hidden="true">×</span></button> '+ "Please provide valid captcha response" + '</div>').css("display", "block");
iframe_resize('yes', 'no', 'error');
$('.form_submit_div .btn').prop('disabled',false);
} else {
var validate = 1;
var confirmationMail = '';
var email_check = '';
var filters = [];
var validMessage = '';
$(".form_container div[class^='formElement']").each(function(){
if(!$(this).attr("id")){
if(formData['formElements'][$(this).data('count')]['required'] == 'yes'){
var required_message = " is required";
if($(this).hasClass('radio')){
if(!$(this).find("input:checked").val()){
validate = 0;
filters.push($(this).find(":input").attr('name') + required_message);
$("input[name='"+$(this).find('.block_label').text() +"']");
}
} else if($(this).hasClass('checkbox')){
if(!$(this).find(":input").is(':checked')){
validate = 0;
filters.push($(this).find(":input").attr('name') + required_message);
$(this).find(":input").addClass('error');
}
} else if($(this).hasClass('checkbox-multi')){
if($(this).find(".checkboxmulti_"+$(this).data('count')+":checkbox:checked").length <= 0){
validate = 0;
filters.push($(this).find(':input').attr('name') + required_message);
}
} else if($(this).hasClass('select')){
if($(this).find('select').val() == ''){
validate = 0;
filters.push($(this).find(":input").attr('name') + required_message);
$(this).find('select').addClass('error');
}
} else if($(this).hasClass('dateTime')){
if($(this).find(':input').val().trim() == ''){
validate = 0;
filters.push($(this).find(":input").attr('name') + required_message);
$(this).find(':input').addClass('error');
}
} else if($(this).hasClass('file')){
if(typeof fileuploaded["fileupload_"+$(this).data('count')] == 'undefined'){
validate = 0;
filters.push($(this).find(":input").attr('name') + required_message);
$(this).find('label').addClass('error');
}
if(typeof fileuploaded["fileupload_"+$(this).data('count')] !== 'undefined' && fileuploaded["fileupload_"+$(this).data('count')]['upload_type'] == 'multiple' && fileuploaded["fileupload_"+$(this).data('count')]['files'].length <= 0) {
validate = 0;
filters.push($(this).find(":input").attr('name') + required_message);
$(this).find('label').addClass('error');
}
} else if($(this).hasClass('image')){
if(typeof fileuploaded["imageupload_"+$(this).data('count')] == 'undefined'){
validate = 0;
filters.push($(this).find(":input").attr('name') + required_message);
$(this).find('label').addClass('error');
}
if(typeof fileuploaded["imageupload_"+$(this).data('count')] !== 'undefined' && fileuploaded["imageupload_"+$(this).data('count')]['upload_type'] == 'multiple' && fileuploaded["imageupload_"+$(this).data('count')]['images'].length <= 0) {
validate = 0;
filters.push($(this).find(":input").attr('name') + required_message);
$(this).find('label').addClass('error');
}
} else if($(this).hasClass('address')){
field_name = formData['formElements'][$(this).data('count')]['label'];
$(this).find(':input.required').each(function(){
if($(this).val().trim() == ''){
validate = 0;
sub_name = $(this).closest('.form-group').find('.block_label').text();
filters.push(field_name + ' - ' + sub_name + required_message);
$(this).addClass('error');
}
});
} else if($(this).hasClass('raw_html')){
//Don't Do anything, these are only for display
} else {
if($(this).find(':input').val().trim() == ''){
validate = 0;
filters.push($(this).find(":input").attr('name') + required_message);
$(this).find(':input').addClass('error');
}
}
}
if($(this).hasClass('email')){
if($(this).find(':input').val() != ""){
var cur_email_value = $(this).find(':input').val().toLowerCase();
if(!isEmail(cur_email_value)){
validate = 0;
filters.push("Provide valid email format");
validMessage = "Provide valid email format";
$(this).find(':input').addClass('error');
} else {
var blk_email = "";
if(blk_email != ''){
blocked_emails = blk_email.split(',');
$.each(blocked_emails, function( index, value ) {
cDom = value.trim();
var n = cur_email_value.endsWith("@" + cDom);
var m = cur_email_value.endsWith("." + cDom);
var last = cDom.substring(cDom.lastIndexOf("@") + 1, cDom.length);
if(n == true || m == true){
validate = 0;
validMessage = "This form does not accept addresses from " + last;
filters.push(validMessage);
}
});
}
if(email_check != ''){
email_check = email_check + ',' + cur_email_value;
} else {
email_check = cur_email_value;
}
email_check = cur_email_value;
if($(this).find(':input').hasClass('email_confirm')){
if(confirmationMail != ''){
confirmationMail = confirmationMail + ',' + cur_email_value;
} else {
confirmationMail = cur_email_value;
}
}
}
}
}
if($(this).find(':input').hasClass('url')){
if($(this).find(':input').val() != ""){
if(!validateUrl($(this).find(':input').val())){
validate = 0;
filters.push("Provide valid URL");
validMessage = "Provide valid URL";
$(this).find(':input').addClass('error');
}
}
}
if($(this).hasClass('number')){
var number_val = $(this).find(':input').val();
if(number_val != ""){
if(isNaN(parseInt(number_val))) {
validate = 0;
filters.push("Images allowed "+ $(this).find(':input').attr('name'));
validMessage = "Images allowed "+ $(this).find(':input').attr('name');
$(this).find(':input').addClass('error');
} else{
if(typeof formData['formElements'][$(this).data('count')]['maxNumber'] !== 'undefined'){
if(parseInt(number_val) > parseInt(formData['formElements'][$(this).data('count')]['maxNumber'])){
validate = 0;
validMessage = $(this).find(':input').attr('name') + " must be less than " + formData['formElements'][$(this).data('count')]['maxNumber'].toString();
filters.push($(this).find(':input').attr('name') + " must be less than " + formData['formElements'][$(this).data('count')]['maxNumber'].toString());
$(this).find(':input').addClass('error');
}
}
if(typeof formData['formElements'][$(this).data('count')]['minNumber'] !== 'undefined'){
if(parseInt(number_val) < parseInt(formData['formElements'][$(this).data('count')]['minNumber'])){
validate = 0;
validMessage = $(this).find(':input').attr('name') + " must be more than "+ formData['formElements'][$(this).data('count')]['minNumber'].toString();
filters.push($(this).find(':input').attr('name') + " must be more than "+ formData['formElements'][$(this).data('count')]['minNumber'].toString());
$(this).find(':input').addClass('error');
}
}
}
}
}
filters = $.unique(filters);
}
});
stripeToken = '';
if(validate != 1){
if(filters.length > 0){
$(".alert_message").html('<div class="alert alert-danger" role="alert"><button type="button" class="close" data-dismiss="alert" aria-label="Close"><span aria-hidden="true">×</span></button>'+filters.join('<br/>')+'</div>').css("display", "block");
} else if(validMessage != ''){
$(".alert_message").html('<div class="alert alert-danger" role="alert"><button type="button" class="close" data-dismiss="alert" aria-label="Close"><span aria-hidden="true">×</span></button>'+validMessage+'</div>').css("display", "block");
} else {
$(".alert_message").html('<div class="alert alert-danger" role="alert"><button type="button" class="close" data-dismiss="alert" aria-label="Close"><span aria-hidden="true">×</span>button> ' + "Please provide valid data" + ' </div>').css("display", "block");
}
$('html, body').animate({scrollTop: $('#wizard-validation-form').offset().top }, 'slow');
iframe_resize('yes', 'no', 'error');
$('.form_submit_div .btn').prop('disabled',false);
} else {
swal({
title: "<div class='loader' style='width:100px;height:100px;'></div> <h4> " + "Processing..." +" </h4>",
html: true,
showConfirmButton: false
});
iframe_resize('yes', 'no', 'success');
$('html, body').animate({scrollTop: $('#wizard-validation-form').offset().top }, 'slow');
var formResponse = {};
var additional_price = 0.00;
$(".form_container div[class^='formElement']").each(function(){
if((!$(this).attr("id")) && (!$(this).hasClass('label')) && (!$(this).hasClass('lineBreak')) && (!$(this).hasClass('space'))){
eCount = $(this).data('count');
fElement = formData['formElements'][eCount];
if($(this).hasClass('radio')){
submit_value = $(this).find("input:checked").val();
} else if($(this).hasClass('checkbox')){
if(!$(this).find("input").is(':checked')){
submit_value = "Off";
} else {
submit_value = "On";
}
} else if($(this).hasClass('checkbox-multi')){
var checkValues = [];
$.each($("input[name='"+fElement['label']+"']:checked"), function(){
checkValues.push($(this).val());
});
submit_value = checkValues.join(", ");
} else if($(this).hasClass('select')){
submit_value = $(this).find('select').val();
} else if($(this).hasClass('dateTime')){
submit_value = $(this).find(':input').val();
} else if($(this).hasClass('file')){
if(typeof fileuploaded["fileupload_"+eCount] !== 'undefined'){
if(fileuploaded["fileupload_"+eCount]['upload_type'] == 'multiple'){
formResponse[formData['formElements'][eCount]['label']] = fileuploaded["fileupload_"+eCount];
} else {
formResponse[formData['formElements'][eCount]['label']] = fileuploaded["fileupload_"+eCount];
}
} else {
formResponse[formData['formElements'][eCount]['label']] = '';
}
} else if($(this).hasClass('image')){
if(typeof fileuploaded["imageupload_"+eCount] !== 'undefined'){
if(fileuploaded["imageupload_"+eCount]['upload_type'] == 'multiple'){
formResponse[formData['formElements'][eCount]['label']] = fileuploaded["imageupload_"+eCount];
} else {
formResponse[formData['formElements'][eCount]['label']] = fileuploaded["imageupload_"+eCount];
}
} else {
formResponse[formData['formElements'][eCount]['label']] = '';
}
} else if($(this).hasClass('address')){
var address_array = $(this).find(':input').map(function(){
var obj = {};
obj[ this.name ] = $(this).val();
return obj;
}).get();
formResponse[fElement['label']] = address_array;
} else {
submit_value = $(this).find(':input').val();
}
if(typeof submit_value !== 'undefined'){
if(typeof formResponse[fElement['label']] !== 'undefined'){
fsArr = formResponse[fElement['label']];
if($.isArray(fsArr)){
fsArr.push(submit_value);
} else {
old_value = formResponse[fElement['label']];
formResponse[fElement['label']] = [old_value];
formResponse[fElement['label']].push(submit_value);
}
} else {
formResponse[formData['formElements'][eCount]['label']] = submit_value;
}
}
submit_value = undefined;
}
});
var payment_details = {};
var formResponseCount = 2;
/*$.each(formResponse, function(index, value) {
if(jQuery.type( value ) === "object"){
console.log(value, value.size());
} else {
if(value != 'undefined' && value.trim() != ''){
formResponseCount++;
}
}
})*/
if(formResponseCount <= 0){
swal.close();
$("#formGeneratorForm input, #formGeneratorForm textarea").first().focus();
$('.form_submit_div .btn').prop('disabled',false);
iframe_resize('yes', 'no', 'error');
return false;
} else {
$.ajax({
type:"POST",
url: "/ajaxcall/formresponse",
data: { form_uuid: "3Qe0lWb-kak2T1yNyLscsw", formResponse: JSON.stringify(formResponse), confirmationMail: confirmationMail, payment_details: payment_details, is_pro: "false" },
success:function(data){
swal.close();
$('.error').removeClass('error');
// $('html, body').animate({ scrollTop: $('#wizard-validation-form').offset().top }, 'slow');
$('span.fileres').text('');
$('#stripeToken').val('');
if(typeof data.charge_failed !== 'undefined'){
$(".alert_message").html('<div class="alert alert-danger" role="alert"><button type="button" class="close" data-dismiss="alert" aria-label="Close"><span aria-hidden="true">×</span></button>'+ data.message +'</div>').css("display", "block");
$('.form_submit_div .btn').prop('disabled',false);
} else {
window.onbeforeunload = null;
if ( window.location !== window.parent.location ) {
if(formData['after_submit'] == 'clearAndPrevent'){
$(".alert_message").html('<div class="alert alert-success" role="alert"><button type="button" class="close" data-dismiss="alert" aria-label="Close"><span aria-hidden="true">×</span></button>'+"Thank you! The form was submitted successfully."+'</div>').css("display", "block");
iframe_resize('no', 'no', 'success');
$(".alert_message .alert").fadeOut(5000, function(){
$(this).remove();
$(".alert_message").css("display", "none");
iframe_resize('yes', 'no', 'success');
});
$('#formGeneratorForm')[0].reset();
$('.form_submit_div .btn').prop('disabled',true);
iframe_resize('yes', 'no', 'success');
} else if(formData['after_submit'] == 'clearAndAllow'){
var rlurl = document.URL+'&form_sbmt=yes';
window.location.replace(rlurl);
} else if(formData['after_submit'] == 'redirect'){
if(typeof formData['after_submit_url'] !== 'undefined'){
if(typeof formData['openinnewtab'] !== 'undefined' && formData['openinnewtab'] == 'yes'){
var redirectURL = formData['after_submit_url'];
if(redirectURL == ''){
location.reload();
} else{
window.open(redirectURL, '_blank');
$(".formContainer").css("display", "none");
$(".formContainer").html('');
$(".after_form_submit .form_generater_form_div").html(formData['after_submit_msg']);
$(".after_form_submit").css("display", "block");
iframe_resize('yes', 'no', 'success');
}
} else {
var redirectURL = formData['after_submit_url'];
if(redirectURL == ''){
location.reload();
} else{
window.top.location.href = redirectURL;
}
}
} else{
location.reload();
}
} else if(formData['after_submit'] == 'hideAndmessage'){
$(".formContainer").css("display", "none");
$(".formContainer").html('');
$(".after_form_submit .form_generater_form_div").html(formData['after_submit_msg']);
$(".after_form_submit").css("display", "block");
iframe_resize('yes', 'no', 'success');
} else if(formData['after_submit'] == 'responses'){
var formResponse = jQuery.parseJSON(data['user_response']);
var htmlrender = '<style type="text/css">.after_form_submit .form_generater_form_div table{border: 1px solid #ccc;}'+
'.after_form_submit .form_generater_form_div tr{ border-bottom: 1px solid #ccc; }'+
'.after_form_submit .form_generater_form_div tr:nth-child(2n) { background: #ededed; }'+
'.after_form_submit .form_generater_form_div td {padding: 6px 5px; }'+
'</style>'+
'<h3> ' + "Your response" + ' </h3>'+
'<table class="question_content" style="background-color: #fdfdfd;" cellpadding="15" border="1" cellspacing="0" width="100%" border-collapse="collapse">';
$.each(formResponse, function(index, value){
htmlrender = htmlrender + '<tr><td><b>'+index+'</b></td><td>';
if(typeof value != 'string') {
if(value['type'] == 'image'){
if(value['upload_type'] == "multiple"){
$.each(value['images'], function(im_index, im_value){
htmlrender = htmlrender + '<a href="'+ im_value["url"]+'" target="_blank"><img src="'+ im_value["url"]+'" alt="'+index+'" width="150"></a>';
});
} else {
htmlrender = htmlrender + '<a href="'+ value["url"]+'" target="_blank"><img src="'+ value["url"]+'" alt="'+index+'" width="150" alt="image"></a>';
}
} else if(value['type'] == 'file'){
if(value['upload_type'] == "multiple"){
$.each(value['files'], function(im_index, im_value){
htmlrender = htmlrender + '<br/><a href="'+ im_value["url"]+'" target="_blank" style="margin-bottom: 10px;"> ' + "Download file" + '</a>';
});
} else {
htmlrender = htmlrender + '<a href="'+ value["url"]+'" target="_blank">' + "Download file" + '</a>';
}
} else if(typeof value["url"] !== 'undefined'){
htmlrender = htmlrender + ' <a href="'+ value["url"]+'" class="btn btn-default" target="_blank">' + "Download file" + '</a>';
} else {
$.each(value, function(index, address_value){
$.each(address_value, function(im_index, im_value){
if(im_value.trim() != ''){
htmlrender = htmlrender + im_index + ': ' + im_value + '</br>';
}
});
});
}
} else {
htmlrender = htmlrender + ' ' +value.toString();
}
htmlrender = htmlrender + '</td></tr>';
});
htmlrender = htmlrender + '</table>';
$(".formContainer").css("display", "none");
$(".formContainer").html('');
$(".after_form_submit .form_generater_form_div").html(htmlrender);
$(".after_form_submit").css("display", "block");
iframe_resize('yes', 'no', 'success');
}
} else {
if(formData['after_submit'] == 'clearAndPrevent' || formData['after_submit'] == 'redirect'){
$(".alert_message").html('<div class="alert alert-success" role="alert"><button type="button" class="close" data-dismiss="alert" aria-label="Close"><span aria-hidden="true">×</span></button>'+"Thank you! The form was submitted successfully."+'</div>').css("display", "block");
iframe_resize('no', 'no', 'success');
$(".alert_message .alert").fadeOut(5000, function(){
$(this).remove();
$(".alert_message").css("display", "none");
iframe_resize('yes', 'no', 'success');
});
$('#formGeneratorForm')[0].reset();
$('.form_submit_div .btn').prop('disabled',true);
iframe_resize('yes', 'no', 'success');
} else if(formData['after_submit'] == 'clearAndAllow'){
var rlurl = document.URL+'&form_sbmt=yes';
window.location.replace(rlurl);
$('.form_submit_div .btn').prop('disabled',false);
iframe_resize('yes', 'no', 'success');
} else if(formData['after_submit'] == 'hideAndmessage'){
$(".formContainer").css("display", "none");
$(".formContainer").html('');
$(".after_form_submit .form_generater_form_div").html(formData['after_submit_msg']);
$(".after_form_submit").css("display", "block");
iframe_resize('yes', 'no', 'success');
} else if(formData['after_submit'] == 'responses'){
var formResponse = jQuery.parseJSON(data['user_response']);
var htmlrender = '<style type="text/css">.after_form_submit .form_generater_form_div table{border: 1px solid #ccc;}'+
'.after_form_submit .form_generater_form_div tr{ border-bottom: 1px solid #ccc; }'+
'.after_form_submit .form_generater_form_div tr:nth-child(2n) { background: #ededed; }'+
'.after_form_submit .form_generater_form_div td {padding: 6px 5px; }'+
'</style>'+
'<h3> ' + "Your response" + ' </h3>'+
'<table class="question_content" style="background-color: #fdfdfd;" cellpadding="15" border="1" cellspacing="0" width="100%" border-collapse="collapse">';
$.each(formResponse, function(index, value){
htmlrender = htmlrender + '<tr><td><b>'+index+'</b></td><td>';
if(typeof value != 'string') {
if(value['type'] == 'image'){
if(value['upload_type'] == "multiple"){
$.each(value['images'], function(im_index, im_value){
htmlrender = htmlrender + '<a href="'+ im_value["url"]+'" target="_blank"><img src="'+ im_value["url"]+'" alt="'+index+'" width="150"></a>';
});
} else {
htmlrender = htmlrender + '<a href="'+ value["url"]+'" target="_blank"><img src="'+ value["url"]+'" alt="'+index+'" width="150"></a>';
}
} else if(typeof value["url"] !== 'undefined'){
htmlrender = htmlrender + ' <a href="'+ value["url"]+'" class="btn btn-default" target="_blank">' + "Download file" + '</a>';
} else {
$.each(value, function(index, address_value){
$.each(address_value, function(im_index, im_value){
if(im_value.trim() != ''){
htmlrender = htmlrender + im_index + ': ' + im_value + '</br>';
}
});
});
}
} else {
htmlrender = htmlrender + ' ' +value.toString();
}
htmlrender = htmlrender + '</td></tr>';
});
htmlrender = htmlrender + '</table>';
$(".formContainer").css("display", "none");
$(".formContainer").html('');
$(".after_form_submit .form_generater_form_div").html(htmlrender);
$(".after_form_submit").css("display", "block");
iframe_resize('yes', 'no', 'success');
}
}
var fileuploaded = {};
var htmlrender = '';
var formResponse = {};
}
},
error:function(data){
swal.close();
$(".alert_message").html('<div class="alert alert-danger" role="alert"><button type="button" class="close" data-dismiss="alert" aria-label="Close"><span aria-hidden="true">×</span></button>'+ "Error occur.Please try again after sometime." +'</div>').css("display", "block");
$('.form_submit_div .btn').prop('disabled',false);
iframe_resize('yes', 'no', 'error');
}
});
}
}
}
return false;
});
function isEmail(email) {
var regex = /^([a-zA-Z0-9_.+-])+\@(([a-zA-Z0-9-])+\.)+([a-zA-Z0-9]{2,4})+$/;
return regex.test(email);
}
function validateUrl(url) {
var urlregex = new RegExp("^(http:\/\/|https:\/\/|www.){1}([0-9A-Za-z]+\.)");
return urlregex.test(url);
}
var fileuploaded = {};
$('.dropdown-toggle').dropdown();
var width = $(window).width();
$(window).resize(function(){
if($(this).width() != width){
width = $(this).width();
iframe_resize('no', 'no', 'initial');
}
scaleCaptcha();
});
scaleCaptcha();
function scaleCaptcha(elementWidth) {
if ($(window).width() < 420) {
var reCaptchaWidth = 304;
var containerWidth = $('.form_captcha_div').width();
if (reCaptchaWidth > containerWidth) {
var captchaScale = containerWidth / reCaptchaWidth;
$('.g-recaptcha').css({
'transform': 'scale(' + captchaScale + ')',
'transform-origin': '0 0',
'-ms-transform-origin': '0 0',
' -webkit-transform-origin': '0 0'
});
} else {
$('.g-recaptcha').css({
'transform': 'scale(1)'
});
}
} else {
$('.g-recaptcha').css({
'transform': 'scale(1)'
});
}
}
$(document).on('click', '#formGeneratorForm .form_generater_form_div a[target!="_parent"]', function(e){
e.preventDefault();
var redirectURL = $(this).attr('href');
window.open(redirectURL, '_blank');
});
$('[data-toggle="tooltip"]').tooltip();
$('.paymentCount :input').change(function(){
paymentDisplay();
return false;
});
function paymentDisplay(){
var selected_price = payment_calculation(),
display_price = 'no',
currency_select = '$';
if((typeof formData['payment_integration'] != 'undefined') && (typeof formData['payment_integration']['payment_currency_symbol'] != 'undefined')){
currency_select = formData['payment_integration']['payment_currency_symbol'];
}
if((typeof formData['payment_integration'] != 'undefined') && (typeof formData['payment_integration']['show_price'] != 'undefined')){
display_price = formData['payment_integration']['show_price'];
}
if (!isNaN(selected_price)) {
if(display_price == 'yes'){
$('.form_submit_div span.price').text('(' +currency_select + '' + selected_price + ')');
} else {
$('.form_submit_div span.price').text('');
}
}
}
function conditionalHide(division_id){
if($("."+division_id).hasClass('checkbox-multi')){
$("."+division_id + ' input[type=checkbox]').prop( "checked", false).trigger('change');
} else if($("."+division_id).hasClass('checkbox')){
$("."+division_id + ' input[type=checkbox]').prop( "checked", false).trigger('change');
} else if($("."+division_id).hasClass('radio')){
$("."+division_id + ' input[type=radio]').removeAttr('checked').trigger('change');
} else if($("."+division_id).hasClass('select')){
$("."+division_id + ' select').val('').trigger('change');
}
}
function addressLabelChange(label_style, formElementCount){
if(label_style == 'inlineLabels'){
$('.formElement_'+formElementCount+' :input').each(function(){
$(this).closest('.form-group').find('label').css("display", 'none');
ship_label = $(this).closest('.form-group').find('label').text();
if(ship_label == 'Country'){
$(this).find('option:first-child').text(ship_label);
} else{
$(this).attr('placeholder', ship_label);
}
});
} else {
$('.formElement_'+formElementCount+' :input').each(function(){
$(this).closest('.form-group').find('label').css("display", 'block');
ship_label = $(this).closest('.form-group').find('label').text();
if(ship_label == 'Country'){
$(this).find('option:first-child').text('- Country -');
} else{
$(this).attr('placeholder', '');
}
});
}
}
$('.payment_element').change(function(){
var value_filled = 1;
$(".payment_element").each(function(index) {
if($(this).val().trim() == ''){
value_filled = 0;
}
});
if(value_filled == 1){
swal({
title: "<div class='loader' style='width:100px;height:100px;'></div> <h4> " + "Processing..." +" </h4>",
html: true,
showConfirmButton: false
});
Stripe.card.createToken($('#formGeneratorForm'), stripeResponseHandler);
}
});
function payment_calculation(){
var additional_price = 0.00;
$(".form_container div[class^='formElement']").each(function(){
if((!$(this).attr("id")) && ($(this).hasClass('radio') || $(this).hasClass('checkbox-multi') || $(this).hasClass('select'))){
eCount = $(this).data('count');
if($(this).hasClass('radio')){
var select_value = $(this).find("input:checked").val();
if(typeof formData['formElements'][eCount]['elementCost'] !== 'undefined' && typeof formData['formElements'][eCount]['elementCost'][select_value] !== 'undefined'){
additional_price += parseFloat(formData['formElements'][eCount]['elementCost'][select_value]);
}
} else if($(this).hasClass('checkbox-multi')){
$.each($("input[name='"+formData['formElements'][eCount]['label']+"']:checked"), function(){
if(typeof formData['formElements'][eCount]['elementCost'] !== 'undefined' && typeof formData['formElements'][eCount]['elementCost'][$(this).val()] != 'undefined'){
additional_price += parseFloat(formData['formElements'][eCount]['elementCost'][$(this).val()]);
}
});
} else if($(this).hasClass('select')){
var select_value = $(this).find('select').val();
if(typeof formData['formElements'][eCount]['elementCost'] !== 'undefined' && typeof formData['formElements'][eCount]['elementCost'][select_value] != 'undefined'){
additional_price += parseFloat(formData['formElements'][eCount]['elementCost'][select_value]);
}
}
}
});
var stripePayment = 0.00;
if(typeof formData['payment_integration'] !== 'undefined' && typeof formData['payment_integration']['payment_cost'] !== 'undefined'){
stripePayment = parseFloat(formData['payment_integration']['payment_cost']);
if(typeof formData['payment_integration']['price_change'] !== 'undefined' && formData['payment_integration']['price_change'] == 'yes' ){
if (typeof $('#stripePayment').val() !== 'undefined'){
stripePayment = parseFloat($('#stripePayment').val());
}
}
}
var combined_payment = stripePayment + additional_price;
return combined_payment.toFixed(2);
}
window.onbeforeunload = function() {
$.each(fileuploaded,function(i,val){
$.each(val,function(img,img_val){
if(img == 'id'){
$.ajax({
url: '/ajaxcall/imagedelete',
data: {image_id: val.id },
success: function(data){
}
});
}
if(img == 'images' || img == 'files'){
$.each(img_val,function(img_arr_i,img_arr_val){
image_id = img_arr_val.id;
$.ajax({
url: '/ajaxcall/imagedelete',
data: {image_id: image_id },
success: function(data){
}
});
});
}
});
});
};
/****************** Add More Element Logic ******************/
$(document).on('click , dblclick', '.add_new', function(e) {
curele = $(this).attr('data-elementcount');
ele_len = $(this).closest('.add_more_element').find('.form-group').length;
if(ele_len == 1){
$('.formElement_'+curele+':first').prepend('<span class="field-close" data-elementcount="'+curele+'"></span>')
}
duplicate_html = $('.formElement_'+curele+':first').clone();
$(this).closest('.add_more_element').find('.element_holder').append(duplicate_html).html();
iframe_resize('no', 'no', 'initial');
});
$(document).on('click', '.add_more_element .field-close', function(){
ele_len = $(this).closest('.element_holder').find('.form-group').length;
curele = $(this).attr('data-elementcount');
if(ele_len > 1){
$(this).closest('.form-group').remove();
}
if(ele_len == 2){
$('.formElement_'+curele+':first').find('.field-close').remove();
}
iframe_resize('no', 'no', 'initial');
});
iframe_resize('no', 'no', 'initial');
// if((typeof formData['captcha_lang'] !== 'undefined')){
// window.innerWidth = 512;
// setTimeout(function(){
// updateGoogleCaptchaLanguage(formData['captcha_lang'],'.form_captcha_div');
// }, 200);
// }
});
function iframe_resize(scrVal, scrl_bottom, scroll_action){
var scroll_to = false;
if(scrVal == 'yes'){
scroll_to = true;
}
if(scroll_action == 'error'){
}
if(scroll_action == 'success'){
}
if ( window.location !== window.parent.location ) {
var parenturl = (window.location != window.parent.location) ? document.referrer : document.location;
var urlArray = document.referrer.split('/');
if(urlArray.count > 3){
urlArray.pop();
urlArray.pop();
}
var url = urlArray.join('/');
var body = document.body,
height = Math.max(body.offsetHeight, body.scrollHeight);
if (parent.postMessage) {
parent.postMessage({formid: "3Qe0lWb-kak2T1yNyLscsw", height: height + 30, scroll_to: scroll_to, scrl_bottom: scrl_bottom }, url);
}
} else {
if(scroll_to){
$('html, body').animate({ scrollTop: $('#wizard-validation-form').offset().top }, 'slow');
}
}
}
function onSubmit(token) {
if (window.innerWidth < 1200 ) {
var destElementOffset = window.innerWidth;
iframe_resize('yes', 'yes', 'error')
}
}
// Update language captcha
// function updateGoogleCaptchaLanguage(selectedLanguage,selectorRecaptcha) {
// // Get GoogleCaptcha iframe
// var iframeGoogleCaptcha = $(selectorRecaptcha).find('iframe');
// // Get language code from iframe
// var language = iframeGoogleCaptcha.attr("src").match(/hl=(.*?)&/).pop();
// // Get selected language code from drop down
// // var selectedLanguage = $('#captcha_lang').val();
// // Check if language code of element is not equal by selected language, we need to set new language code
// if (language !== selectedLanguage) {
// // For setting new language
// iframeGoogleCaptcha.attr("src", iframeGoogleCaptcha.attr("src").replace(/hl=(.*?)&/, 'hl=' + selectedLanguage + '&'));
// }
// }
</script>
<style id="advance_css_text">
.sweet-alert[data-has-confirm-button=false][data-has-cancel-button=false] {
padding-bottom: 17px;
}
</style>
</body></html><html><head>
<title>TRAPO® CAR MATS AGENTS</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta content="width=device-width, initial-scale=1.0" name="viewport">
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=0">
<link rel="stylesheet" href="https://formbuilder.hulkapps.com/corepage/css/bootstrap.css">
<link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/sweetalert/1.1.3/sweetalert.min.css">
<link rel="stylesheet" href="//maxcdn.bootstrapcdn.com/font-awesome/4.3.0/css/font-awesome.min.css">
<link rel="stylesheet" href="https://formbuilder.hulkapps.com/corepage/css/bootstrap-datetimepicker.css">
<link rel="stylesheet" href="https://formbuilder.hulkapps.com/corepage/css/styles.css">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.6.3/css/font-awesome.min.css">
<script type="text/javascript" async="" src="https://www.gstatic.com/recaptcha/releases/JPZ52lNx97aD96bjM7KaA0bo/recaptcha__en.js"></script><script type="text/javascript" src="https://formbuilder.hulkapps.com/corepage/js/jquery.min.js"></script>
<script type="text/javascript" src="https://formbuilder.hulkapps.com/corepage/js/bootstrap.min.js"></script>
<script type="text/javascript" src="https://formbuilder.hulkapps.com/corepage/js/moment-with-locales.js"></script>
<script type="text/javascript" src="https://formbuilder.hulkapps.com/corepage/js/bootstrap-datetimepicker.js"></script>
<script type="text/javascript" src="//cdnjs.cloudflare.com/ajax/libs/sweetalert/1.1.3/sweetalert-dev.min.js"></script>
<script async="" type="text/javascript" src="https://www.google.com/recaptcha/api.js" defer=""></script>
<style id="form_builder_css">
.sa-confirm-button-container .confirm {
background-color: #f27474 !important
}
.rc-image-tile-wrapper{transition: auto !important}
.form_generater_form_div{
background: transparent;
max-width: 600px;
border: solid;
border-width: 2px;
border-color: #c7c7c7;
border-radius: 1px;
padding: 35px;
}
input,textarea, select, .image label, .file label, .form-control[disabled], .form-control[readonly] {
background: #fff;
border-radius: 2px;
border: 1px solid #ccc;
}
input:focus, textarea:focus, select:focus, .image label:focus, .file label:focus {
background: #fff;
border: 1px solid #ccc;
}
input, textarea, select, .checkbox-inline label, .checkbox-inline input[type="checkbox"] + label, .radio-inline label, .radio-inline input[type="radio"] + label, .image label,.file label{
color: #333333;
font-size: 12px;
}
.image label, .file label{
line-height: inherit;
}
div.form_submit_div button, div.form_submit_div button:hover{
color : #fff !important;
background: #333333 !important;
border-radius: 2px;
width: 100%;
font-size: 16px;
border:1px solid #333333;
}
.block_label {
color: #333333;
font-size: 14px;
}
input:-moz-placeholder {
color: #333333;
}
input::-webkit-input-placeholder {
color: #333333;
}
.radio, .checkbox-multi, .checkbox {
margin-top: 0px; margin-bottom: 10px;
}
input[type="checkbox"] + label span,input[type="radio"] + label span {
background: #fff;
border: 1px solid #ccc;
border-radius: 2px;
}
input[type="radio"]:checked + label span,input[type="checkbox"]:checked + label span {
background: #333333;
}
input[type="radio"]:checked + label span:after,input[type="checkbox"]:checked + label span:after{
color: #fff;
font-size: 14px;
}
.form_container input[type="radio"] + label span {
border-radius: 50%;
}
.infoMessage, .fileres {
color: #333333;
font-size: 14px;
}
::-webkit-input-placeholder{ color: #333333; }
:-moz-placeholder{color: #333333; }
::-moz-placeholder{color: #333333; }
:-ms-input-placeholder{color: #333333; }
fileres{
text-transform: capitalize;
}
</style>
</head>
<body>
<div id="wizard-validation-form">
<div class="formContainer">
<form action="#" method="post" id="formGeneratorForm">
<div class="form_generater_form_div">
<div class="row">
<div class="col-md-12 clearfix">
<div class="form_title_div"></div>
</div>
<div class="col-md-12 clearfix">
<div class="alert_message" style="display: block;"><div class="alert alert-danger" role="alert"><button type="button" class="close" data-dismiss="alert" aria-label="Close"><span aria-hidden="true">×</span></button>Email is required<br>Phone Number is required<br>Company Name is required<br>Message is required</div></div>
</div>
<div class="col-md-12 form_element clearfix">
<div class="row form_container">
<div class="formElement_0 form-group fadeMe text clearfix col-sm-6 select paymentCount" data-count="0"><label class="fitText block_label" for="form_input_0" style="display: block;">Type</label><select name="Type" class="form-control input0" id="form_input_0"><option value=""> Please Select </option><option value="TRAPO AGENT"> TRAPO AGENT </option><option value="TRAPO PARTNER"> TRAPO PARTNER </option></select> </div>
<div class="formElement_1 form-group fadeMe text clearfix col-sm-6 textfield paymentCount" data-count="1"><label class="fitText block_label" for="form_input_1" style="display: block;">First Name</label><input class="form-control " name="First Name" id="form_input_1" type="text" placeholder=""> </div>
<div class="formElement_2 form-group fadeMe text clearfix col-sm-6 textfield paymentCount" data-count="2"><label class="fitText block_label" for="form_input_2" style="display: block;">Last Name</label><input class="form-control" name="Last Name" id="form_input_2" type="text" placeholder=""> </div>
<div class="formElement_3 form-group fadeMe text clearfix col-sm-6 email paymentCount" data-count="3"><label class="fitText block_label" style="display: block;">Email*</label><input class="form-control required email_confirm error" id="form_input_3" name="Email" type="email" placeholder=""> </div>
<div class="formElement_4 form-group fadeMe text clearfix col-sm-6 textfield paymentCount" data-count="4"><label class="fitText block_label" style="display: block;">Phone Number*</label><input class="form-control required error" name="Phone Number" id="form_input_4" type="text" placeholder=""> </div>
<div class="formElement_5 form-group fadeMe text clearfix col-sm-6 textfield paymentCount" data-count="5"><label class="fitText block_label" style="display: block;">Company Name*</label><input class="form-control required error" name="Company Name" id="form_input_5" type="text" placeholder=""> </div>
<div class="formElement_6 form-group fadeMe text clearfix col-sm-6 textfield paymentCount" data-count="6"><label class="fitText block_label" for="form_input_6" style="display: block;">Website</label><input class="form-control" name="Website" id="form_input_6" type="text" placeholder=""> </div>
<div class="formElement_7 form-group fadeMe text clearfix col-sm-12 textarea paymentCount" data-count="7"><label class="fitText block_label" style="display: block;">Message*</label><textarea class="form-control required error" id="form_input_7" name="Message" data-max="250" data-limiting="false" style="height: 50px" placeholder=""></textarea> </div>
<div class="formElement_8 form-group fadeMe text clearfix col-sm-12 textfield paymentCount" data-count="8"><label class="fitText block_label" for="form_input_8" style="display: block;">Street Address</label><input class="form-control" name="Street Address" id="form_input_8" type="text" placeholder=""> </div>
<div class="formElement_9 form-group fadeMe text clearfix col-sm-12 textfield paymentCount" data-count="9"><label class="fitText block_label" for="form_input_9" style="display: block;">Address Line 2</label><input class="form-control" name="Address Line 2" id="form_input_9" type="text" placeholder=""> </div>
<div class="formElement_10 form-group fadeMe text clearfix col-sm-6 textfield paymentCount" data-count="10"><label class="fitText block_label" for="form_input_10" style="display: block;">City</label><input class="form-control" name="City" id="form_input_10" type="text" placeholder=""> </div>
<div class="formElement_11 form-group fadeMe text clearfix col-sm-6 textfield paymentCount" data-count="11"><label class="fitText block_label" for="form_input_11" style="display: block;">State/Province/Region</label><input class="form-control" name="State/Province/Region" id="form_input_11" type="text" placeholder=""> </div>
<div class="formElement_12 form-group fadeMe text clearfix col-sm-6 textfield paymentCount" data-count="12"><label class="fitText block_label" for="form_input_12" style="display: block;">ZIP/Postal Code</label><input class="form-control" name="ZIP/Postal Code" id="form_input_12" type="text" placeholder=""> </div>
<div class="formElement_13 form-group fadeMe text clearfix col-sm-6 select paymentCount" data-count="13"><label class="fitText block_label" for="form_input_13" style="display: block;">Country</label><select name="Country" class="form-control input13" id="form_input_13"><option value=""> Please Select </option><option value="Afghanistan"> Afghanistan </option><option value="Akrotiri"> Akrotiri </option><option value="Albania"> Albania </option><option value="Algeria"> Algeria </option><option value="American Samoa"> American Samoa </option><option value="Andorra"> Andorra </option><option value="Angola"> Angola </option><option value="Anguilla"> Anguilla </option><option value="Antarctica"> Antarctica </option><option value="Antigua and Barbuda"> Antigua and Barbuda </option><option value="Argentina"> Argentina </option><option value="Armenia"> Armenia </option><option value="Aruba"> Aruba </option><option value="Ashmore and Cartier Islands"> Ashmore and Cartier Islands </option><option value="Australia"> Australia </option><option value="Austria"> Austria </option><option value="Azerbaijan"> Azerbaijan </option><option value="Bahamas, The"> Bahamas, The </option><option value="Bahrain"> Bahrain </option><option value="Bangladesh"> Bangladesh </option><option value="Barbados"> Barbados </option><option value="Bassas da India"> Bassas da India </option><option value="Belarus"> Belarus </option><option value="Belgium"> Belgium </option><option value="Belize"> Belize </option><option value="Benin"> Benin </option><option value="Bermuda"> Bermuda </option><option value="Bhutan"> Bhutan </option><option value="Bolivia"> Bolivia </option><option value="Bosnia and Herzegovina"> Bosnia and Herzegovina </option><option value="Botswana"> Botswana </option><option value="Bouvet Island"> Bouvet Island </option><option value="Brazil"> Brazil </option><option value="British Indian Ocean Territory"> British Indian Ocean Territory </option><option value="British Virgin Islands"> British Virgin Islands </option><option value="Brunei"> Brunei </option><option value="Bulgaria"> Bulgaria </option><option value="Burkina Faso"> Burkina Faso </option><option value="Burma"> Burma </option><option value="Burundi"> Burundi </option><option value="Cambodia"> Cambodia </option><option value="Cameroon"> Cameroon </option><option value="Canada"> Canada </option><option value="Cape Verde"> Cape Verde </option><option value="Cayman Islands"> Cayman Islands </option><option value="Central African Republic"> Central African Republic </option><option value="Chad"> Chad </option><option value="Chile"> Chile </option><option value="China"> China </option><option value="Christmas Island"> Christmas Island </option><option value="Clipperton Island"> Clipperton Island </option><option value="Cocos (Keeling) Islands"> Cocos (Keeling) Islands </option><option value="Colombia"> Colombia </option><option value="Comoros"> Comoros </option><option value="Congo, Democratic Republic of the"> Congo, Democratic Republic of the </option><option value="Congo, Republic of the"> Congo, Republic of the </option><option value="Cook Islands"> Cook Islands </option><option value="Coral Sea Islands"> Coral Sea Islands </option><option value="Costa Rica"> Costa Rica </option><option value="Cote dIvoire"> Cote dIvoire </option><option value="Croatia"> Croatia </option><option value="Cuba"> Cuba </option><option value="Cyprus"> Cyprus </option><option value="Czech Republic"> Czech Republic </option><option value="Denmark"> Denmark </option><option value="Dhekelia"> Dhekelia </option><option value="Djibouti"> Djibouti </option><option value="Dominica"> Dominica </option><option value="Dominican Republic"> Dominican Republic </option><option value="Ecuador"> Ecuador </option><option value="Egypt"> Egypt </option><option value="El Salvador"> El Salvador </option><option value="Equatorial Guinea"> Equatorial Guinea </option><option value="Eritrea"> Eritrea </option><option value="Estonia"> Estonia </option><option value="Ethiopia"> Ethiopia </option><option value="Europa Island"> Europa Island </option><option value="Falkland Islands (Islas Malvinas)"> Falkland Islands (Islas Malvinas) </option><option value="Faroe Islands"> Faroe Islands </option><option value="Fiji"> Fiji </option><option value="Finland"> Finland </option><option value="France"> France </option><option value="French Guiana"> French Guiana </option><option value="French Polynesia"> French Polynesia </option><option value="French Southern and Antarctic Lands"> French Southern and Antarctic Lands </option><option value="Gabon"> Gabon </option><option value="Gambia, The"> Gambia, The </option><option value="Gaza Strip"> Gaza Strip </option><option value="Georgia"> Georgia </option><option value="Germany"> Germany </option><option value="Ghana"> Ghana </option><option value="Gibraltar"> Gibraltar </option><option value="Glorioso Islands"> Glorioso Islands </option><option value="Greece"> Greece </option><option value="Greenland"> Greenland </option><option value="Grenada"> Grenada </option><option value="Guadeloupe"> Guadeloupe </option><option value="Guam"> Guam </option><option value="Guatemala"> Guatemala </option><option value="Guernsey"> Guernsey </option><option value="Guinea"> Guinea </option><option value="Guinea-Bissau"> Guinea-Bissau </option><option value="Guyana"> Guyana </option><option value="Haiti"> Haiti </option><option value="Heard Island and McDonald Islands"> Heard Island and McDonald Islands </option><option value="Holy See (Vatican City)"> Holy See (Vatican City) </option><option value="Honduras"> Honduras </option><option value="Hong Kong"> Hong Kong </option><option value="Hungary"> Hungary </option><option value="Iceland"> Iceland </option><option value="India"> India </option><option value="Indonesia"> Indonesia </option><option value="Iran"> Iran </option><option value="Iraq"> Iraq </option><option value="Ireland"> Ireland </option><option value="Isle of Man"> Isle of Man </option><option value="Israel"> Israel </option><option value="Italy"> Italy </option><option value="Jamaica"> Jamaica </option><option value="Jan Mayen"> Jan Mayen </option><option value="Japan"> Japan </option><option value="Jersey"> Jersey </option><option value="Jordan"> Jordan </option><option value="Juan de Nova Island"> Juan de Nova Island </option><option value="Kazakhstan"> Kazakhstan </option><option value="Kenya"> Kenya </option><option value="Kiribati"> Kiribati </option><option value="Korea, North"> Korea, North </option><option value="Korea, South"> Korea, South </option><option value="Kuwait"> Kuwait </option><option value="Kyrgyzstan"> Kyrgyzstan </option><option value="Laos"> Laos </option><option value="Latvia"> Latvia </option><option value="Lebanon"> Lebanon </option><option value="Lesotho"> Lesotho </option><option value="Liberia"> Liberia </option><option value="Libya"> Libya </option><option value="Liechtenstein"> Liechtenstein </option><option value="Lithuania"> Lithuania </option><option value="Luxembourg"> Luxembourg </option><option value="Macau"> Macau </option><option value="Macedonia"> Macedonia </option><option value="Madagascar"> Madagascar </option><option value="Malawi"> Malawi </option><option value="Malaysia"> Malaysia </option><option value="Maldives"> Maldives </option><option value="Mali"> Mali </option><option value="Malta"> Malta </option><option value="Marshall Islands"> Marshall Islands </option><option value="Martinique"> Martinique </option><option value="Mauritania"> Mauritania </option><option value="Mauritius"> Mauritius </option><option value="Mayotte"> Mayotte </option><option value="Mexico"> Mexico </option><option value="Micronesia, Federated States of"> Micronesia, Federated States of </option><option value="Moldova"> Moldova </option><option value="Monaco"> Monaco </option><option value="Mongolia"> Mongolia </option><option value="Montserrat"> Montserrat </option><option value="Morocco"> Morocco </option><option value="Mozambique"> Mozambique </option><option value="Namibia"> Namibia </option><option value="Nauru"> Nauru </option><option value="Navassa Island"> Navassa Island </option><option value="Nepal"> Nepal </option><option value="Netherlands"> Netherlands </option><option value="Netherlands Antilles"> Netherlands Antilles </option><option value="New Caledonia"> New Caledonia </option><option value="New Zealand"> New Zealand </option><option value="Nicaragua"> Nicaragua </option><option value="Niger"> Niger </option><option value="Nigeria"> Nigeria </option><option value="Niue"> Niue </option><option value="Norfolk Island"> Norfolk Island </option><option value="Northern Mariana Islands"> Northern Mariana Islands </option><option value="Norway"> Norway </option><option value="Oman"> Oman </option><option value="Pakistan"> Pakistan </option><option value="Palau"> Palau </option><option value="Panama"> Panama </option><option value="Papua New Guinea"> Papua New Guinea </option><option value="Paracel Islands"> Paracel Islands </option><option value="Paraguay"> Paraguay </option><option value="Peru"> Peru </option><option value="Philippines"> Philippines </option><option value="Pitcairn Islands"> Pitcairn Islands </option><option value="Poland"> Poland </option><option value="Portugal"> Portugal </option><option value="Puerto Rico"> Puerto Rico </option><option value="Qatar"> Qatar </option><option value="Reunion"> Reunion </option><option value="Romania"> Romania </option><option value="Russia"> Russia </option><option value="Rwanda"> Rwanda </option><option value="Saint Helena"> Saint Helena </option><option value="Saint Kitts and Nevis"> Saint Kitts and Nevis </option><option value="Saint Lucia"> Saint Lucia </option><option value="Saint Pierre and Miquelon"> Saint Pierre and Miquelon </option><option value="Saint Vincent and the Grenadines"> Saint Vincent and the Grenadines </option><option value="Samoa"> Samoa </option><option value="San Marino"> San Marino </option><option value="Sao Tome and Principe"> Sao Tome and Principe </option><option value="Saudi Arabia"> Saudi Arabia </option><option value="Senegal"> Senegal </option><option value="Serbia and Montenegro"> Serbia and Montenegro </option><option value="Seychelles"> Seychelles </option><option value="Sierra Leone"> Sierra Leone </option><option value="Singapore"> Singapore </option><option value="Slovakia"> Slovakia </option><option value="Slovenia"> Slovenia </option><option value="Solomon Islands"> Solomon Islands </option><option value="Somalia"> Somalia </option><option value="South Africa"> South Africa </option><option value="South Georgia and the South Sandwich Islands"> South Georgia and the South Sandwich Islands </option><option value="Spain"> Spain </option><option value="Spratly Islands"> Spratly Islands </option><option value="Sri Lanka"> Sri Lanka </option><option value="Sudan"> Sudan </option><option value="Suriname"> Suriname </option><option value="Svalbard"> Svalbard </option><option value="Swaziland"> Swaziland </option><option value="Sweden"> Sweden </option><option value="Switzerland"> Switzerland </option><option value="Syria"> Syria </option><option value="Taiwan"> Taiwan </option><option value="Tajikistan"> Tajikistan </option><option value="Tanzania"> Tanzania </option><option value="Thailand"> Thailand </option><option value="Timor-Leste"> Timor-Leste </option><option value="Togo"> Togo </option><option value="Tokelau"> Tokelau </option><option value="Tonga"> Tonga </option><option value="Trinidad and Tobago"> Trinidad and Tobago </option><option value="Tromelin Island"> Tromelin Island </option><option value="Tunisia"> Tunisia </option><option value="Turkey"> Turkey </option><option value="Turkmenistan"> Turkmenistan </option><option value="Turks and Caicos Islands"> Turks and Caicos Islands </option><option value="Tuvalu"> Tuvalu </option><option value="Uganda"> Uganda </option><option value="Ukraine"> Ukraine </option><option value="United Arab Emirates"> United Arab Emirates </option><option value="United Kingdom"> United Kingdom </option><option value="United States"> United States </option><option value="Uruguay"> Uruguay </option><option value="Uzbekistan"> Uzbekistan </option><option value="Vanuatu"> Vanuatu </option><option value="Venezuela"> Venezuela </option><option value="Vietnam"> Vietnam </option><option value="Virgin Islands"> Virgin Islands </option><option value="Wake Island"> Wake Island </option><option value="Wallis and Futuna"> Wallis and Futuna </option><option value="West Bank"> West Bank </option><option value="Western Sahara"> Western Sahara </option><option value="Yemen"> Yemen </option><option value="Zambia"> Zambia </option><option value="Zimbabwe"> Zimbabwe </option></select> </div>
</div>
<div class="clearfix"></div>
<div class="form_submit_div text-center">
<button type="submit" class="btn">Submit <span class="price"></span></button>
</div>
</div>
</div>
</div>
</form>
</div>
<div class="after_form_submit" style="display:none;">
<div class="form_generater_form_div text-center"></div>
</div>
</div>
<script type="text/javascript">
jQuery(document).ready(function(){
var deletefile = [];
var formData = {"div_back_gradient_1":"#fff","div_back_gradient_2":"#fff","back_color":"#fff","form_title":"","form_submit":"Submit","after_submit":"clearAndAllow","after_submit_msg":"","captcha_enable":"no","label_style":"blockLabels","input_border_radius":"2","back_type":"transparent","input_back_color":"#fff","input_back_color_hover":"#fff","back_shadow":"none","label_font_clr":"#333333","input_font_clr":"#333333","button_align":"fullBtn","button_clr":"#fff","button_back_clr":"#333333","button_border_radius":"2","form_width":"600px","form_border_size":"2","form_border_clr":"#c7c7c7","form_border_radius":"1","label_font_size":"14","input_font_size":"12","button_font_size":"16","form_padding":"35","input_border_color":"#ccc","input_border_color_hover":"#ccc","btn_border_clr":"#333333","btn_border_size":"1","form_name":"TRAPO® CAR MATS AGENTS","":"enquiry.my@trapo.asia","form_emails":"enquiry.my@trapo.asia","formElements":[{"Conditions":{},"type":"select","position":0,"label":"Type","halfwidth":"yes","values":"TRAPO AGENT\nTRAPO PARTNER","elementCost":{}},{"type":"text","position":1,"label":"First Name","customClass":"","halfwidth":"yes","Conditions":{}},{"type":"text","position":2,"label":"Last Name","halfwidth":"yes","Conditions":{}},{"type":"email","position":3,"label":"Email","required":"yes","email_confirm":"yes","Conditions":{},"halfwidth":"yes"},{"Conditions":{},"type":"text","position":4,"label":"Phone Number","halfwidth":"yes","required":"yes"},{"Conditions":{},"type":"text","position":5,"label":"Company Name","halfwidth":"yes","required":"yes"},{"Conditions":{},"type":"text","position":6,"label":"Website","halfwidth":"yes"},{"type":"textarea","position":7,"label":"Message","required":"yes","Conditions":{}},{"Conditions":{},"type":"text","position":8,"label":"Street Address"},{"Conditions":{},"type":"text","position":9,"label":"Address Line 2","halfwidth":"no"},{"Conditions":{},"type":"text","position":10,"label":"City","halfwidth":"yes"},{"Conditions":{},"type":"text","position":11,"label":"State/Province/Region","halfwidth":"yes"},{"Conditions":{},"type":"text","position":12,"label":"ZIP/Postal Code","halfwidth":"yes"},{"Conditions":{},"type":"select","position":13,"label":"Country","halfwidth":"yes","values":"Afghanistan\nAkrotiri\nAlbania\nAlgeria\nAmerican Samoa\nAndorra\nAngola\nAnguilla\nAntarctica\nAntigua and Barbuda\nArgentina\nArmenia\nAruba\nAshmore and Cartier Islands\nAustralia\nAustria\nAzerbaijan\nBahamas, The\nBahrain\nBangladesh\nBarbados\nBassas da India\nBelarus\nBelgium\nBelize\nBenin\nBermuda\nBhutan\nBolivia\nBosnia and Herzegovina\nBotswana\nBouvet Island\nBrazil\nBritish Indian Ocean Territory\nBritish Virgin Islands\nBrunei\nBulgaria\nBurkina Faso\nBurma\nBurundi\nCambodia\nCameroon\nCanada\nCape Verde\nCayman Islands\nCentral African Republic\nChad\nChile\nChina\nChristmas Island\nClipperton Island\nCocos (Keeling) Islands\nColombia\nComoros\nCongo, Democratic Republic of the\nCongo, Republic of the\nCook Islands\nCoral Sea Islands\nCosta Rica\nCote dIvoire\nCroatia\nCuba\nCyprus\nCzech Republic\nDenmark\nDhekelia\nDjibouti\nDominica\nDominican Republic\nEcuador\nEgypt\nEl Salvador\nEquatorial Guinea\nEritrea\nEstonia\nEthiopia\nEuropa Island\nFalkland Islands (Islas Malvinas)\nFaroe Islands\nFiji\nFinland\nFrance\nFrench Guiana\nFrench Polynesia\nFrench Southern and Antarctic Lands\nGabon\nGambia, The\nGaza Strip\nGeorgia\nGermany\nGhana\nGibraltar\nGlorioso Islands\nGreece\nGreenland\nGrenada\nGuadeloupe\nGuam\nGuatemala\nGuernsey\nGuinea\nGuinea-Bissau\nGuyana\nHaiti\nHeard Island and McDonald Islands\nHoly See (Vatican City)\nHonduras\nHong Kong\nHungary\nIceland\nIndia\nIndonesia\nIran\nIraq\nIreland\nIsle of Man\nIsrael\nItaly\nJamaica\nJan Mayen\nJapan\nJersey\nJordan\nJuan de Nova Island\nKazakhstan\nKenya\nKiribati\nKorea, North\nKorea, South\nKuwait\nKyrgyzstan\nLaos\nLatvia\nLebanon\nLesotho\nLiberia\nLibya\nLiechtenstein\nLithuania\nLuxembourg\nMacau\nMacedonia\nMadagascar\nMalawi\nMalaysia\nMaldives\nMali\nMalta\nMarshall Islands\nMartinique\nMauritania\nMauritius\nMayotte\nMexico\nMicronesia, Federated States of\nMoldova\nMonaco\nMongolia\nMontserrat\nMorocco\nMozambique\nNamibia\nNauru\nNavassa Island\nNepal\nNetherlands\nNetherlands Antilles\nNew Caledonia\nNew Zealand\nNicaragua\nNiger\nNigeria\nNiue\nNorfolk Island\nNorthern Mariana Islands\nNorway\nOman\nPakistan\nPalau\nPanama\nPapua New Guinea\nParacel Islands\nParaguay\nPeru\nPhilippines\nPitcairn Islands\nPoland\nPortugal\nPuerto Rico\nQatar\nReunion\nRomania\nRussia\nRwanda\nSaint Helena\nSaint Kitts and Nevis\nSaint Lucia\nSaint Pierre and Miquelon\nSaint Vincent and the Grenadines\nSamoa\nSan Marino\nSao Tome and Principe\nSaudi Arabia\nSenegal\nSerbia and Montenegro\nSeychelles\nSierra Leone\nSingapore\nSlovakia\nSlovenia\nSolomon Islands\nSomalia\nSouth Africa\nSouth Georgia and the South Sandwich Islands\nSpain\nSpratly Islands\nSri Lanka\nSudan\nSuriname\nSvalbard\nSwaziland\nSweden\nSwitzerland\nSyria\nTaiwan\nTajikistan\nTanzania\nThailand\nTimor-Leste\nTogo\nTokelau\nTonga\nTrinidad and Tobago\nTromelin Island\nTunisia\nTurkey\nTurkmenistan\nTurks and Caicos Islands\nTuvalu\nUganda\nUkraine\nUnited Arab Emirates\nUnited Kingdom\nUnited States\nUruguay\nUzbekistan\nVanuatu\nVenezuela\nVietnam\nVirgin Islands\nWake Island\nWallis and Futuna\nWest Bank\nWestern Sahara\nYemen\nZambia\nZimbabwe","elementCost":{}}]};
if (typeof formData["label_font_family"] !== 'undefined') {
$("head").append("<link href='https://fonts.googleapis.com/css?family=" + formData["label_font_family"] + "' rel='stylesheet' type='text/css'>");
}
if (typeof formData["input_font_family"] !== 'undefined') {
$("head").append("<link href='https://fonts.googleapis.com/css?family=" + formData["input_font_family"] + "' rel='stylesheet' type='text/css'>");
}
var formElementCount = 0;
if((typeof formData['captcha_enable'] !== 'undefined') && (formData['captcha_enable'] == "yes")){
if((typeof formData['captcha_align'] !== 'undefined') && (formData['captcha_align'] == 'center')){
$('.form_generater_form_div .form_captcha_div').css("text-align", "center");
} else if((typeof formData['captcha_align'] !== 'undefined') && (formData['captcha_align'] == 'right')){
$('.form_generater_form_div .form_captcha_div').css("text-align", "right");
} else{
$('.form_generater_form_div .form_captcha_div').css("text-align", "left");
}
}
// Update language captcha
function updateGoogleCaptchaLanguage(selectedLanguage,selectorRecaptcha) {
// Get GoogleCaptcha iframe
var iframeGoogleCaptcha = $(selectorRecaptcha).find('iframe');
// Get language code from iframe
var language = iframeGoogleCaptcha.attr("src").match(/hl=(.*?)&/).pop();
// Get selected language code from drop down
// var selectedLanguage = $('#captcha_lang').val();
// Check if language code of element is not equal by selected language, we need to set new language code
if (language !== selectedLanguage) {
// For setting new language
iframeGoogleCaptcha.attr("src", iframeGoogleCaptcha.attr("src").replace(/hl=(.*?)&/, 'hl=' + selectedLanguage + '&'));
}
}
if((typeof formData['captcha_lang'] !== 'undefined')){
setTimeout(function(){
updateGoogleCaptchaLanguage(formData['captcha_lang'],'.form_captcha_div');
}, 200);
}
if(typeof formData['label_style'] !== 'undefined' && formData['label_style'] != 'blockLabels'){
$(".card_deails_div .form-group").each(function(index){
block_label = $(this).find('label').text();
$(this).find(':input').attr('placeholder', block_label);
$(this).find('label').css("display", "none");
});
}
iframe_resize('no', 'no', 'initial');
if(typeof formData['button_align'] !== 'undefined'){
if(formData['button_align'] == "leftBtn"){
$(".form_generater_form_div div.form_submit_div ").addClass('text-left').removeClass('text-center');
} else if(formData['button_align'] == "centerBtn"){
$(".form_generater_form_div div.form_submit_div ").addClass('text-center');
} else if(formData['button_align'] == "rightBtn"){
$(".form_generater_form_div .form_submit_div ").addClass('text-right').removeClass('text-center');
}
}
paymentDisplay();
$.each(formData['formElements'], function( index, value ) {
var type = value['type'];
var minDate = '';
var maxDate = '';
if(typeof value['minDate'] !== 'undefined'){
minDate = value['minDate'];
}
if(typeof value['maxDate'] !== 'undefined'){
maxDate = value['maxDate'];
}
if(type == "date"){
if(value['datetime'] == "time"){
$('#datetime_'+formElementCount).find(':input').datetimepicker({
format: 'LT',
ignoreReadonly: true,
allowInputToggle: true
});
} else if(value['datetime'] == "date") {
if((minDate != '') && (maxDate != '')){
$('#datetime_'+formElementCount).find(':input').datetimepicker({
format: 'MM/DD/YYYY',
minDate: minDate,
maxDate: maxDate,
ignoreReadonly: true,
allowInputToggle: true
});
} else if((minDate == '') && (maxDate == '')){
$('#datetime_'+formElementCount).find(':input').datetimepicker({
format: 'MM/DD/YYYY',
ignoreReadonly: true,
allowInputToggle: true
});
} else {
if((minDate != '')){
$('#datetime_'+formElementCount).find(':input').datetimepicker({
format: 'MM/DD/YYYY',
minDate: minDate,
ignoreReadonly: true,
allowInputToggle: true
});
} else if(maxDate != '') {
$('#datetime_'+formElementCount).find(':input').datetimepicker({
format: 'MM/DD/YYYY',
maxDate: maxDate,
ignoreReadonly: true,
allowInputToggle: true
});
}
}
} else {
if((minDate != '') && (maxDate != '')){
$('#datetime_'+formElementCount).find(':input').datetimepicker({
minDate: minDate,
maxDate: maxDate,
ignoreReadonly: true,
allowInputToggle: true
});
} else if((minDate == '') && (maxDate == '')){
$('#datetime_'+formElementCount).find(':input').datetimepicker({
ignoreReadonly: true,
allowInputToggle: true
});
} else {
if((minDate != '')){
$('#datetime_'+formElementCount).find(':input').datetimepicker({
minDate: minDate,
ignoreReadonly: true,
allowInputToggle: true
});
} else if(maxDate != '') {
$('#datetime_'+formElementCount).find(':input').datetimepicker({
maxDate: maxDate,
ignoreReadonly: true,
allowInputToggle: true
});
}
}
}
}
if(type == "newdate"){
if((minDate != '') && (maxDate != '')){
$('#newdate_'+formElementCount).find(':input').datetimepicker({
format: 'MM/DD/YYYY',
minDate: minDate,
maxDate: maxDate,
ignoreReadonly: true,
allowInputToggle: true
});
} else if((minDate == '') && (maxDate == '')){
$('#newdate_'+formElementCount).find(':input').datetimepicker({
format: 'MM/DD/YYYY',
ignoreReadonly: true,
allowInputToggle: true
});
} else {
if((minDate != '')){
$('#newdate_'+formElementCount).find(':input').datetimepicker({
format: 'MM/DD/YYYY',
minDate: minDate,
ignoreReadonly: true,
allowInputToggle: true
});
} else if(maxDate != '') {
$('#newdate_'+formElementCount).find(':input').datetimepicker({
format: 'MM/DD/YYYY',
maxDate: maxDate,
ignoreReadonly: true,
allowInputToggle: true
});
}
}
}
if(type == "time"){
$('#time_'+formElementCount).find(':input').datetimepicker({
format: 'LT',
ignoreReadonly: true,
allowInputToggle: true
});
}
if(formData['label_style'] != 'blockLabels'){
$(".formElement_"+formElementCount).each(function(index) {
if($(this).hasClass('dateTime') || $(this).hasClass('textfield') || $(this).hasClass('textarea') || $(this).hasClass('number') || $(this).hasClass('email') || $(this).hasClass('dateTime') || $(this).hasClass('newDate') || $(this).hasClass('Time')){
$(this).find('label').css("display", "none");
$(this).find(':input').attr("placeholder", $(this).find('label').text());
} else if($(this).hasClass('address')){
addressLabelChange('inlineLabels', formElementCount);
} else if($(this).hasClass('select')){
$(this).find('label').css("display", "none");
$(this).find('select > option:first-child').text($(this).find('label').text());
}
if($(this).hasClass('dateTime')){
$(this).find('label').css("display", "none");
$(this).find(':input').attr("placeholder", $(this).find('label').text());
}
});
} else {
elementHolder = '';
if(typeof value['placeholder'] !== 'undefined'){
elementHolder = value['placeholder'];
}
$(".formElement_"+formElementCount).each(function(index) {
if($(this).hasClass('textfield') || $(this).hasClass('textarea') || $(this).hasClass('number') || $(this).hasClass('email')){
$(this).find('label').css("display", "block");
$(this).find(':input').attr("placeholder", elementHolder);
} else if($(this).hasClass('address')){
addressLabelChange('blockLabels', formElementCount);
}
if($(this).hasClass('select')){
var elementHolder = (elementHolder == "") ? "Please Select" : elementHolder;
$(this).find('label').css("display", "block");
$(this).find('select > option:first-child').text(elementHolder);
}
});
}
formElementCount++;
});
$(document).on('click', '.alert_message .alert.alert-danger span', function(){
$(".alert_message").css("display", "none");
iframe_resize('no', 'no', 'error');
});
$('#stripePayment').change(function(){
paymentDisplay();
});
iframe_resize('no', 'no', 'initial');
$(document).on('click', '.form_submit_div .btn', function(e) {
e.preventDefault();
$('.form_submit_div .btn').prop('disabled',true);
$('.error').removeClass('error');
var captch_check = 1;
if(formData['captcha_enable'] == 'yes'){
var captcha_response = grecaptcha.getResponse();
if(captcha_response.length == 0){
captch_check = 0;
}
}
if(captch_check != 1){
$(".alert_message").html('<div class="alert alert-danger" role="alert"><button type="button" class="close" data-dismiss="alert" aria-label="Close"><span aria-hidden="true">×</span></button> '+ "Please provide valid captcha response" + '</div>').css("display", "block");
iframe_resize('yes', 'no', 'error');
$('.form_submit_div .btn').prop('disabled',false);
} else {
var validate = 1;
var confirmationMail = '';
var email_check = '';
var filters = [];
var validMessage = '';
$(".form_container div[class^='formElement']").each(function(){
if(!$(this).attr("id")){
if(formData['formElements'][$(this).data('count')]['required'] == 'yes'){
var required_message = " is required";
if($(this).hasClass('radio')){
if(!$(this).find("input:checked").val()){
validate = 0;
filters.push($(this).find(":input").attr('name') + required_message);
$("input[name='"+$(this).find('.block_label').text() +"']");
}
} else if($(this).hasClass('checkbox')){
if(!$(this).find(":input").is(':checked')){
validate = 0;
filters.push($(this).find(":input").attr('name') + required_message);
$(this).find(":input").addClass('error');
}
} else if($(this).hasClass('checkbox-multi')){
if($(this).find(".checkboxmulti_"+$(this).data('count')+":checkbox:checked").length <= 0){
validate = 0;
filters.push($(this).find(':input').attr('name') + required_message);
}
} else if($(this).hasClass('select')){
if($(this).find('select').val() == ''){
validate = 0;
filters.push($(this).find(":input").attr('name') + required_message);
$(this).find('select').addClass('error');
}
} else if($(this).hasClass('dateTime')){
if($(this).find(':input').val().trim() == ''){
validate = 0;
filters.push($(this).find(":input").attr('name') + required_message);
$(this).find(':input').addClass('error');
}
} else if($(this).hasClass('file')){
if(typeof fileuploaded["fileupload_"+$(this).data('count')] == 'undefined'){
validate = 0;
filters.push($(this).find(":input").attr('name') + required_message);
$(this).find('label').addClass('error');
}
if(typeof fileuploaded["fileupload_"+$(this).data('count')] !== 'undefined' && fileuploaded["fileupload_"+$(this).data('count')]['upload_type'] == 'multiple' && fileuploaded["fileupload_"+$(this).data('count')]['files'].length <= 0) {
validate = 0;
filters.push($(this).find(":input").attr('name') + required_message);
$(this).find('label').addClass('error');
}
} else if($(this).hasClass('image')){
if(typeof fileuploaded["imageupload_"+$(this).data('count')] == 'undefined'){
validate = 0;
filters.push($(this).find(":input").attr('name') + required_message);
$(this).find('label').addClass('error');
}
if(typeof fileuploaded["imageupload_"+$(this).data('count')] !== 'undefined' && fileuploaded["imageupload_"+$(this).data('count')]['upload_type'] == 'multiple' && fileuploaded["imageupload_"+$(this).data('count')]['images'].length <= 0) {
validate = 0;
filters.push($(this).find(":input").attr('name') + required_message);
$(this).find('label').addClass('error');
}
} else if($(this).hasClass('address')){
field_name = formData['formElements'][$(this).data('count')]['label'];
$(this).find(':input.required').each(function(){
if($(this).val().trim() == ''){
validate = 0;
sub_name = $(this).closest('.form-group').find('.block_label').text();
filters.push(field_name + ' - ' + sub_name + required_message);
$(this).addClass('error');
}
});
} else if($(this).hasClass('raw_html')){
//Don't Do anything, these are only for display
} else {
if($(this).find(':input').val().trim() == ''){
validate = 0;
filters.push($(this).find(":input").attr('name') + required_message);
$(this).find(':input').addClass('error');
}
}
}
if($(this).hasClass('email')){
if($(this).find(':input').val() != ""){
var cur_email_value = $(this).find(':input').val().toLowerCase();
if(!isEmail(cur_email_value)){
validate = 0;
filters.push("Provide valid email format");
validMessage = "Provide valid email format";
$(this).find(':input').addClass('error');
} else {
var blk_email = "";
if(blk_email != ''){
blocked_emails = blk_email.split(',');
$.each(blocked_emails, function( index, value ) {
cDom = value.trim();
var n = cur_email_value.endsWith("@" + cDom);
var m = cur_email_value.endsWith("." + cDom);
var last = cDom.substring(cDom.lastIndexOf("@") + 1, cDom.length);
if(n == true || m == true){
validate = 0;
validMessage = "This form does not accept addresses from " + last;
filters.push(validMessage);
}
});
}
if(email_check != ''){
email_check = email_check + ',' + cur_email_value;
} else {
email_check = cur_email_value;
}
email_check = cur_email_value;
if($(this).find(':input').hasClass('email_confirm')){
if(confirmationMail != ''){
confirmationMail = confirmationMail + ',' + cur_email_value;
} else {
confirmationMail = cur_email_value;
}
}
}
}
}
if($(this).find(':input').hasClass('url')){
if($(this).find(':input').val() != ""){
if(!validateUrl($(this).find(':input').val())){
validate = 0;
filters.push("Provide valid URL");
validMessage = "Provide valid URL";
$(this).find(':input').addClass('error');
}
}
}
if($(this).hasClass('number')){
var number_val = $(this).find(':input').val();
if(number_val != ""){
if(isNaN(parseInt(number_val))) {
validate = 0;
filters.push("Images allowed "+ $(this).find(':input').attr('name'));
validMessage = "Images allowed "+ $(this).find(':input').attr('name');
$(this).find(':input').addClass('error');
} else{
if(typeof formData['formElements'][$(this).data('count')]['maxNumber'] !== 'undefined'){
if(parseInt(number_val) > parseInt(formData['formElements'][$(this).data('count')]['maxNumber'])){
validate = 0;
validMessage = $(this).find(':input').attr('name') + " must be less than " + formData['formElements'][$(this).data('count')]['maxNumber'].toString();
filters.push($(this).find(':input').attr('name') + " must be less than " + formData['formElements'][$(this).data('count')]['maxNumber'].toString());
$(this).find(':input').addClass('error');
}
}
if(typeof formData['formElements'][$(this).data('count')]['minNumber'] !== 'undefined'){
if(parseInt(number_val) < parseInt(formData['formElements'][$(this).data('count')]['minNumber'])){
validate = 0;
validMessage = $(this).find(':input').attr('name') + " must be more than "+ formData['formElements'][$(this).data('count')]['minNumber'].toString();
filters.push($(this).find(':input').attr('name') + " must be more than "+ formData['formElements'][$(this).data('count')]['minNumber'].toString());
$(this).find(':input').addClass('error');
}
}
}
}
}
filters = $.unique(filters);
}
});
stripeToken = '';
if(validate != 1){
if(filters.length > 0){
$(".alert_message").html('<div class="alert alert-danger" role="alert"><button type="button" class="close" data-dismiss="alert" aria-label="Close"><span aria-hidden="true">×</span></button>'+filters.join('<br/>')+'</div>').css("display", "block");
} else if(validMessage != ''){
$(".alert_message").html('<div class="alert alert-danger" role="alert"><button type="button" class="close" data-dismiss="alert" aria-label="Close"><span aria-hidden="true">×</span></button>'+validMessage+'</div>').css("display", "block");
} else {
$(".alert_message").html('<div class="alert alert-danger" role="alert"><button type="button" class="close" data-dismiss="alert" aria-label="Close"><span aria-hidden="true">×</span>button> ' + "Please provide valid data" + ' </div>').css("display", "block");
}
$('html, body').animate({scrollTop: $('#wizard-validation-form').offset().top }, 'slow');
iframe_resize('yes', 'no', 'error');
$('.form_submit_div .btn').prop('disabled',false);
} else {
swal({
title: "<div class='loader' style='width:100px;height:100px;'></div> <h4> " + "Processing..." +" </h4>",
html: true,
showConfirmButton: false
});
iframe_resize('yes', 'no', 'success');
$('html, body').animate({scrollTop: $('#wizard-validation-form').offset().top }, 'slow');
var formResponse = {};
var additional_price = 0.00;
$(".form_container div[class^='formElement']").each(function(){
if((!$(this).attr("id")) && (!$(this).hasClass('label')) && (!$(this).hasClass('lineBreak')) && (!$(this).hasClass('space'))){
eCount = $(this).data('count');
fElement = formData['formElements'][eCount];
if($(this).hasClass('radio')){
submit_value = $(this).find("input:checked").val();
} else if($(this).hasClass('checkbox')){
if(!$(this).find("input").is(':checked')){
submit_value = "Off";
} else {
submit_value = "On";
}
} else if($(this).hasClass('checkbox-multi')){
var checkValues = [];
$.each($("input[name='"+fElement['label']+"']:checked"), function(){
checkValues.push($(this).val());
});
submit_value = checkValues.join(", ");
} else if($(this).hasClass('select')){
submit_value = $(this).find('select').val();
} else if($(this).hasClass('dateTime')){
submit_value = $(this).find(':input').val();
} else if($(this).hasClass('file')){
if(typeof fileuploaded["fileupload_"+eCount] !== 'undefined'){
if(fileuploaded["fileupload_"+eCount]['upload_type'] == 'multiple'){
formResponse[formData['formElements'][eCount]['label']] = fileuploaded["fileupload_"+eCount];
} else {
formResponse[formData['formElements'][eCount]['label']] = fileuploaded["fileupload_"+eCount];
}
} else {
formResponse[formData['formElements'][eCount]['label']] = '';
}
} else if($(this).hasClass('image')){
if(typeof fileuploaded["imageupload_"+eCount] !== 'undefined'){
if(fileuploaded["imageupload_"+eCount]['upload_type'] == 'multiple'){
formResponse[formData['formElements'][eCount]['label']] = fileuploaded["imageupload_"+eCount];
} else {
formResponse[formData['formElements'][eCount]['label']] = fileuploaded["imageupload_"+eCount];
}
} else {
formResponse[formData['formElements'][eCount]['label']] = '';
}
} else if($(this).hasClass('address')){
var address_array = $(this).find(':input').map(function(){
var obj = {};
obj[ this.name ] = $(this).val();
return obj;
}).get();
formResponse[fElement['label']] = address_array;
} else {
submit_value = $(this).find(':input').val();
}
if(typeof submit_value !== 'undefined'){
if(typeof formResponse[fElement['label']] !== 'undefined'){
fsArr = formResponse[fElement['label']];
if($.isArray(fsArr)){
fsArr.push(submit_value);
} else {
old_value = formResponse[fElement['label']];
formResponse[fElement['label']] = [old_value];
formResponse[fElement['label']].push(submit_value);
}
} else {
formResponse[formData['formElements'][eCount]['label']] = submit_value;
}
}
submit_value = undefined;
}
});
var payment_details = {};
var formResponseCount = 2;
/*$.each(formResponse, function(index, value) {
if(jQuery.type( value ) === "object"){
console.log(value, value.size());
} else {
if(value != 'undefined' && value.trim() != ''){
formResponseCount++;
}
}
})*/
if(formResponseCount <= 0){
swal.close();
$("#formGeneratorForm input, #formGeneratorForm textarea").first().focus();
$('.form_submit_div .btn').prop('disabled',false);
iframe_resize('yes', 'no', 'error');
return false;
} else {
$.ajax({
type:"POST",
url: "/ajaxcall/formresponse",
data: { form_uuid: "3Qe0lWb-kak2T1yNyLscsw", formResponse: JSON.stringify(formResponse), confirmationMail: confirmationMail, payment_details: payment_details, is_pro: "false" },
success:function(data){
swal.close();
$('.error').removeClass('error');
// $('html, body').animate({ scrollTop: $('#wizard-validation-form').offset().top }, 'slow');
$('span.fileres').text('');
$('#stripeToken').val('');
if(typeof data.charge_failed !== 'undefined'){
$(".alert_message").html('<div class="alert alert-danger" role="alert"><button type="button" class="close" data-dismiss="alert" aria-label="Close"><span aria-hidden="true">×</span></button>'+ data.message +'</div>').css("display", "block");
$('.form_submit_div .btn').prop('disabled',false);
} else {
window.onbeforeunload = null;
if ( window.location !== window.parent.location ) {
if(formData['after_submit'] == 'clearAndPrevent'){
$(".alert_message").html('<div class="alert alert-success" role="alert"><button type="button" class="close" data-dismiss="alert" aria-label="Close"><span aria-hidden="true">×</span></button>'+"Thank you! The form was submitted successfully."+'</div>').css("display", "block");
iframe_resize('no', 'no', 'success');
$(".alert_message .alert").fadeOut(5000, function(){
$(this).remove();
$(".alert_message").css("display", "none");
iframe_resize('yes', 'no', 'success');
});
$('#formGeneratorForm')[0].reset();
$('.form_submit_div .btn').prop('disabled',true);
iframe_resize('yes', 'no', 'success');
} else if(formData['after_submit'] == 'clearAndAllow'){
var rlurl = document.URL+'&form_sbmt=yes';
window.location.replace(rlurl);
} else if(formData['after_submit'] == 'redirect'){
if(typeof formData['after_submit_url'] !== 'undefined'){
if(typeof formData['openinnewtab'] !== 'undefined' && formData['openinnewtab'] == 'yes'){
var redirectURL = formData['after_submit_url'];
if(redirectURL == ''){
location.reload();
} else{
window.open(redirectURL, '_blank');
$(".formContainer").css("display", "none");
$(".formContainer").html('');
$(".after_form_submit .form_generater_form_div").html(formData['after_submit_msg']);
$(".after_form_submit").css("display", "block");
iframe_resize('yes', 'no', 'success');
}
} else {
var redirectURL = formData['after_submit_url'];
if(redirectURL == ''){
location.reload();
} else{
window.top.location.href = redirectURL;
}
}
} else{
location.reload();
}
} else if(formData['after_submit'] == 'hideAndmessage'){
$(".formContainer").css("display", "none");
$(".formContainer").html('');
$(".after_form_submit .form_generater_form_div").html(formData['after_submit_msg']);
$(".after_form_submit").css("display", "block");
iframe_resize('yes', 'no', 'success');
} else if(formData['after_submit'] == 'responses'){
var formResponse = jQuery.parseJSON(data['user_response']);
var htmlrender = '<style type="text/css">.after_form_submit .form_generater_form_div table{border: 1px solid #ccc;}'+
'.after_form_submit .form_generater_form_div tr{ border-bottom: 1px solid #ccc; }'+
'.after_form_submit .form_generater_form_div tr:nth-child(2n) { background: #ededed; }'+
'.after_form_submit .form_generater_form_div td {padding: 6px 5px; }'+
'</style>'+
'<h3> ' + "Your response" + ' </h3>'+
'<table class="question_content" style="background-color: #fdfdfd;" cellpadding="15" border="1" cellspacing="0" width="100%" border-collapse="collapse">';
$.each(formResponse, function(index, value){
htmlrender = htmlrender + '<tr><td><b>'+index+'</b></td><td>';
if(typeof value != 'string') {
if(value['type'] == 'image'){
if(value['upload_type'] == "multiple"){
$.each(value['images'], function(im_index, im_value){
htmlrender = htmlrender + '<a href="'+ im_value["url"]+'" target="_blank"><img src="'+ im_value["url"]+'" alt="'+index+'" width="150"></a>';
});
} else {
htmlrender = htmlrender + '<a href="'+ value["url"]+'" target="_blank"><img src="'+ value["url"]+'" alt="'+index+'" width="150" alt="image"></a>';
}
} else if(value['type'] == 'file'){
if(value['upload_type'] == "multiple"){
$.each(value['files'], function(im_index, im_value){
htmlrender = htmlrender + '<br/><a href="'+ im_value["url"]+'" target="_blank" style="margin-bottom: 10px;"> ' + "Download file" + '</a>';
});
} else {
htmlrender = htmlrender + '<a href="'+ value["url"]+'" target="_blank">' + "Download file" + '</a>';
}
} else if(typeof value["url"] !== 'undefined'){
htmlrender = htmlrender + ' <a href="'+ value["url"]+'" class="btn btn-default" target="_blank">' + "Download file" + '</a>';
} else {
$.each(value, function(index, address_value){
$.each(address_value, function(im_index, im_value){
if(im_value.trim() != ''){
htmlrender = htmlrender + im_index + ': ' + im_value + '</br>';
}
});
});
}
} else {
htmlrender = htmlrender + ' ' +value.toString();
}
htmlrender = htmlrender + '</td></tr>';
});
htmlrender = htmlrender + '</table>';
$(".formContainer").css("display", "none");
$(".formContainer").html('');
$(".after_form_submit .form_generater_form_div").html(htmlrender);
$(".after_form_submit").css("display", "block");
iframe_resize('yes', 'no', 'success');
}
} else {
if(formData['after_submit'] == 'clearAndPrevent' || formData['after_submit'] == 'redirect'){
$(".alert_message").html('<div class="alert alert-success" role="alert"><button type="button" class="close" data-dismiss="alert" aria-label="Close"><span aria-hidden="true">×</span></button>'+"Thank you! The form was submitted successfully."+'</div>').css("display", "block");
iframe_resize('no', 'no', 'success');
$(".alert_message .alert").fadeOut(5000, function(){
$(this).remove();
$(".alert_message").css("display", "none");
iframe_resize('yes', 'no', 'success');
});
$('#formGeneratorForm')[0].reset();
$('.form_submit_div .btn').prop('disabled',true);
iframe_resize('yes', 'no', 'success');
} else if(formData['after_submit'] == 'clearAndAllow'){
var rlurl = document.URL+'&form_sbmt=yes';
window.location.replace(rlurl);
$('.form_submit_div .btn').prop('disabled',false);
iframe_resize('yes', 'no', 'success');
} else if(formData['after_submit'] == 'hideAndmessage'){
$(".formContainer").css("display", "none");
$(".formContainer").html('');
$(".after_form_submit .form_generater_form_div").html(formData['after_submit_msg']);
$(".after_form_submit").css("display", "block");
iframe_resize('yes', 'no', 'success');
} else if(formData['after_submit'] == 'responses'){
var formResponse = jQuery.parseJSON(data['user_response']);
var htmlrender = '<style type="text/css">.after_form_submit .form_generater_form_div table{border: 1px solid #ccc;}'+
'.after_form_submit .form_generater_form_div tr{ border-bottom: 1px solid #ccc; }'+
'.after_form_submit .form_generater_form_div tr:nth-child(2n) { background: #ededed; }'+
'.after_form_submit .form_generater_form_div td {padding: 6px 5px; }'+
'</style>'+
'<h3> ' + "Your response" + ' </h3>'+
'<table class="question_content" style="background-color: #fdfdfd;" cellpadding="15" border="1" cellspacing="0" width="100%" border-collapse="collapse">';
$.each(formResponse, function(index, value){
htmlrender = htmlrender + '<tr><td><b>'+index+'</b></td><td>';
if(typeof value != 'string') {
if(value['type'] == 'image'){
if(value['upload_type'] == "multiple"){
$.each(value['images'], function(im_index, im_value){
htmlrender = htmlrender + '<a href="'+ im_value["url"]+'" target="_blank"><img src="'+ im_value["url"]+'" alt="'+index+'" width="150"></a>';
});
} else {
htmlrender = htmlrender + '<a href="'+ value["url"]+'" target="_blank"><img src="'+ value["url"]+'" alt="'+index+'" width="150"></a>';
}
} else if(typeof value["url"] !== 'undefined'){
htmlrender = htmlrender + ' <a href="'+ value["url"]+'" class="btn btn-default" target="_blank">' + "Download file" + '</a>';
} else {
$.each(value, function(index, address_value){
$.each(address_value, function(im_index, im_value){
if(im_value.trim() != ''){
htmlrender = htmlrender + im_index + ': ' + im_value + '</br>';
}
});
});
}
} else {
htmlrender = htmlrender + ' ' +value.toString();
}
htmlrender = htmlrender + '</td></tr>';
});
htmlrender = htmlrender + '</table>';
$(".formContainer").css("display", "none");
$(".formContainer").html('');
$(".after_form_submit .form_generater_form_div").html(htmlrender);
$(".after_form_submit").css("display", "block");
iframe_resize('yes', 'no', 'success');
}
}
var fileuploaded = {};
var htmlrender = '';
var formResponse = {};
}
},
error:function(data){
swal.close();
$(".alert_message").html('<div class="alert alert-danger" role="alert"><button type="button" class="close" data-dismiss="alert" aria-label="Close"><span aria-hidden="true">×</span></button>'+ "Error occur.Please try again after sometime." +'</div>').css("display", "block");
$('.form_submit_div .btn').prop('disabled',false);
iframe_resize('yes', 'no', 'error');
}
});
}
}
}
return false;
});
function isEmail(email) {
var regex = /^([a-zA-Z0-9_.+-])+\@(([a-zA-Z0-9-])+\.)+([a-zA-Z0-9]{2,4})+$/;
return regex.test(email);
}
function validateUrl(url) {
var urlregex = new RegExp("^(http:\/\/|https:\/\/|www.){1}([0-9A-Za-z]+\.)");
return urlregex.test(url);
}
var fileuploaded = {};
$('.dropdown-toggle').dropdown();
var width = $(window).width();
$(window).resize(function(){
if($(this).width() != width){
width = $(this).width();
iframe_resize('no', 'no', 'initial');
}
scaleCaptcha();
});
scaleCaptcha();
function scaleCaptcha(elementWidth) {
if ($(window).width() < 420) {
var reCaptchaWidth = 304;
var containerWidth = $('.form_captcha_div').width();
if (reCaptchaWidth > containerWidth) {
var captchaScale = containerWidth / reCaptchaWidth;
$('.g-recaptcha').css({
'transform': 'scale(' + captchaScale + ')',
'transform-origin': '0 0',
'-ms-transform-origin': '0 0',
' -webkit-transform-origin': '0 0'
});
} else {
$('.g-recaptcha').css({
'transform': 'scale(1)'
});
}
} else {
$('.g-recaptcha').css({
'transform': 'scale(1)'
});
}
}
$(document).on('click', '#formGeneratorForm .form_generater_form_div a[target!="_parent"]', function(e){
e.preventDefault();
var redirectURL = $(this).attr('href');
window.open(redirectURL, '_blank');
});
$('[data-toggle="tooltip"]').tooltip();
$('.paymentCount :input').change(function(){
paymentDisplay();
return false;
});
function paymentDisplay(){
var selected_price = payment_calculation(),
display_price = 'no',
currency_select = '$';
if((typeof formData['payment_integration'] != 'undefined') && (typeof formData['payment_integration']['payment_currency_symbol'] != 'undefined')){
currency_select = formData['payment_integration']['payment_currency_symbol'];
}
if((typeof formData['payment_integration'] != 'undefined') && (typeof formData['payment_integration']['show_price'] != 'undefined')){
display_price = formData['payment_integration']['show_price'];
}
if (!isNaN(selected_price)) {
if(display_price == 'yes'){
$('.form_submit_div span.price').text('(' +currency_select + '' + selected_price + ')');
} else {
$('.form_submit_div span.price').text('');
}
}
}
function conditionalHide(division_id){
if($("."+division_id).hasClass('checkbox-multi')){
$("."+division_id + ' input[type=checkbox]').prop( "checked", false).trigger('change');
} else if($("."+division_id).hasClass('checkbox')){
$("."+division_id + ' input[type=checkbox]').prop( "checked", false).trigger('change');
} else if($("."+division_id).hasClass('radio')){
$("."+division_id + ' input[type=radio]').removeAttr('checked').trigger('change');
} else if($("."+division_id).hasClass('select')){
$("."+division_id + ' select').val('').trigger('change');
}
}
function addressLabelChange(label_style, formElementCount){
if(label_style == 'inlineLabels'){
$('.formElement_'+formElementCount+' :input').each(function(){
$(this).closest('.form-group').find('label').css("display", 'none');
ship_label = $(this).closest('.form-group').find('label').text();
if(ship_label == 'Country'){
$(this).find('option:first-child').text(ship_label);
} else{
$(this).attr('placeholder', ship_label);
}
});
} else {
$('.formElement_'+formElementCount+' :input').each(function(){
$(this).closest('.form-group').find('label').css("display", 'block');
ship_label = $(this).closest('.form-group').find('label').text();
if(ship_label == 'Country'){
$(this).find('option:first-child').text('- Country -');
} else{
$(this).attr('placeholder', '');
}
});
}
}
$('.payment_element').change(function(){
var value_filled = 1;
$(".payment_element").each(function(index) {
if($(this).val().trim() == ''){
value_filled = 0;
}
});
if(value_filled == 1){
swal({
title: "<div class='loader' style='width:100px;height:100px;'></div> <h4> " + "Processing..." +" </h4>",
html: true,
showConfirmButton: false
});
Stripe.card.createToken($('#formGeneratorForm'), stripeResponseHandler);
}
});
function payment_calculation(){
var additional_price = 0.00;
$(".form_container div[class^='formElement']").each(function(){
if((!$(this).attr("id")) && ($(this).hasClass('radio') || $(this).hasClass('checkbox-multi') || $(this).hasClass('select'))){
eCount = $(this).data('count');
if($(this).hasClass('radio')){
var select_value = $(this).find("input:checked").val();
if(typeof formData['formElements'][eCount]['elementCost'] !== 'undefined' && typeof formData['formElements'][eCount]['elementCost'][select_value] !== 'undefined'){
additional_price += parseFloat(formData['formElements'][eCount]['elementCost'][select_value]);
}
} else if($(this).hasClass('checkbox-multi')){
$.each($("input[name='"+formData['formElements'][eCount]['label']+"']:checked"), function(){
if(typeof formData['formElements'][eCount]['elementCost'] !== 'undefined' && typeof formData['formElements'][eCount]['elementCost'][$(this).val()] != 'undefined'){
additional_price += parseFloat(formData['formElements'][eCount]['elementCost'][$(this).val()]);
}
});
} else if($(this).hasClass('select')){
var select_value = $(this).find('select').val();
if(typeof formData['formElements'][eCount]['elementCost'] !== 'undefined' && typeof formData['formElements'][eCount]['elementCost'][select_value] != 'undefined'){
additional_price += parseFloat(formData['formElements'][eCount]['elementCost'][select_value]);
}
}
}
});
var stripePayment = 0.00;
if(typeof formData['payment_integration'] !== 'undefined' && typeof formData['payment_integration']['payment_cost'] !== 'undefined'){
stripePayment = parseFloat(formData['payment_integration']['payment_cost']);
if(typeof formData['payment_integration']['price_change'] !== 'undefined' && formData['payment_integration']['price_change'] == 'yes' ){
if (typeof $('#stripePayment').val() !== 'undefined'){
stripePayment = parseFloat($('#stripePayment').val());
}
}
}
var combined_payment = stripePayment + additional_price;
return combined_payment.toFixed(2);
}
window.onbeforeunload = function() {
$.each(fileuploaded,function(i,val){
$.each(val,function(img,img_val){
if(img == 'id'){
$.ajax({
url: '/ajaxcall/imagedelete',
data: {image_id: val.id },
success: function(data){
}
});
}
if(img == 'images' || img == 'files'){
$.each(img_val,function(img_arr_i,img_arr_val){
image_id = img_arr_val.id;
$.ajax({
url: '/ajaxcall/imagedelete',
data: {image_id: image_id },
success: function(data){
}
});
});
}
});
});
};
/****************** Add More Element Logic ******************/
$(document).on('click , dblclick', '.add_new', function(e) {
curele = $(this).attr('data-elementcount');
ele_len = $(this).closest('.add_more_element').find('.form-group').length;
if(ele_len == 1){
$('.formElement_'+curele+':first').prepend('<span class="field-close" data-elementcount="'+curele+'"></span>')
}
duplicate_html = $('.formElement_'+curele+':first').clone();
$(this).closest('.add_more_element').find('.element_holder').append(duplicate_html).html();
iframe_resize('no', 'no', 'initial');
});
$(document).on('click', '.add_more_element .field-close', function(){
ele_len = $(this).closest('.element_holder').find('.form-group').length;
curele = $(this).attr('data-elementcount');
if(ele_len > 1){
$(this).closest('.form-group').remove();
}
if(ele_len == 2){
$('.formElement_'+curele+':first').find('.field-close').remove();
}
iframe_resize('no', 'no', 'initial');
});
iframe_resize('no', 'no', 'initial');
// if((typeof formData['captcha_lang'] !== 'undefined')){
// window.innerWidth = 512;
// setTimeout(function(){
// updateGoogleCaptchaLanguage(formData['captcha_lang'],'.form_captcha_div');
// }, 200);
// }
});
function iframe_resize(scrVal, scrl_bottom, scroll_action){
var scroll_to = false;
if(scrVal == 'yes'){
scroll_to = true;
}
if(scroll_action == 'error'){
}
if(scroll_action == 'success'){
}
if ( window.location !== window.parent.location ) {
var parenturl = (window.location != window.parent.location) ? document.referrer : document.location;
var urlArray = document.referrer.split('/');
if(urlArray.count > 3){
urlArray.pop();
urlArray.pop();
}
var url = urlArray.join('/');
var body = document.body,
height = Math.max(body.offsetHeight, body.scrollHeight);
if (parent.postMessage) {
parent.postMessage({formid: "3Qe0lWb-kak2T1yNyLscsw", height: height + 30, scroll_to: scroll_to, scrl_bottom: scrl_bottom }, url);
}
} else {
if(scroll_to){
$('html, body').animate({ scrollTop: $('#wizard-validation-form').offset().top }, 'slow');
}
}
}
function onSubmit(token) {
if (window.innerWidth < 1200 ) {
var destElementOffset = window.innerWidth;
iframe_resize('yes', 'yes', 'error')
}
}
// Update language captcha
// function updateGoogleCaptchaLanguage(selectedLanguage,selectorRecaptcha) {
// // Get GoogleCaptcha iframe
// var iframeGoogleCaptcha = $(selectorRecaptcha).find('iframe');
// // Get language code from iframe
// var language = iframeGoogleCaptcha.attr("src").match(/hl=(.*?)&/).pop();
// // Get selected language code from drop down
// // var selectedLanguage = $('#captcha_lang').val();
// // Check if language code of element is not equal by selected language, we need to set new language code
// if (language !== selectedLanguage) {
// // For setting new language
// iframeGoogleCaptcha.attr("src", iframeGoogleCaptcha.attr("src").replace(/hl=(.*?)&/, 'hl=' + selectedLanguage + '&'));
// }
// }
</script>
<style id="advance_css_text">
.sweet-alert[data-has-confirm-button=false][data-has-cancel-button=false] {
padding-bottom: 17px;
}
</style>
</body></html>