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
Craig CoulterCraig Coulter 

Visualforce page IF statements

Hi,

Can an IF statement be created on a VF page that will display a different snippet of HTML dependant on what option is selected on a pick list within the lead object? This VF page will show on a section within the lead object as well.

Thanks
PriyaPriya (Salesforce Developers) 

Hey Crain,

Can you explain this with an example ?

Regards,

Priya Ranjan

Craig CoulterCraig Coulter
Hi Priya,

At the moment I have section on the Lead view that shows a map:

User-added image

The map is just an iFrame within a VF page that is placed in one column within the Lead object:

User-added image

The link in that view is a formular that will show a certain VF page based on what option is selected from a pick list in that Lead view:

User-added image

But I don't really want the link to view the relavent map, that is just me trying different things, I want the map to display fully in the section like above, but the map to matche the pick list option. I will need to either create several VF pages with the relevant map on or, if it's possible, to do it through one VF page with an IF statement that will show the iFrame code for the relavent map for whatever pick list option is selected.

Thanks

Craig