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
Satya BandiSatya Bandi 

Is it possible to view or hide a field based on the picklist selection of two other fields on a VF Page. Please let me know.

Akshit HuriaAkshit Huria
Hi satya Bandi

yes it is possible, Please refer below code snippet
<apex:includeScript value=""/>
    function jsFunction()
	    var dropdownValue = $("[id$='seleclst']").val();
	    if(dropdownValue == "valueA")	//Lets suppose a value.

<!--vf page snippet-->
<apex:selectList id="seleclst" required="true" size="1" value="{!aval}" onchange  = "jsFunction(); return false;" >
                  <apex:selectOptions value="{!aname}" />
<apex:CommandButton id="btn" value="action Button" />

Please let me know if above code snippet hepls you

Thank You