-
Notifications
You must be signed in to change notification settings - Fork 13
DataCamp Lead Form #426
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
DataCamp Lead Form #426
Conversation
…o lead form, lead form submits to Zapier
…ng tooltip on seats field
vvnkr
left a comment
There was a problem hiding this 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> |
There was a problem hiding this comment.
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?
views/shared/_leadform.ejs
Outdated
| </style> | ||
|
|
||
| <script> | ||
| $jq('.js-demo-form').on('submit', function(e) { |
There was a problem hiding this comment.
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
views/shared/_leadform.ejs
Outdated
| 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>"); |
There was a problem hiding this comment.
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
views/shared/_leadform.ejs
Outdated
| e.preventDefault(); | ||
| $jq.ajax({ | ||
| method: "POST", | ||
| url: "https://hooks.zapier.com/hooks/catch/2383820/wv86oo/", |
There was a problem hiding this comment.
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.
|
@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. |
|
LGTM now :). Can't approve changes via GitHub for some reason. |
Uh oh!
There was an error while loading. Please reload this page.