The Accelerator program is designed specifically for professionals in the wholesale water movement industry. However, contractors are welcome to sign up! While this course wasn’t tailored exclusively for contractors, it offers valuable insights that may still benefit your work. Keep in mind that the takeaways might vary based on your specific needs and applications.
/*form specific onload functionality*/
jQuery(document).ready(function () {
if(jQuery("#form_2_1 [name='rm_payment_method']").length>0 && jQuery("#form_2_1 [name='rm_payment_method']:checked").val()=='stripe'){jQuery('#rm_stripe_fields_container_2_1').show();}
jQuery('[data-rm-unique="1"]').change(function(event) {
rm_unique_field_check(jQuery(this));
});
});
if (typeof window['rm_multipage'] == 'undefined') {
rm_multipage = {
global_page_no_form_2_1: 1
};
}
else
rm_multipage.global_page_no_form_2_1 = 1;
function gotonext_form_2_1(){
/* Making sure action attribute is empty */
jQuery("form.rmagic-form").attr("action","");
var maxpage = 1 ;
jQuery.validator.setDefaults({errorClass: 'rm-form-field-invalid-msg',
ignore:':hidden,.ignore,:not(:visible),.rm_untouched',wrapper:'div',
errorPlacement: function(error, element) {
//error.appendTo(element.closest('.rminput'));
error.appendTo(element.closest('div'));
},
rules: {
password: {
required: true,
minlength: 7
},
password_confirmation: {
required: true,
equalTo: "#rm_reg_form_pw_2_1"
},
email_confirmation: {
required: true,
equalTo: "#rm_reg_form_email_2_1"
}
},
messages: {
password_confirmation: {
equalTo: "Your passwords do not match. Please check again."
},
email_confirmation: {
equalTo: "Emails do not match"
}
}
});
var jq_prev_button = jQuery("#rm_prev_form_page_button_2_1");
var jq_next_button = jQuery("#rm_next_form_page_button_2_1");
var next_label = jq_next_button.data("label-next");
var payment_method = jQuery('[name=rm_payment_method]:checked').val();
var form_object= jQuery("#rm_form_page_form_2_1_"+rm_multipage.global_page_no_form_2_1).closest("form");
var submit_btn= form_object.find("[type=submit]:not(.rm_noscript_btn)");
var sub_label = submit_btn.data("label-sub");
form_object.find('input.rm_price_field_quantity').each(function() {
if(typeof jQuery(this).attr('min') == 'undefined') {
jQuery(this).attr('min', 0);
}
});
if(form_object.find('.rm_privacy_cb').is(':visible') && !form_object.find('.rm_privacy_cb').prop('checked')){
//form_object.find('.rm_privacy_cb').trigger('change');
form_object.find('.rm_privacy_cb').focus();
form_object.find('.rm_privacy_cb').parent().parent().siblings('div.rm-form-error-message').show();
return false;
}
if(typeof payment_method == 'undefined' || payment_method != 'stripe')
{
elements_to_validate = jQuery("#rm_form_page_form_2_1_"+rm_multipage.global_page_no_form_2_1+" :input").not('#rm_stripe_fields_container_2_1 :input');
}
else
var elements_to_validate = jQuery("#rm_form_page_form_2_1_"+rm_multipage.global_page_no_form_2_1+" :input");
if(elements_to_validate.length > 0)
{
var valid = elements_to_validate.valid();
elements_to_validate.each(function(){
var if_mobile= jQuery(this).attr('data-mobile-intel-field');
if(if_mobile){
var tel_error = rm_toggle_tel_error(this.dataset.validnumber,jQuery(this),jQuery(this).data('error-message'));
if(tel_error){
valid= false;
}
else
{
jQuery(this).val(this.dataset.fullnumber);
}
}
});
if(!valid)
{
setTimeout(function(){ submit_btn.prop('disabled',false); }, 1000);
var error_element= jQuery(document).find("input.rm-form-field-invalid-msg")[0];
if(error_element){
error_element.focus();
}
return false;
}
else{
if(maxpage==rm_multipage.global_page_no_form_2_1){
return true;
}
}
} else{
if(maxpage==rm_multipage.global_page_no_form_2_1){
return true;
}
}
/* Server validation for Username and Email field */
for(var i=0;i=maxpage){
submit_btn.prop('value',sub_label);
submit_btn.addClass('rm-submit-btn-show');
}
else{
submit_btn.prop('value','Next');
submit_btn.removeClass('rm-submit-btn-show');
}
/*skip blank form pages*/
/*while(jQuery("#rm_form_page_form_2_1_"+rm_multipage.global_page_no_form_2_1+" :input").length == 0)
{
if(maxpage = maxpage){
jq_next_button.attr("value", sub_label);
}
if(maxpage 0 && rm_multipage.global_page_no_form_2_1>=1){
jq_prev_button.show();
}
if(rm_multipage.global_page_no_form_2_1 == maxpage){
return false;
}
if(maxpage=='1'){
return true;
}
return false;
}
function gotoprev_form_2_1(){
var maxpage = 1 ;
var jq_prev_button = jQuery("#rm_prev_form_page_button_2_1");
var jq_next_button = jQuery("#rm_next_form_page_button_2_1");
//var sub_label = jq_next_button.data("label-sub");
var next_label = jq_next_button.data("label-next");
var form_object= jQuery("#rm_form_page_form_2_1_"+rm_multipage.global_page_no_form_2_1).closest("form");
var submit_btn= form_object.find("[type=submit]:not(.rm_noscript_btn)");
var sub_label = submit_btn.data("label-sub");
/*
if(form_object.find('.rm_privacy_cb').is(':visible') && !form_object.find('.rm_privacy_cb').prop('checked')){
//form_object.find('.rm_privacy_cb').trigger('change');
form_object.find('.rm_privacy_cb').focus();
form_object.find('.rm_privacy_cb').parent().parent().siblings('div.rm-form-error-message').show();
return false;
}
*/
rm_multipage.global_page_no_form_2_1--;
jq_next_button.attr('type','button');
if(maxpage==rm_multipage.global_page_no_form_2_1){
submit_btn.prop('value',sub_label);
submit_btn.addClass('rm-submit-btn-show');
}
else{
submit_btn.prop('value','Next');
submit_btn.removeClass('rm-submit-btn-show');
}
/*skip blank form pages*/
while(jQuery("#rm_form_page_form_2_1_"+rm_multipage.global_page_no_form_2_1+" :input,.rm-total-price ").length == 0)
{
if(1 >= rm_multipage.global_page_no_form_2_1)
{
if(jQuery("#rm_form_page_form_2_1_"+rm_multipage.global_page_no_form_2_1+" :input,.rm-total-price ").length == 0){
rm_multipage.global_page_no_form_2_1 = 1;
//jq_prev_button.prop('disabled',true);
return;
}
else
break;
}
rm_multipage.global_page_no_form_2_1--;
}
if(rm_multipage.global_page_no_form_2_1 <= maxpage-1)
jq_next_button.attr("value", next_label);
jQuery(".rmformpage_form_2_1").each(function (){
var visibledivid = "rm_form_page_form_2_1_"+rm_multipage.global_page_no_form_2_1;
if(jQuery(this).attr('id') == visibledivid){
jQuery(this).show();
}
else
jQuery(this).hide();
});
jQuery('.rmformpage_form_2_1').find(':input').filter(':visible').eq(0).focus();
if(rm_multipage.global_page_no_form_2_1 <= 1)
{
rm_multipage.global_page_no_form_2_1 = 1;
// jq_prev_button.prop('disabled',true);
}
jQuery('#rmagic-progressbar').animate({
scrollTop: (jQuery('.rmformpage_form_2_1').first().offset().top)
},500);
jQuery('ul#rmagic-progressbar').children('li').each(function(index) {
if(!jQuery(this).next().hasClass('active')) {
jQuery(this).removeClass('active');
return false;
}
});
if(rm_multipage.global_page_no_form_2_1==1){
jq_prev_button.hide();
submit_btn.prop('disabled',false);
}
}
var players = [];
function onYouTubePlayerAPIReady() {
// create the global player from the specific iframe (#video)
var pre_id = '';
jQuery(".allow-autoplay").each(function(){
if(pre_id!=jQuery(this).attr("id")){
players.push(new YT.Player(jQuery(this).attr("id")));
}
pre_id = jQuery(this).attr("id");
});
}
jQuery(document).ready(function(){
var videosArr = [];
var pre_id = '';
jQuery(".allow-autoplay").each(function(i){
if(pre_id!=jQuery(this).attr("id")){
videosArr[jQuery(this).attr("id")] = i;
}
pre_id = jQuery(this).attr("id");
});
jQuery('.buttonarea input').click(function(){
setTimeout(function(){
jQuery(".rmformpage_form_2_1").each(function(){
if(jQuery(this).css('display')=='block'){
var page_video_id= jQuery(this).attr("id");
if(jQuery('#'+page_video_id+' .allow-autoplay').length){
players[videosArr[jQuery('#'+page_video_id+' .allow-autoplay').attr('id')]].playVideo();
}
}
});
}, 300);
});
});
label span.required { color: #B94A48; }span.help-inline, span.help-block { color: #888; font-size: .9em; font-style: italic; }jQuery(document).ready(function() { jQuery("#form_2_1").bind("submit", function(){
//jQuery(this).find("input[name=rm_slug]").attr("value",jQuery(this).find("input[name=submit]").attr("value"));
jQuery(this).find("input[type=submit]").attr("disabled", "disabled");
});
jQuery("#rm_reg_form_email_2_1").change(function(){
var data = {
'action': 'rm_user_exists',
'rm_sec_nonce': '92d54b57a2',
'rm_slug': 'rm_user_exists',
'email': jQuery(this).val(),
'attr': 'data-rm-valid-email',
'form_id':"2"
};
rm_user_exists(this,rm_ajax_url,data);
});
});