function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion

How to hide the text field when the checkbox is selected in the pagelayout

Hi Frds,


I need some help from You ..


I have 2 Custom fields  one is Text type and the other is Checkbox type   in account pagelayout, If the checkbox is checked only we need to make the text field as enable otherwise the textfield is readonly


PLz Provide your valuable suggestions ..............


You have to create a VF page for this and use JavaScript to make the field readonly when the checkbox is checked.


You can hide text area field custom pages or standard page and  for this and use JavaScript .;


When we click on checkbox then after clicking a checkbox cal java script function and in java script function write the code:-  


Document.getElementById('  Id Of TextType Field').Style.Display='none';


If my solution worked for you mark it as resolved.