<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: I have issue on using script to block field on Hubspot? in CMS Development</title>
    <link>https://community.hubspot.com/t5/CMS-Development/I-have-issue-on-using-script-to-block-field-on-Hubspot/m-p/748220#M32574</link>
    <description>&lt;P&gt;Hello&amp;nbsp;&lt;a href="https://community.hubspot.com/t5/user/viewprofilepage/user-id/497526"&gt;@RMechergui&lt;/a&gt;&amp;nbsp;, you don't actually need javascript for this, you can do it by using just css like this:&lt;/P&gt;
&lt;LI-CODE lang="css"&gt;.hs_event_date {
    pointer-events: none;
}&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Pointer events rule controls the mouse/touch functionality on the html elements so you can disable any events on any element by using the "none" value.&lt;BR /&gt;&lt;BR /&gt;You can read more about pointer event &lt;A href="https://developer.mozilla.org/en-US/docs/Web/CSS/pointer-events" target="_blank" rel="noopener"&gt;here in this link&lt;/A&gt;.&lt;BR /&gt;&lt;BR /&gt;&lt;U&gt;&lt;EM&gt;&lt;STRONG&gt;If my answer was helpful please mark it as a solution.&lt;/STRONG&gt;&lt;/EM&gt;&lt;/U&gt;&lt;/P&gt;</description>
    <pubDate>Fri, 27 Jan 2023 18:59:45 GMT</pubDate>
    <dc:creator>miljkovicmisa</dc:creator>
    <dc:date>2023-01-27T18:59:45Z</dc:date>
    <item>
      <title>I have issue on using script to block field on Hubspot?</title>
      <link>https://community.hubspot.com/t5/CMS-Development/I-have-issue-on-using-script-to-block-field-on-Hubspot/m-p/748160#M32571</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Link of the page:&amp;nbsp;&lt;A href="https://m.codingdojo.africa/open-house/" target="_blank"&gt;https://m.codingdojo.africa/open-house/&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm trying to block the date field on the form and make the customer not able to change it, we successfully succeed to block the field by using this code:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;&amp;lt;script charset="utf-8" type="text/javascript" src="//js-eu1.hsforms.net/forms/embed/v2.js"&amp;gt;&amp;lt;/script&amp;gt;
&amp;lt;script&amp;gt;
  hbspt.forms.create({
    region: "t****",
    portalId: "portalId-****",
    formId: "formId-******",

onFormReady: function($form){

         $form.find('input[id="event_date-43b27612-415f-42fc-a353-a0c0baa41c4a"]').attr('disabled','true');
    }

  });
&amp;lt;/script&amp;gt;&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;but there's still an issue with the 'Data Selector' is still shown when clicking on the field, Please check (screenshot):&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="2023-01-27_183541.png" style="width: 999px;"&gt;&lt;img src="https://community.hubspot.com/t5/image/serverpage/image-id/84112iD30998047F456B97/image-size/large?v=v2&amp;amp;px=999" role="button" title="2023-01-27_183541.png" alt="2023-01-27_183541.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;How I could block this box from showing using javascript code, can you please help me to complete the script that we just created above this message?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you.&lt;/P&gt;</description>
      <pubDate>Fri, 27 Jan 2023 17:42:07 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/CMS-Development/I-have-issue-on-using-script-to-block-field-on-Hubspot/m-p/748160#M32571</guid>
      <dc:creator>RMechergui</dc:creator>
      <dc:date>2023-01-27T17:42:07Z</dc:date>
    </item>
    <item>
      <title>Re: I have issue on using script to block field on Hubspot?</title>
      <link>https://community.hubspot.com/t5/CMS-Development/I-have-issue-on-using-script-to-block-field-on-Hubspot/m-p/748220#M32574</link>
      <description>&lt;P&gt;Hello&amp;nbsp;&lt;a href="https://community.hubspot.com/t5/user/viewprofilepage/user-id/497526"&gt;@RMechergui&lt;/a&gt;&amp;nbsp;, you don't actually need javascript for this, you can do it by using just css like this:&lt;/P&gt;
