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
Lorr McLorr Mc 

I need a pop box when a picklist value is selected

Hi,

I need a pop up box to display instructions when when a picklist value is selected. 
On the case object I have a picklist called "Requst Type" which has multiple values however if they select the value "Error Message" I need a pop up that says please ensure you add a screen shot of the error message and provide details of steps to recreate and so on. 
I have created a visualforce page (my first) but that is as far as I got, I dont know if this is even the correct route to take or how to get it to pop up if even possible.
Any advice welcom as this is tottaly new to me. 

Thanks You,

Lorr 
Ravi Dutt SharmaRavi Dutt Sharma

I suggest you to make use of help text instead of displaying an informational pop-up.

A custom pop-up is also possible. Below links may help you:
https://www.forcetalks.com/salesforce-topic/how-to-create-popup-from-visualforce-page/

Ajay K DubediAjay K Dubedi
Hi Lorr,

The best way to achieve your objective is to use lightning component, so try the following code and feel free to reply for any further queries:

Lightning Component:
 
<aura:component >
    <aura:attribute name="isOpen" type="Boolean"/>
    <lightning:select name = "Hi" label = "Hi" onchange="{!c.openModel}">
        <option label="Select" value="Select"/>
        <option label="Error Message" value="Error Message"/>
        <option label="Success Message" value="Success Message"/>
    </lightning:select>
    <aura:if isTrue="{!v.isOpen == true}">
         <!--###### MODAL BOX Start######--> 
            <section role="dialog" tabindex="-1" aria-labelledby="modal-heading-01" aria-modal="true" aria-describedby="modal-content-id-1" class="slds-modal slds-fade-in-open">
                <div class="slds-modal__container">
                    <!-- ###### MODAL BOX HEADER Start ######-->
                    <header class="slds-modal__header">
                        <lightning:buttonIcon iconName="utility:close"
                                              onclick="{! c.closeModel }"
                                              alternativeText="close"
                                              variant="bare-inverse"
                                              class="slds-modal__close"/>
                        <h2 id="modal-heading-01" class="slds-text-heading_medium slds-hyphenate">Modal Header</h2>
                    </header>
                    <!--###### MODAL BOX BODY Part Start######-->
                    <div class="slds-modal__content slds-p-around_medium" id="modal-content-id-1">
                        Your modal content comes here !!
                    </div>
                    <!--###### MODAL BOX FOOTER Part Start ######-->
                    <footer class="slds-modal__footer">
                        <lightning:button variant="neutral" 
                                          label="Cancel"
                                          title="Cancel"
                                          onclick="{! c.closeModel }"/>
                        <lightning:button variant="brand" 
                                          label="Save"
                                          title="Save"
                                          onclick="{!c.save }"/>
                    </footer>
                </div>
            </section>
            <div class="slds-backdrop slds-backdrop_open"></div>
            <!--###### MODAL BOX Part END Here ######-->
    </aura:if>
</aura:component>


Controller:
 
({
   openModel: function(component, event, helper) {
      console.log(event.getSource().get('v.value'));
       if(event.getSource().get('v.value') == 'Error Message'){
          component.set("v.isOpen", true); 
       }
       
   },
 
   closeModel: function(component, event, helper) {
      component.set("v.isOpen", false);
   },
 
   save: function(component, event, helper) {
      component.set("v.isOpen", false);
   },
})

I hope you find the above solution helpful. If it does, please mark as Best Answer to help others too.
Thanks,
Ajay Dubedi