+ Start a Discussion
Venky1219Venky1219 

How make all controlls in vf page disabled /readonly in single shot

Hi all ,

 I have vf page with inputText ,selectlist,checkBoxes,selectRadio controlls now I need to disable or make readonly in single shot .( I mean if you want to disble a controll set disble = true , but in this case I need to have disable option in every controll )

 

Is there any other way to disable everything conditionally in single shot

Sonam_SFDCSonam_SFDC

Hi,

 

Reading your requirement I understand that you wish to diable the fields on the VF page on a click of a button or depending on a field value:

 

Please go through the following threads where nusers have been able to succesfully implement this:

http://boards.developerforce.com/t5/Visualforce-Development/Disable-field-in-a-VF-page-based-on-the-values-of-a-picklist/td-p/112522

http://boards.developerforce.com/t5/Visualforce-Development/Can-i-enable-and-disable-fields-on-a-visualforce-page-based-on/td-p/138564

http://www.tehnrd.com/how-to-disable-visualforce-inputfields/

VennilaVennila

Hi,

 

Yes, you can disabled attribute for all controllers.

 

Example:

 

<apex:inputText value="{!fieldname}" disabled="true" />

 

Thanks & Regards,

 

P.Vennila

Salesforce Certified Developer

MetaSoftTech Solutions.