Don't have an account?
Search for an answer or ask a question of the zone or Customer Support.
You need to sign in to do that
Sign in to start searching questions
Signup for a Developer Edition
Sign in to start a discussion
Check below examples.
https://jayakrishnasfdc.wordpress.com/2018/08/05/custom-picklist-in-visualforce-salesforce/#:~:text=Sometime%20there%20is%20requirement%20to,be%20done%20using%20inputfield%20tag.
https://www.salesforcetutorial.com/salesforce-picklist-example-visualforce-page/
Thanks,
Vinay Kumar
<apex:page controller="chooseColor">
<apex:form id="TheForm">
<apex:selectList id="chooseColor" value="{!s}" size="1">
<apex:selectOption itemValue="yes" itemLabel="Yes"/>
<apex:selectOption itemValue="no" itemLabel="No"/>
<apex:selectOption itemValue="blue" itemLabel="Blue"/>
<apex:actionSupport event="onchange" action="{!Dummy}" rerender="TheForm" />
</apex:selectList>
<table>
<tr>
<th>Value1:</th>
<td>{!s}</td>
</tr>
</table>
</apex:form>
</apex:page>
/*** Controller ***/
public class chooseColor {
public String s {get;set;}
}
Try this, in actionsupport, pass the id of the the block that you need to show, after chossing the value.