function validateForm() { var validator = jQuery('#form-40080').validate({ errorPlacement: function (error, element) { console.log(element); error.insertAfter(element.parent()); /*if (element.attr("type") == "radio" || element.attr("type") == "checkbox" ) { error.insertAfter(element.parent()); } else { error.insertAfter(element); }*/ }
}); var $form = jQuery('#form-40080').find('input,select,textarea'); var validForm = true; $form.each(function () { if (!validator.element(this)) { validForm = false; jQuery(this).parent('.form-group').removeClass('has-success').addClass('has-error'); } else { jQuery(this).parent('.form-group').removeClass('has-error').addClass('has-success'); } }); return validForm; }
jQuery(function ($) {
let $form = $('#form-40080'); const auto_fill = 0;
if(auto_fill) { $form.find('.form-control').each(function () { if($(this).attr('type') !== 'hidden') $(this).val(localStorage.getItem($(this).attr('id'))); }); }
let submit_btn_text; let next_part_id; let this_part_id;
let set_show = {display: 'block'}; let set_hide = {display: 'none'}; let validator = $form.validate(); let validInput = true;
let submit_button_label = "Submit Form"; let submit_button_busy_label = "Processing...";
$('.nav-wizard li a').on('click', function () { if ($(this).parent('li').hasClass('disabled')) return false; });
$('input,select,textarea').on('change', function () { var validator = $form.validate(); if (!validator.element(this)) { $(this).parent('.form-group').removeClass('has-success').addClass('has-error'); } else { $(this).parent('.form-group').removeClass('has-error').addClass('has-success'); } });
$('.change-part').on('click', function () { next_part_id = $(this).attr('data-next'); this_part_id = $(this).attr('data-parent');
/* Pre validate */ validInput = true; var $inputs = $('#' + this_part_id).find("input,select,textarea"); $inputs.each(function () { if (!validator.element(this)) { validInput = false; $(this).parent('.form-group').removeClass('has-success').addClass('has-error'); } else { $(this).parent('.form-group').removeClass('has-error').addClass('has-success'); } });
if (validInput == true) { $('.liveforms-nav-wizard li').removeClass('active'); $('#' + next_part_id + '_crumb').removeClass('disabled').addClass('active'); $(this).parent('.form-group').removeClass('has-error').addClass('has-success'); $('#' + this_part_id).removeClass('active'); $('#' + next_part_id).addClass('active');
} else {
} });
/*ajax submit*/ var options = { url: 'https://successlifeint.com/?action=submit_form', beforeSubmit: function (arr, $_form, options) { $form.find('button[type=submit]').html(submit_button_busy_label); $('#formarea').addClass('blockui'); if(auto_fill) { $form.find('.form-control').each(function () { localStorage.setItem($(this).attr('id'), $(this).val()); }) } }, success: function (response) {
$('#formarea').removeClass('blockui'); $form.find('button[type=submit]').html(submit_button_label); if ($('#formarea .tab-pane').length > 1) { $('#' + this_part_id).css(set_hide); $('#form_part_0').css(set_show); }
if (response.action === 'success') { var msg = "
"; $('#formarea').html(msg); if (response.redirect_to !== undefined) { var rmsg = "
"; $('#formarea').append(rmsg); setTimeout(function () { location.href = response.redirect_to; }, 4000); }
} else if (response.action === 'error') { $('#formarea').append("
"); } else { if (response.action === 'payment') { $('#formarea').html(response.paymentform); } else {
showAlerts([response.message], 'danger'); } } }, error: function (res) { console.log(res); } }; $form.on('submit', function (e) { e.preventDefault(); if (validateForm()) { $form.find('button[type=submit]').html(submit_button_busy_label); $(this).ajaxSubmit(options); } return false; });
$('.conditioned').each(function () { var cur_field_id = $(this).attr('id'); cur_conditioned_fields = $(this).data('cond-fields'); cur_cond_fields = cur_conditioned_fields.split('|'); for (i = 0; i < cur_cond_fields.length; i++) { var cond_field = cur_cond_fields[i].split(':'); addConditionClass(jQuery('#' + cond_field[0]), cur_field_id); } $('.cond_filler_' + cur_field_id).each(function () { if ($(this).attr('type') == 'checkbox' || $(this).attr('type') == 'radio') { $(this).on('change', function () { applyRule(cur_field_id); }); } else if ($(this).attr('type') == 'text' || $(this).attr('type') == 'email') { $(this).on('keyup', function () { applyRule(cur_field_id); }); } else { $(this).on('change', function () { applyRule(cur_field_id); }); } }); }); function showAlerts(msgs, type) { jQuery('.formnotice').slideUp(); alert_box = '
'; jQuery('#form-691dfe351399c').append(alert_box);
}
function addConditionClass(field_id, cond_class) { jQuery(field_id).each(function () { if (jQuery(this).is('input') || jQuery(this).is('select')) jQuery(this).addClass('cond_filler_' + cond_class); jQuery(this).children().each(function () { addConditionClass(jQuery(this), cond_class); }) }); return false; }
function compareRule(cmp_operator, cmp_value, input_value) { var comp_res = false; switch (cmp_operator) { case 'is': comp_res = input_value === cmp_value; break; case 'is-not': comp_res = input_value !== cmp_value; break; case 'less-than': comp_res = input_value < cmp_value; break; case 'greater-than': comp_res = input_value > cmp_value; break; case 'starts-with': comp_res = input_value.indexOf(cmp_value) === 0; break; case 'contains': comp_res = input_value.indexOf(cmp_value) !== -1; break; case 'ends-with': comp_res = input_value.indexOf(cmp_value) === (input_value.length - cmp_value.length); break; default: comp_res = false; break;
}
return comp_res; }
function applyRule(field_id) {
var this_conditions = jQuery('#' + field_id).data('cond-fields').split('|'); var this_action = jQuery('#' + field_id).data('cond-action').split(':'); var tmp_res = false; var match_all = this_action[1] === 'all'; var matched = null;
$(this_conditions).each(function (index, condition) { condition = condition.split(":"); var compare_field = condition[0]; var operator = condition[1]; var compare_with = condition[2]; if (compare_field !== '') { var input_value = 'not-found'; var input_field = $('#' + compare_field).find('.cond_filler_' + field_id); if (input_field[0].type === 'radio' || input_field[0].type === 'checlbox') input_value = $('#' + compare_field + ' .cond_filler_' + field_id + ':checked').val(); else input_value = input_field.val(); if (matched === null) matched = compareRule(operator, compare_with, input_value); else { if (match_all) matched = matched && compareRule(operator, compare_with, input_value); else matched = matched || compareRule(operator, compare_with, input_value); } } });
if (matched) { jQuery('#' + field_id).removeClass('hide'); } else { jQuery('#' + field_id).addClass('hide'); } }
});

