# Make Fields Unclickable on HubSpot?

**URL:** <https://community.hubspot.com/t/make-fields-unclickable-on-hubspot/73702>\
**Category:** CMS Development\
**Created:** [January 25, 2023, 1:15pm UTC](https://community.hubspot.com/t/make-fields-unclickable-on-hubspot/73702 "2023-01-25T13:15:05Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![RMechergui](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/rmechergui/32/56635_2.png) [@RMechergui](https://community.hubspot.com/u/RMechergui)\
**Post date:** [January 25, 2023, 1:15pm UTC](https://community.hubspot.com/t/make-fields-unclickable-on-hubspot/73702/1 "2023-01-25T13:15:05Z")

</div>

Hi,

I want to block the ‘Date’ field from clicks because I add the default date on the field and I don’t want the customer to change it, I don’t want to use the hidden field option because it will be hidden first and second I want to inform the customer about that date without change the ’ Date Field’ is there a way I could do that with CSS code to do it?

Thank you.

---

<div class="post-metadata">

**Author:** ![Anton](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/anton/32/103167_2.png) [@Anton](https://community.hubspot.com/u/Anton)\
**Post date:** [January 25, 2023, 4:16pm UTC](https://community.hubspot.com/t/make-fields-unclickable-on-hubspot/73702/2 "2023-01-25T16:16:51Z")

</div>

Hi @RMechergui,

there are several ways you can make a date field(or any other) not clickable by the user. Personally I don’t recommend it since it’s a bad user experience, but you can add

```lia-code-sample
form input[type="date"], 
form input#date_of_birth-input{
pointer-events:none;
}

```

at the bottom of your main CSS file if you want it to affect every date field in every form on your page. If you want to have it on one particular page you can add it like this

```lia-code-sample
<style>
form input[type="date"], 
form input#date_of_birth-input{
pointer-events:none;
}
</style>

```

to the “header-HTML” section in the advanced options of in settings tab of the particular page

Note: replace “date\_of\_birth-input” with the name of your property. If you’re unsure inspect the element in the browser by right-click and “inspect element”. The ID is the information you’re looking for

![Anton_0-1674663396349.png](https://d2qpr2jzcazej7.cloudfront.net/original/2X/d/dac96d52cb2137a99035bde0848e36ab45e88621.png)

hope this helps

best,

Anton

_Moderator note: While this solution may not address the original poster’s specific situation, it could be helpful for other community members facing similar challenges._

---

<div class="post-metadata">

**Author:** ![RMechergui](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/rmechergui/32/56635_2.png) [@RMechergui](https://community.hubspot.com/u/RMechergui)\
**Post date:** [January 25, 2023, 4:30pm UTC](https://community.hubspot.com/t/make-fields-unclickable-on-hubspot/73702/3 "2023-01-25T16:30:32Z")

</div>

Hi, Anton, Thank you so much for this valuable information, but what If I’m using WordPress with Elementor Page Builder, What is the best way to do that?

This is the link to the page: [https://m.codingdojo.africa/open-house/](https://m.codingdojo.africa/open-house/)

with the section that I want to make unclickable on the screenshot:

 ![2023-01-25_173307.jpg](https://d2qpr2jzcazej7.cloudfront.net/original/3X/8/4/841bfc4127a891a77a79daec555822ae7a779ca5.jpeg)

Thank you.

---

<div class="post-metadata">

**Author:** ![Anton](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/anton/32/103167_2.png) [@Anton](https://community.hubspot.com/u/Anton)\
**Post date:** [January 27, 2023, 9:00am UTC](https://community.hubspot.com/t/make-fields-unclickable-on-hubspot/73702/4 "2023-01-27T09:00:26Z")

</div>

Hi @RMechergui,

thank you for the link.

add the following code to your main CSS file. It will be applied to all HubSpot forms

```lia-code-sample
form .hs-dateinput input{
pointer-events:none;
}

```

If you want the code to be applied only to specific HubSpot forms you can modify the code like this:

```lia-code-sample
form#[formID] .hs-dateinput input{
pointer-events:none;
}

```

if you want this code to be applied to several forms you can change it like this

```lia-code-sample
form#[formID-1] .hs-dateinput input,
form#[formID-2] .hs-dateinput input,
form#[formID-3] .hs-dateinput input{
pointer-events:none;
}

```

**important: You have to replace [formID] or [formID-#] with the correct ID of the used form.**

You can find the ID by inspecting the form and looking for

```lia-code-sample
<form id="hsForm_ ****" method="POST"....>
...
</form>

```

for security reasons I won’t share the ID of the form

best,

Anton

---

<div class="post-metadata">

**Author:** ![RMechergui](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/rmechergui/32/56635_2.png) [@RMechergui](https://community.hubspot.com/u/RMechergui)\
**Post date:** [January 27, 2023, 9:32am UTC](https://community.hubspot.com/t/make-fields-unclickable-on-hubspot/73702/5 "2023-01-27T09:32:10Z")

</div>

Hi, Anton

Thank you for the CSS, but when I try it it doesn’t work, I don’t know why, I understand that CSS that you give it right, but I don’t know why is not working on the WordPress website, can you please help me?

Link: [https://m.codingdojo.africa/open-house/](https://m.codingdojo.africa/open-house/)

Thank you
