Skip to content

Conversation

@jaredsilver
Copy link
Contributor

@jaredsilver jaredsilver commented Jul 18, 2018

screen shot 2018-07-18 at 4 47 25 pm

@jaredsilver jaredsilver self-assigned this Jul 18, 2018
@jaredsilver jaredsilver changed the title [WIP] DataCamp Lead Form DataCamp Lead Form Jul 18, 2018
@jaredsilver jaredsilver requested a review from vvnkr July 18, 2018 20:54
Copy link

@vvnkr vvnkr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure if it is something I did wrong but it seems like the form is not submitting correctly.

Form looks ok and is validated so that's nice.

<input type="text" name="company" id="company" required />
</div>
<div class="demo-modal__form-group">
<label for="seats">Number of Seats <i class="fa fa-question-circle js-phone-label-question-mark" aria-hidden="false" title="" data-original-title="How many people at your company do you think might be interested in learning R at work? (A rough estimate is totally fine!)"></i></label>
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This doesn't seem to be working when I test it locally?

</style>

<script>
$jq('.js-demo-form').on('submit', function(e) {
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

getting $jq is not defined error when testing locally

url: "https://hooks.zapier.com/hooks/catch/2383820/wv86oo/",
data: $('.js-demo-form').serializeArray()
}).done(function(msg) {
$('.js-demo-form').html("<div class='demo-form__success'><h3>Thanks!</h3><p>We'll be in touch.</p></div>");
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Didn't see this feedback when testing locally, I just got redirected to the homepage with the form fields filled in as query variables in the URL

e.preventDefault();
$jq.ajax({
method: "POST",
url: "https://hooks.zapier.com/hooks/catch/2383820/wv86oo/",
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just one link? Might be better to have a separate link for development/staging to test it out. Not critical though.

@jaredsilver
Copy link
Contributor Author

@vincentvankrunkelsven Yikes, good catch! Not sure why it was ever working for me locally. Moved the JavaScript to the appropriate location, and now it should work again.

@vvnkr
Copy link

vvnkr commented Jul 30, 2018

LGTM now :). Can't approve changes via GitHub for some reason.

@jaredsilver jaredsilver merged commit 463b9ab into master Jul 30, 2018
@jaredsilver jaredsilver deleted the leadform branch July 30, 2018 08:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants