Skip to content

Commit

Permalink
test: salesforce value
Browse files Browse the repository at this point in the history
  • Loading branch information
bluedeepart committed Jan 24, 2025
1 parent 911b87a commit db029a7
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion blocks/forms/formHelper.js
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ export function createSalesforceForm(hubspotForm, formConfig) {
if (qdcCall && qdcCall.checked) {
qdc = 'Call';
} else {
qdc = hubspotFormData.get('requested_qdc_discussion__c') || ''; // test case
qdc = hubspotForm.querySelector('input[name="requested_qdc_discussion__c"]').value || ''; // test case
}
if (qdc === '') {
qdc = formConfig.qdc || '';
Expand Down
5 changes: 3 additions & 2 deletions blocks/forms/forms.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,10 @@ export function createHubSpotForm(formConfig, target, type = '') {
// get-in-tough/contact form
if (type === 'get-in-touch') {
GLOBAL_CMP = formConfig.cmp;
const cmpInput = form.querySelector("input[name='cmp']");
// const cmpInput = form.querySelector("input[name='cmp']");
const requestedQDCDiscussion = form.querySelector('input[name="requested_qdc_discussion__c"]');

cmpInput.value = '';
requestedQDCDiscussion.value = '';
form.querySelector("select[name='get_in_touch_interests']").addEventListener('change', (evt) => {
if (evt.target.value === 'Sales' || evt.target.value === 'Tech support') {
requestedQDCDiscussion.value = 'Call';
Expand All @@ -40,6 +40,7 @@ export function createHubSpotForm(formConfig, target, type = '') {
requestedQDCDiscussion.value = '';
// cmpInput.value = '';
}
console.log(requestedQDCDiscussion.value);

Check warning on line 43 in blocks/forms/forms.js

View workflow job for this annotation

GitHub Actions / build

Unexpected console statement
});
}
// get-in-tough/contact form
Expand Down

0 comments on commit db029a7

Please sign in to comment.