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-6a086eb185fe8').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.

Looking to earn money while you sleep? 💸 Discover the 10 best apps in 2025 to generate passive income, grow...

Want to earn money while you sleep? 🌙 Discover beginner-friendly passive income ideas you can start in 2025 to build...

Take the 7-day money challenge! 💪 Learn proven ways to earn $100 online in just one week and share your...

Struggling with self-doubt? 🚀 Discover 10 powerful and practical tips to boost your confidence instantly and start showing up as...

Want to make money fast? 💸 Here are 5 legit apps in 2025 that can help you earn extra cash...

Social media isn’t just for fun 🎯 It’s a powerful income stream! Discover how platforms like TikTok, Instagram, and YouTube...