Greetings to you all, am very happy to be part of this affiliate marketing business. Am Happy to be part of successlife.

Successlife is a life changer

Wowww iam new here but love the platform

Successlife is so amazing. A great pleasure for me to have and be part of this opportunity.

Discover how to make money online by reading articles on SuccessLife. Earn up to $1 daily with simple tasks, flexible...

Start earning money online with SuccessLife by selling fashionable shoes and clothes. Learn how to build your brand, attract buyers,...
Le scrutin présidentiel en Côte d’Ivoire s’est déroulé dans un climat tendu. Plusieurs figures majeures de l’opposition ont été exclues...

Après les élections du 25 octobre, le dépouillement des bulletins de vote a débuté en Côte d’Ivoire. Le président sortant...

Refer friends to SuccessLife and earn $0.02 to $1 per signup! Learn how to make daily income online just by...

Looking for an easy way to make money online? Learn how to earn $0.04–$1 per article daily by reading and...

Money, opportunities, and success always follow value. Learn how to increase your worth, grow your influence, and make yourself too...

The internet is creating new millionaires every day. Discover two powerful online business opportunities you can start right now —...

Wealth doesn’t start with money — it starts with mindset and discipline. Discover seven powerful habits that rich people use...

Learn how to build genuine confidence rooted in purpose and faith — and how divine favour can attract the right...

Discover how you can make money online selling cars through SuccessLife. Learn the steps, tools, and mindset needed to earn...
Discover how to make money online with SuccessLife. Learn how you can earn daily from your phone or laptop through...

Discover how to start your own online clothing and shoe business with SuccessLife. Learn how to earn money selling trendy...

Discover how to make money online by reading articles on SuccessLife. Earn up to $1 daily with simple tasks, flexible...

Start earning money online with SuccessLife by selling fashionable shoes and clothes. Learn how to build your brand, attract buyers,...

Refer friends to SuccessLife and earn $0.02 to $1 per signup! Learn how to make daily income online just by...