CMS Development

i3Dnet
Member

Hubspot forms textarea resizing limits

Hi,
I am using a Hubspot form in WordPress combined with the Elementor pagebuilder.

The textarea of the form can be resized both horizontally and vertically. I want to limit this to only vertical scaling.

In the embed code I have added a custom class

<!--[if lte IE 8]>
<script charset="utf-8" type="text/javascript" src="//js.hsforms.net/forms/v2-legacy.js"></script>
<![endif]-->
<script charset="utf-8" type="text/javascript" src="//js.hsforms.net/forms/v2.js"></script>
<script>
  hbspt.forms.create({
	portalId: "7178226",
	formId: "0e7ec4c7-00b1-4086-9921-a4ce73584c80",
	cssClass: 'textarea-hs',
});
</script>

And my CSS file looks like this:

textarea.textarea-hs  {
    resize: vertical !important;
    min-height: 200px !important;
}

Sadly, it does not listen to the css.
Any idea what I am doing wrong?

I don't have a url to share, it's on a development environment.


Best regards,
Jeroen

0 Upvotes
7 Replies 7
stefen
Key Advisor | Partner
Key Advisor | Partner

Hubspot forms textarea resizing limits

@i3Dnet I believe that class gets added to the form element which means the textarea would be a child of it. Try this instead:

.textarea-hs textarea  {
    resize: vertical !important;
    min-height: 200px !important;
}
Stefen Phelps, Community Champion, Kelp Web Developer
i3Dnet
Member

Hubspot forms textarea resizing limits

Hi Stefen,

 

Thank you for your response!

I have added this code to my custom css, and also directly attached to the widget in Elementor, but sadly it does not apply the css. The weird thing is that by manipulating the css directly in the browser, it works perfectly.

 

Since it's a development environment hidden behind a vpn, so I can not share the url.

 

Best regards,

Jeroen

0 Upvotes
i3Dnet
Member

Hubspot forms textarea resizing limits

Hi,
is there anyone who might have a possible fix for this?

Best regards,

Jeroen

0 Upvotes
stefen
Key Advisor | Partner
Key Advisor | Partner

Hubspot forms textarea resizing limits

@i3Dnet can you give us a link so we can look at it?

Stefen Phelps, Community Champion, Kelp Web Developer
0 Upvotes
i3Dnet
Member

Hubspot forms textarea resizing limits

@stefen
Thanks for your help, I'm working i a development environment that requires a vpn.
What I can do is request an IP allowlist.
Is it possible for you to send me your IP address in a private message?

Best regards,

Jeroen

0 Upvotes
sharonlicari
Community Manager
Community Manager

Hubspot forms textarea resizing limits

Hey @i3Dnet 

 

I'd like to share with you this article that might help you with this. I'll also tag a few experts that can share their knowledge with you. 

 

Hey @ndwilliams3 @trevordjones @stefen any advice you can give to @i3Dnet

 

Thank you

Sharon 

 

 


Did you know that the Community is available in other languages?
Join regional conversations by changing your language settings !




0 Upvotes
i3Dnet
Member

Hubspot forms textarea resizing limits

Thank you, Sharon!

0 Upvotes