[tcb-script type=”text/javascript” src=”https://code.jquery.com/jquery-2.2.4.min.js”][/tcb-script][tcb-script type=”text/javascript” src=”https://cdnjs.cloudflare.com/ajax/libs/jquery-validate/1.15.0/jquery.validate.min.js”][/tcb-script]
Which of the following best describes you?
I already own a profitable business
Wantrapreneur with no profitable business
Thinking about becoming an entrepreneur
Next
What is your name?
Previous Next
What is your email address?
Previous Next
What is your current monthly income level?
$1,000/mo or less $1,001/mo to $3,000/mo $3,001/mo – $5,000/mo Over $5,000/mo Previous Next
What’s your desired monthly revenue?
Previous Next
, what do you feel is your biggest obstacle to hitting your monthly revenue goal?
Previous Next
, how willing and able are you to invest in the growth of your business?
I do not have the financial resources to invest in building a business. I have the financial resources to invest into building my business Previous Next
, when will you be ready to start your new business?
Previous Next
What is your call preference?
Zoom Call
Previous Submit
[tcb-script type=”text/javascript”]/** * @name Multi-step form – WIP * @description Prototype for basic multi-step form * @deps jQuery, jQuery Validate */jQuery(“#monthly-revenue-next”).click(function () { var name = jQuery(“#name”).val(); jQuery(“.name-container”).html(name);});var app = { init: function () { this.cacheDOM(); this.setupAria(); this.nextButton(); this.prevButton(); this.validateForm(); this.startOver(); this.editForm(); this.killEnterKey(); this.handleStepClicks(); }, cacheDOM: function () { if ($(“.multi-step-form”).size() === 0) { return; } this.$formParent = $(“.multi-step-form”); this.$form = this.$formParent.find(“form”); this.$formStepParents = this.$form.find(“fieldset”), this.$nextButton = this.$form.find(“.btn-next”); this.$prevButton = this.$form.find(“.btn-prev”); this.$editButton = this.$form.find(“.btn-edit”); this.$resetButton = this.$form.find(“[type=’reset’]”); this.$stepsParent = $(“.steps”); this.$steps = this.$stepsParent.find(“button”); }, htmlClasses: { activeClass: “active”, hiddenClass: “hidden”, visibleClass: “visible”, editFormClass: “edit-form”, animatedVisibleClass: “animated fadeIn”, animatedHiddenClass: “animated fadeOut”, animatingClass: “animating” }, setupAria: function () { this.$formStepParents.eq(0).attr(“aria-hidden”, false); this.$formStepParents.not(“:first”).attr(“aria-hidden”, true); app.handleAriaExpanded(); }, nextButton: function () { this.$nextButton.on(“click”, function (e) { e.preventDefault(); var $this = $(this), currentParent = $this.closest(“fieldset”), nextParent = currentParent.next(); if (app.checkForValidForm()) { currentParent.removeClass(app.htmlClasses.visibleClass); app.showNextStep(currentParent, nextParent); } }); }, prevButton: function () { this.$prevButton.on(“click”, function (e) { e.preventDefault(); var $this = $(this), currentParent = $(this).closest(“fieldset”), prevParent = currentParent.prev(); currentParent.removeClass(app.htmlClasses.visibleClass); app.showPrevStep(currentParent, prevParent); }); }, showNextStep: function (currentParent, nextParent) { currentParent .addClass(app.htmlClasses.hiddenClass) .attr(“aria-hidden”, true); nextParent .removeClass(app.htmlClasses.hiddenClass) .addClass(app.htmlClasses.visibleClass) .attr(“aria-hidden”, false); nextParent.find(“:input”).first().focus(); app.handleState(nextParent.index()); app.handleAriaExpanded(); }, showPrevStep: function (currentParent, prevParent) { currentParent .addClass(app.htmlClasses.hiddenClass) .attr(“aria-hidden”, true); prevParent .removeClass(app.htmlClasses.hiddenClass) .addClass(app.htmlClasses.visibleClass) .attr(“aria-hidden”, false); prevParent.find(“:input”).first().focus(); app.handleState(prevParent.index()); app.handleAriaExpanded(); }, handleAriaExpanded: function () { $.each(this.$nextButton, function (idx, item) { var controls = $(item).attr(“aria-controls”); if ($(“#” + controls).attr(“aria-hidden”) == “true”) { $(item).attr(“aria-expanded”, false); } else { $(item).attr(“aria-expanded”, true); } }); $.each(this.$prevButton, function (idx, item) { var controls = $(item).attr(“aria-controls”); if ($(“#” + controls).attr(“aria-hidden”) == “true”) { $(item).attr(“aria-expanded”, false); } else { $(item).attr(“aria-expanded”, true); } }); }, validateForm: function () { this.$form.validate({ ignore: “:hidden”, errorElement: “span”, errorClass: “error-text”, errorPlacement: function (error, element) { if (element.attr(“type”) == “radio”) { error.insertBefore(element); } else { error.insertAfter(element); } }, invalidHandler: function (event, validator) { $.each(validator.errorList, function (idx, item) { if (idx === 0) { $(item.element).focus(); } $(item.element).attr({ “aria-invalid”: true, “aria-required”: true }); }) }, submitHandler: function (form) { } }); }, checkForValidForm: function () { if (this.$form.valid()) { return true; } }, startOver: function () { var $parents = this.$formStepParents, $firstParent = this.$formStepParents.eq(0), $formParent = this.$formParent, $stepsParent = this.$stepsParent; this.$resetButton.on(“click”, function (e) { $parents .removeClass(app.htmlClasses.visibleClass) .addClass(app.htmlClasses.hiddenClass) .eq(0).removeClass(app.htmlClasses.hiddenClass) .eq(0).addClass(app.htmlClasses.visibleClass); $formParent.removeClass(app.htmlClasses.editFormClass); app.handleState(0); app.setupAria(); setTimeout(function () { $firstParent.focus(); }, 200); }); }, handleState: function (step) { this.$steps.eq(step).prevAll().removeAttr(“disabled”); this.$steps.eq(step).addClass(app.htmlClasses.activeClass); if (step === 0) { this.$steps .removeClass(app.htmlClasses.activeClass) .attr(“disabled”, “disabled”); this.$steps.eq(0).addClass(app.htmlClasses.activeClass) } }, editForm: function () { var $formParent = this.$formParent, $formStepParents = this.$formStepParents, $stepsParent = this.$stepsParent; this.$editButton.on(“click”, function () { $formParent.toggleClass(app.htmlClasses.editFormClass); $formStepParents.attr(“aria-hidden”, false); $formStepParents.eq(0).find(“input”).eq(0).focus(); app.handleAriaExpanded(); }); }, killEnterKey: function () { $(document).on(“keypress”, “:input:not(textarea,button)”, function (event) { return event.keyCode != 13; }); }, handleStepClicks: function () { var $stepTriggers = this.$steps, $stepParents = this.$formStepParents; $stepTriggers.on(“click”, function (e) { e.preventDefault(); var btnClickedIndex = $(this).index(); $stepTriggers.nextAll() .removeClass(app.htmlClasses.activeClass) .attr(“disabled”, true); $(this) .addClass(app.htmlClasses.activeClass) .attr(“disabled”, false) $stepParents .removeClass(app.htmlClasses.visibleClass) .addClass(app.htmlClasses.hiddenClass) .attr(“aria-hidden”, true); $stepParents.eq(btnClickedIndex) .removeClass(app.htmlClasses.hiddenClass) .addClass(app.htmlClasses.visibleClass) .attr(“aria-hidden”, false) .focus(); }); }};app.init();[/tcb-script][tcb-script type=”text/javascript”]jQuery(document).ready(function () { /** STEP-7 “Next” button (ONLY CHANGE IS THE REDIRECT URL) **/ jQuery(“#hway-btn”).click(function (e) { var name = jQuery(“#name”).val(); var email = jQuery(“#email”).val(); $data = { “name”: name, “email”: email, “survey-title”: “Ultimate Survey” }; if (jQuery(‘#hway-2’).is(‘:checked’)) { jQuery(“#survey-form”).hide(); jQuery(“#loader_container”).show(); e.preventDefault(); $.ajax({ url: “https://hooks.zapier.com/hooks/catch/911460/oepxpix/”, type: “POST”, data: $data, success: function () { /* ───── ONLY THIS LINE CHANGED ───── */ document.location.href = “https://www.dropshiplifestyle.com/schedule-confirm-ultimate/?first_name=” + encodeURIComponent(name) + “&email=” + encodeURIComponent(email); } }); console.log($data); } else { console.log(“Don’t Redirect”); } }); /** reveal/hide extra email fields **/ $(“input[name$=’call-preference’]”).click(function () { $(“#email-container”).toggle($(this).val() === “Email”); }); /** Submit button simply triggers form.submit() **/ $(“#submit-form”).click(function () { $(“#survey-form”).submit(); }); /** POST whole form to Zapier on submit **/ $(“#survey-form”).submit(function (e) { e.preventDefault(); var name = $(“#name”).val(); var email = $(“#email”).val(); var email_addresss = $(“#email_address”).val(); var note = $(“#note”).val(); var email_hide = $(“input[name=’call-preference’]:checked”).val(); if (email_hide == “Email”) { $.ajax({ url: “https://hooks.zapier.com/hooks/catch/911460/bmccfci”, type: “POST”, data: { email_addresss: email_addresss, note: note }, success: function () { $.ajax({ url: “https://hooks.zapier.com/hooks/catch/911460/og16mj6/”, type: “POST”, data: $(“#survey-form”).serialize(), success: function () { document.location.href = “https://dropshiplifestyle.com/schedule-confirm-ultimate/?first_name=” + encodeURIComponent(name) + “&email=” + encodeURIComponent(email); } }); } }); } else { $.ajax({ url: “https://hooks.zapier.com/hooks/catch/911460/og16mj6/”, type: “POST”, data: $(“#survey-form”).serialize(), success: function () { document.location.href = “https://dropshiplifestyle.com/schedule-confirm-ultimate/?first_name=” + encodeURIComponent(name) + “&email=” + encodeURIComponent(email); } }); } });});[/tcb-script]
