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
Adam LeeAdam Lee 

Display the relevant fields when a inputfield (Picklist) is selected

Hi all.

I'm new to VF and APEX and only know the basics.

I am trying to create a VF section on a custom object. I'm trying display certain fields depending on the the type of picklist value is selected.

e.g. if I select picklist 1, A,B and C field shows.
if I select picklist 2, D,E and F field shows.

Would any have any idea on how to do this and have any sample code?

thanks in advance.

Adam
NagaNaga (Salesforce Developers) 
Hi Adam,

Please check the sample code below

User-added image
Link : http://salesforce.stackexchange.com/questions/22227/dynamically-display-fields-based-on-picklist-for-create-page

Best Regards
Naga Kiran