+ Start a Discussion
Niraj Kr SinghNiraj Kr Singh 

How to disable <apex:inputfield> using javascript

Hi Everyone,
I am facing problem to hide the input field using javascript:
<apex:inputField Id="IFWhatId" value="{!objTask.WhatId}"/>

how can hide this <apex:inputField> using javascript.

Amit Chaudhary 8Amit Chaudhary 8
You can try like below code. I hope that will help you
<apex:outputPanel rendered="{!onOff}">
    <apex:inputField value="{!someField}"/>
<apex:outputPanel rendered="{!NOT(onOff)}">
    <apex:outputField value="{!someField}"/>
Or Please check below post. I hope that will help you

Please let me know if this will help you

Amit Chaudhary