Sales Hub Tools

RWright1
メンバー

Prevent Form submissions by pressing enter

解決

Hi, 

 

In lead capture forms, can we stop the form submitting by pressing enter.  As clients are using it to create a paragraph and the are submitting the form before they have finished.

0 いいね!
1件の承認済みベストアンサー
elizheleva
解決策
ガイド役 | Gold Partner
ガイド役 | Gold Partner

Prevent Form submissions by pressing enter

解決

Hi, @RWright1 ,

 

an easy way to do so would be to have a checkbox at the end of the form for GDPR purposes, for example. This way, even if they press enter within one of the fields, unless they click that checkbox, which would be a required field, the form won't be submitted. 😉 This way, you get what you wanted initially, plus you're GDPR compliant. Isn't that a win?! 😄

 

Let me know how you get on,

Eli


Eli Zheleva
Chief Problem solver @ uspeh | Hubspot Trainer | Hubspot Partner | Community Champion
Still need help? Book a free call with me

Did my post help answer your query? Help the community by marking it as a solution.



元の投稿で解決策を見る

0 いいね!
2件の返信
TomM2
ソートリーダー | Platinum Partner
ソートリーダー | Platinum Partner

Prevent Form submissions by pressing enter

解決

The only way to do this would be through custom JS. You could use something like a prevent default action to stop this. 

It's worth noting however, it's expected by screen readers that tab switches fields and enter submits the form. I'm not entirely up to date with accessibility laws but I do believe not allowing enter to submit a form would be against best acessibility practices at best. 

Tom Mahon
Technical Consultant | Solutions Engineer | Community Champion
Baskey Digitial

Book a consultation

Did my post help answer your query? Help the community (and me) by marking it as a solution.


elizheleva
解決策
ガイド役 | Gold Partner
ガイド役 | Gold Partner

Prevent Form submissions by pressing enter

解決

Hi, @RWright1 ,

 

an easy way to do so would be to have a checkbox at the end of the form for GDPR purposes, for example. This way, even if they press enter within one of the fields, unless they click that checkbox, which would be a required field, the form won't be submitted. 😉 This way, you get what you wanted initially, plus you're GDPR compliant. Isn't that a win?! 😄

 

Let me know how you get on,

Eli


Eli Zheleva
Chief Problem solver @ uspeh | Hubspot Trainer | Hubspot Partner | Community Champion
Still need help? Book a free call with me

Did my post help answer your query? Help the community by marking it as a solution.



0 いいね!