I've been asked to create a form that has an email field and a button for newsletter sign up.
i have tried a gaggle of things and am not entirely sure this is possible.
I did go to the legacy so i could enable raw html - i'm putting it together on a regular html file to get it functional and styled. currently it renders a blank screen.
Has anyone done anything like this? If so, please enlighten me as to how ya pulled this off?
This is how I managed to resolve my issue and get the submit button to appear to the right of the email field. Now all is left is to style it. Additional info that may be helpful, i used the HubSpot Legacy forms and used the raw html to remove the default formatting that HubSpot applies.
#hsForm_FORM-ID-GOES-HERE {
display: flex !important;
gap: 10px;
align-items: center; /* Vertical alignment */
padding: 0 !important;
max-width: 500px;
}
/* TARGETS THE FIELD WRAPPER AND OVERRIDE BLOCK BEHAVIOR */
#hsForm_FORM-ID-GOES-HERE .hs-form-field {
flex-grow: 1;
flex-basis: 70%;
margin-bottom: 0 !important;
width: auto !important;
}
#hsForm_FORM-ID-GOES-HERE input[type="email"] {
width: 100% !important;
}
/* TARGETS THE BUTTON WRAPPER AND OVERRIDE BLOCK BEHAVIOR */
This is how I managed to resolve my issue and get the submit button to appear to the right of the email field. Now all is left is to style it. Additional info that may be helpful, i used the HubSpot Legacy forms and used the raw html to remove the default formatting that HubSpot applies.
#hsForm_FORM-ID-GOES-HERE {
display: flex !important;
gap: 10px;
align-items: center; /* Vertical alignment */
padding: 0 !important;
max-width: 500px;
}
/* TARGETS THE FIELD WRAPPER AND OVERRIDE BLOCK BEHAVIOR */
#hsForm_FORM-ID-GOES-HERE .hs-form-field {
flex-grow: 1;
flex-basis: 70%;
margin-bottom: 0 !important;
width: auto !important;
}
#hsForm_FORM-ID-GOES-HERE input[type="email"] {
width: 100% !important;
}
/* TARGETS THE BUTTON WRAPPER AND OVERRIDE BLOCK BEHAVIOR */
I didn't get a chance to give it a try because i figured it out. I was just about to post the 'how'. but it is very much like your solution. I have the button next to the field and it's ready to be styled. The issue i was having was the V2 call. My page was rendering blank all because an error calling the js was being encountered.
I'll post what I used here in a moment. Thank you soooo much for the speedy response. So grateful!!!