-
-
Notifications
You must be signed in to change notification settings - Fork 222
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
Updated Hubspot Request-a-Demo form #35828
base: master
Are you sure you want to change the base?
Conversation
<input type="text" | ||
name="company" | ||
data-bind="textInput: company" | ||
class="form-control"> |
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.
<input type="text" | |
name="company" | |
data-bind="textInput: company" | |
class="form-control"> | |
<input | |
class="form-control" | |
type="text" | |
name="company" | |
data-bind="textInput: company" | |
/> |
<input type="text" | ||
name="company" | ||
data-bind="textInput: jobtitle" | ||
class="form-control"> |
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.
https://www.commcarehq.org/styleguide/b5/html/
<input type="text" | |
name="company" | |
data-bind="textInput: jobtitle" | |
class="form-control"> | |
<input | |
class="form-control" | |
type="text" | |
name="company" | |
data-bind="textInput: jobtitle" | |
/> |
name="phone" | ||
data-bind="textInput: phone" | ||
class="form-control"> | ||
<select name="language" |
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.
data-bind="textInput: skype__c" | ||
class="form-control"> | ||
</div> | ||
<select name="discoverySource" |
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.
</label> | ||
<div class="controls"> | ||
<input type="text" | ||
name="preferred_whatsapp_number" | ||
data-bind="textInput: preferred_whatsapp_number" | ||
name="otherSource" |
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.
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.
please clean up the HTML formatting. otherwise good
The comments should be addressed in 3cf6cb3. However, I realize that there is a boostrap5 version of this form that I believe is unused, and I have not incorporated this PRs changes into that form. I tried unsuccessfully to load the bootstrap5 form to verify my changes there. Is there any easy way to handle this, or can we skip the bootstrap5 form for now? |
}); | ||
|
||
self.isLanguageFieldValid = ko.computed(function () { | ||
return !self.showPreferredLanguage() || !!self.language__c(); | ||
self.isDiscoverySourceValid = ko.computed(function () { |
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.
It looks like this isn't being used anymore.
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.
Thanks for identifying this bug. The discovery source is a new field, and it was intended to be checked prior to submitting the form. Fixed in 3ed301f
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.
I'm confused - it looks like c2ce697 intentionally removes the validity check. If you're restoring the validity check, shouldn't you also restore the asterisk so the user knows the field is required?
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.
you're right :-( reverting (did a force push to remove the commit). e4b028e removes the unnecessary check
@@ -44,28 +44,15 @@ hqDefine('analytix/js/hubspot', [ | |||
* Activates the Hubspot Request Demo form | |||
*/ | |||
_utils.loadDemoForm = function () { | |||
let isTrial = _get('isDemoTrial'), | |||
isVariant = _get('demoABv2') && _get('demoABv2').version === 'variant', |
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.
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.
I did not feel comfortable doing this. When I investigated and saw that the test also affects Kissmetrics here, I felt this was outside the scope of this change and required context of what the test was meant to do.
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.
Offlined about making changes for B5. Marking "changes requested" in the meantime.
3ed301f
to
e4b028e
Compare
…ap3/hubspot_cta_form.html"
Biyeun mentioned the intention was to simply re-run the migration and, because the form was not used, we could leave the TODOs in the code to be handled when the form is eventually moved over to bootstrap 5 |
Code looks good, you just need to re-run the B5 diffs. |
Product Description
The requested form on Hubspot:

Our version:

Despite the hubspot version listing the 'how did you hear about us' field as required, marketing is in the process of changing that and wants it to be optional.
Technical Summary
Associated ticket: https://dimagi.atlassian.net/browse/SAAS-16655
Hubspot can handle its own forms, however it appears that previously we intentionally opted against using the hubspot forms because they would get blocked by adblockers. Since the hubspot forms were updated recently, that meant updating the forms manually on our side to align with them.
One important change was the previously, we were maintaining 4 variants of hubspot forms, although only 3 of those variants still exist on the hubspot side. Marketing confirmed that they don't use the other variants and would like us to display the same form in all situations, so I've removed the additional variants and simplified the form.
Feature Flag
No feature flag
Safety Assurance
Safety story
Verified locally that the form displays properly. Verified on hubspot's end that it received the submission I sent locally and that the contact information appears as expected.
Automated test coverage
No tests
QA Plan
No QA
Rollback instructions
Labels & Review