&lt;LI-CODE lang="css"&gt;.hs_event_date {
    pointer-events: none;
}&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Pointer events rule controls the mouse/touch functionality on the html elements so you can disable any events on any element by using the "none" value.&lt;BR /&gt;&lt;BR /&gt;You can read more about pointer event &lt;A href="https://developer.mozilla.org/en-US/docs/Web/CSS/pointer-events" target="_blank" rel="noopener"&gt;here in this link&lt;/A&gt;.&lt;BR /&gt;&lt;BR /&gt;&lt;U&gt;&lt;EM&gt;&lt;STRONG&gt;If my answer was helpful please mark it as a solution.&lt;/STRONG&gt;&lt;/EM&gt;&lt;/U&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 27 Jan 2023 18:59:45 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/CMS-Development/I-have-issue-on-using-script-to-block-field-on-Hubspot/m-p/748220#M32574</guid>
      <dc:creator>miljkovicmisa</dc:creator>
      <dc:date>2023-01-27T18:59:45Z</dc:date>
    </item>
    <item>
      <title>Re: I have issue on using script to block field on Hubspot?</title>
      <link>https://community.hubspot.com/t5/CMS-Development/I-have-issue-on-using-script-to-block-field-on-Hubspot/m-p/748221#M32575</link>
      <description>&lt;P&gt;Brilliant! Thanks for the tip,&amp;nbsp;&lt;a href="https://community.hubspot.com/t5/user/viewprofilepage/user-id/166093"&gt;@miljkovicmisa&lt;/a&gt;&amp;nbsp;&lt;span class="lia-unicode-emoji" title=":waving_hand:"&gt;👋&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 27 Jan 2023 19:01:16 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/CMS-Development/I-have-issue-on-using-script-to-block-field-on-Hubspot/m-p/748221#M32575</guid>
      <dc:creator>Jaycee_Lewis</dc:creator>
      <dc:date>2023-01-27T19:01:16Z</dc:date>
    </item>
    <item>
      <title>Re: I have issue on using script to block field on Hubspot?</title>
      <link>https://community.hubspot.com/t5/CMS-Development/I-have-issue-on-using-script-to-block-field-on-Hubspot/m-p/748289#M32578</link>
      <description>&lt;P&gt;Hi, &lt;a href="https://community.hubspot.com/t5/user/viewprofilepage/user-id/166093"&gt;@miljkovicmisa&lt;/a&gt;&amp;nbsp;&lt;a href="https://community.hubspot.com/t5/user/viewprofilepage/user-id/127074"&gt;@Jaycee_Lewis&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you for your reply, yes, I try this CSS solution before, and didn't work, I don't know why, please try it by yourself, that's why, I'm looking for javascript code to fix this issue.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Link:&amp;nbsp;&lt;A href="https://m.codingdojo.africa/open-house/" target="_blank"&gt;https://m.codingdojo.africa/open-house/&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you&lt;/P&gt;</description>
      <pubDate>Fri, 27 Jan 2023 20:45:15 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/CMS-Development/I-have-issue-on-using-script-to-block-field-on-Hubspot/m-p/748289#M32578</guid>
      <dc:creator>RMechergui</dc:creator>
      <dc:date>2023-01-27T20:45:15Z</dc:date>
    </item>
    <item>
      <title>Re: I have issue on using script to block field on Hubspot?</title>
      <link>https://community.hubspot.com/t5/CMS-Development/I-have-issue-on-using-script-to-block-field-on-Hubspot/m-p/748354#M32583</link>
      <description>&lt;P&gt;Ow shoot, I missed that, it's an embedded form, that's why css didn't work for you, because it's in an iframe, css from your page cannot reach it.&lt;/P&gt;
&lt;P&gt;Your code is correct, you should just change the part in the onFormReady function &lt;span class="lia-unicode-emoji" title=":winking_face:"&gt;😉&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;$form.find('.hs_event_date').css('pointer-events','none');&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;So basically apply the mentioned css with jQuery.&lt;/P&gt;</description>
      <pubDate>Fri, 27 Jan 2023 23:46:30 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/CMS-Development/I-have-issue-on-using-script-to-block-field-on-Hubspot/m-p/748354#M32583</guid>
      <dc:creator>miljkovicmisa</dc:creator>
      <dc:date>2023-01-27T23:46:30Z</dc:date>
    </item>
  </channel>
</rss>

