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
AbAb 

red mandatory symbol for picklist field

Hello,

I have a picklist fields. I have added validation rule to check if the field has some value. But i want to have the red icon adjacent to the field like other mandatopry field has
Best Answer chosen by Ab
Apoorv Saxena 4Apoorv Saxena 4

Hi Sandrine,

You can make picklist field mandatory from the Record Page Layout. 
Go to your picklist field, a wrench is displayed when you highlight the field on the page layout and select the Required checkbox and save.

Please, let me know if this helps.

All Answers

Apoorv Saxena 4Apoorv Saxena 4

Hi Sandrine,

You can make picklist field mandatory from the Record Page Layout. 
Go to your picklist field, a wrench is displayed when you highlight the field on the page layout and select the Required checkbox and save.

Please, let me know if this helps.

This was selected as the best answer
anand k 11anand k 11
Hi Sandrine,

You can mark it red by using the <apex:InputField> tag, include the required="true" attribute

<apex:inputField ..... required="true">

when you put it on the VF page

Thanks
Anand

 
Vivek DeshmaneVivek Deshmane
Hi Sandrine,
                                        
                                        If your using Selectlist  tag mark requied field with red color as below.

                                        <div class="requiredInput" >
                                             <apex:outputpanel >
                                                <div class="requiredBlock"/>
                                               </apex:outputpanel>
                                            <apex:selectList value="{!selctValue}" multiselect="false" size="1"  required=true"  >
                                                <apex:selectOptions value="{!lstValues}" />
                                            </apex:selectList>
                                        </div>
                                        
                                        If your <apex:InputField> tag, include the required="true" attribute
                                        
                                        <apex:inputField value="{!val}" required="true">
                                        
                                        If you get the answer, please mark it as the correct answer. It will be a help to others who are facing the same problem later.
                                        
                                        Best Regards,
                                        -Vivek
AbAb
I dont have nay record type, i just have one page layout
I am using standard page. No VF