React-Hubspot form

In the react-Hubspot-form we have given cssClass with a particular name and also added a CSS attribute with an empty string it is working correctly but the email id is not submitted. In terms of how to add the custom class name to React-Hubspot form .

@MP9 ,

Could you add the code you are working with?

@piersg , @Teun have either of you used this react component?

Hi,
Here is the code and used the “react-Hubspot-form” library if I give the css with an empty string only I can overwrite the CSS if I do that the email button is not working.
<HubspotForm
portalId=“portalId”
region=“region”
formId=“formId”
cssClass=“hub-spot-form”
submitButtonClass=“submit-btn-new”

css=“”
/>
Thank you.

What happens if you don’t include the css property in the form component? e.g.

<HubspotForm
portalId="portalId"
region="region"
formId="formId"
cssClass="hub-spot-form"
submitButtonClass="submit-btn-new"
/>

If am not CSS property means the class name we are giving is not added if I give the with empty string means the class name is working but the submit button is not working.

When you say the submit button is not working, do you mean the css for the submit button isn’t working, or do you mean the button itself doesn’t work i.e. isn’t submitting the form?

If you mean the former, you could target the button as a child of the form in css, instead of directly. I’m not sure where the form css class is applied but you could also do it as a child of that.

form input[type=submit] {

}
/* or */
.hub-spot-form input[type=submit] {

}

Hi @dennisedson ,

I did not have the chance to work with this module yet.